2010-04-07 18:34:35 +08:00
|
|
|
SRC = $(wildcard $(SRCROOT)/System/*.cpp $(SRCROOT)/System/Unix/*.cpp)
|
|
|
|
OBJ = $(SRC:.cpp=.o)
|
2010-08-28 05:37:50 +08:00
|
|
|
LIB = libsfml2-system.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-system.so: $(OBJ)
|
2010-03-23 23:55:07 +08:00
|
|
|
$(CPP) $(LDFLAGS) -Wl,-soname,$(LIBNAME) -o $(FULLLIBNAME) $(OBJ) -lpthread
|
|
|
|
|
|
|
|
$(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)
|