2010-04-06 03:13:11 +08:00
|
|
|
SRC = $(wildcard $(SRCROOT)/Graphics/*.cpp $(SRCROOT)/Graphics/Linux/*.cpp)
|
|
|
|
OBJ = $(SRC:.cpp=.o)
|
2010-08-28 05:37:50 +08:00
|
|
|
LIB = libsfml2-graphics.so
|
2010-03-23 23:55:07 +08:00
|
|
|
LIBNAME = $(LIB).$(VERSION)
|
|
|
|
FULLLIBNAME = $(LIBPATH)/$(LIBNAME)
|
|
|
|
LINK = $(LN) $(LNFLAGS) $(LIBNAME) $(DESTLIBDIR)/$(LIB)
|
|
|
|
|
|
|
|
all: $(LIB)
|
|
|
|
|
2010-08-28 05:37:50 +08:00
|
|
|
libsfml2-graphics.so: $(OBJ)
|
2010-07-31 22:06:30 +08:00
|
|
|
$(CPP) $(LDFLAGS) -Wl,-soname,$(LIBNAME) -o $(FULLLIBNAME) $(OBJ) -lGLEW -ljpeg -lfreetype -lX11 -lGL
|
2010-03-23 23:55:07 +08:00
|
|
|
|
|
|
|
$(OBJ): %.o: %.cpp
|
|
|
|
$(CPP) -o $@ -c $< $(CFLAGS) -I/usr/include/freetype2
|
|
|
|
|
|
|
|
.PHONY: clean mrproper
|
|
|
|
|
|
|
|
clean:
|
2010-04-06 03:13:11 +08:00
|
|
|
rm -rf $(OBJ)
|
2010-03-23 23:55:07 +08:00
|
|
|
|
|
|
|
mrproper: clean
|
|
|
|
rm -rf $(FULLLIBNAME)
|
|
|
|
|
2010-07-31 22:06:30 +08:00
|
|
|
install:
|
|
|
|
objcopy --only-keep-debug $(FULLLIBNAME) $(DESTDBGDIR)/$(LIBNAME)
|
2010-03-23 23:55:07 +08:00
|
|
|
objcopy --strip-unneeded $(FULLLIBNAME) $(DESTLIBDIR)/$(LIBNAME)
|
|
|
|
$(LINK)
|