2010-04-06 03:13:11 +08:00
|
|
|
SRC = $(wildcard $(SRCROOT)/Graphics/*.cpp $(SRCROOT)/Graphics/Linux/*.cpp)
|
|
|
|
OBJ = $(SRC:.cpp=.o)
|
2010-03-23 23:55:07 +08:00
|
|
|
LIB = libsfml-graphics.so
|
|
|
|
LIBNAME = $(LIB).$(VERSION)
|
|
|
|
FULLLIBNAME = $(LIBPATH)/$(LIBNAME)
|
|
|
|
LINK = $(LN) $(LNFLAGS) $(LIBNAME) $(DESTLIBDIR)/$(LIB)
|
|
|
|
|
|
|
|
all: $(LIB)
|
|
|
|
|
2010-04-06 03:13:11 +08:00
|
|
|
libsfml-graphics.so: $(OBJ)
|
|
|
|
$(CPP) $(LDFLAGS) -Wl,-soname,$(LIBNAME) -o $(FULLLIBNAME) $(OBJ) -lGLEW -ljpeg -lpng -lSOIL -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)
|
|
|
|
|
|
|
|
install:
|
|
|
|
objcopy --only-keep-debug $(FULLLIBNAME) $(DESTDBGDIR)/$(LIBNAME)
|
|
|
|
objcopy --strip-unneeded $(FULLLIBNAME) $(DESTLIBDIR)/$(LIBNAME)
|
|
|
|
$(LINK)
|