2010-04-07 18:34:35 +08:00
|
|
|
SRC = $(wildcard $(SRCROOT)/Window/*.cpp $(SRCROOT)/Window/Linux/*.cpp)
|
|
|
|
OBJ = $(SRC:.cpp=.o)
|
2010-08-28 05:37:50 +08:00
|
|
|
LIB = libsfml2-window.so
|
2010-03-23 23:55:07 +08:00
|
|
|
LIBNAME = $(LIB).$(VERSION)
|
|
|
|
FULLLIBNAME = $(LIBPATH)/$(LIBNAME)
|
2010-08-28 05:37:50 +08:00
|
|
|
LINK = $(LN) $(LNFLAGS) $(LIBNAME) $(DESTLIBDIR)/$(LIB)
|
2010-03-23 23:55:07 +08:00
|
|
|
|
|
|
|
all: $(LIB)
|
|
|
|
|
2010-08-28 05:37:50 +08:00
|
|
|
libsfml2-window.so: $(OBJ)
|
2010-03-23 23:55:07 +08:00
|
|
|
$(CPP) $(LDFLAGS) -Wl,-soname,$(LIBNAME) -o $(FULLLIBNAME) $(OBJ) -lX11 -lXrandr -lGL
|
|
|
|
|
|
|
|
$(OBJ): %.o: %.cpp
|
|
|
|
$(CPP) -o $@ -c $< $(CFLAGS)
|
|
|
|
|
|
|
|
.PHONY: clean mrproper
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf $(OBJ)
|
|
|
|
|
|
|
|
mrproper: clean
|
|
|
|
rm -rf $(FULLLIBNAME)
|
|
|
|
|
|
|
|
install:
|
2010-08-28 05:37:50 +08:00
|
|
|
objcopy --only-keep-debug $(FULLLIBNAME) $(DESTDBGDIR)/$(LIBNAME)
|
2010-03-23 23:55:07 +08:00
|
|
|
objcopy --strip-unneeded $(FULLLIBNAME) $(DESTLIBDIR)/$(LIBNAME)
|
|
|
|
$(LINK)
|