SFML/build/make/Makefile.graphics

28 lines
765 B
Makefile

SRC = $(wildcard $(SRCROOT)/Graphics/*.cpp $(SRCROOT)/Graphics/Linux/*.cpp)
OBJ = $(SRC:.cpp=.o)
LIB = libsfml-graphics.so
LIBNAME = $(LIB).$(VERSION)
FULLLIBNAME = $(LIBPATH)/$(LIBNAME)
LINK = $(LN) $(LNFLAGS) $(LIBNAME) $(DESTLIBDIR)/$(LIB)
all: $(LIB)
libsfml-graphics.so: $(OBJ)
$(CPP) $(LDFLAGS) -Wl,-soname,$(LIBNAME) -o $(FULLLIBNAME) $(OBJ) -lGLEW -ljpeg -lfreetype -lX11 -lGL
$(OBJ): %.o: %.cpp
$(CPP) -o $@ -c $< $(CFLAGS) -I/usr/include/freetype2
.PHONY: clean mrproper
clean:
rm -rf $(OBJ)
mrproper: clean
rm -rf $(FULLLIBNAME)
install:
objcopy --only-keep-debug $(FULLLIBNAME) $(DESTDBGDIR)/$(LIBNAME)
objcopy --strip-unneeded $(FULLLIBNAME) $(DESTLIBDIR)/$(LIBNAME)
$(LINK)