mirror of
https://github.com/SFML/SFML.git
synced 2024-11-29 06:41:05 +08:00
29 lines
665 B
Makefile
29 lines
665 B
Makefile
|
SRC = $(wildcard $(SRCROOT)/Audio/*.cpp)
|
||
|
OBJ = $(SRC:.cpp=.o)
|
||
|
|
||
|
LIB = libsfml-audio.so
|
||
|
LIBNAME = $(LIB).$(VERSION)
|
||
|
FULLLIBNAME = $(LIBPATH)/$(LIBNAME)
|
||
|
LINK = $(LN) $(LNFLAGS) $(LIBNAME) $(DESTLIBDIR)/$(LIB)
|
||
|
|
||
|
all: $(LIB)
|
||
|
|
||
|
libsfml-audio.so: $(OBJ)
|
||
|
$(CPP) $(LDFLAGS) -Wl,-soname,$(LIBNAME) -o $(FULLLIBNAME) $(OBJ) -lsndfile -lopenal
|
||
|
|
||
|
$(OBJ): %.o: %.cpp
|
||
|
$(CPP) -o $@ -c $< $(CFLAGS)
|
||
|
|
||
|
.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)
|