miniassimp
diff Makefile @ 0:879c81d94345
initial commit
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Mon, 28 Jan 2019 18:19:26 +0200 |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/Makefile Mon Jan 28 18:19:26 2019 +0200 1.3 @@ -0,0 +1,43 @@ 1.4 +src = $(wildcard src/*.cpp) 1.5 +obj = $(src:.cpp=.o) 1.6 +dep = $(obj:.o=.d) 1.7 + 1.8 +name = miniassimp 1.9 +so_major = 0 1.10 +so_minor = 1 1.11 + 1.12 +liba = lib$(name).a 1.13 +libso = lib$(name).so 1.14 +ldname = lib$(name).so.$(so_major) 1.15 +soname = lib$(name).so.$(so_major).$(so_minor) 1.16 + 1.17 +warn = -pedantic -Wall 1.18 +dbg = -g 1.19 +opt = -O0 1.20 +inc = -Iinclude 1.21 + 1.22 +CC=gcc 1.23 +CXX=g++ 1.24 +CFLAGS = $(warn) $(dbg) $(opt) $(def) $(inc) 1.25 +CXXFLAGS = $(warn) $(dbg) $(opt) $(def) $(inc) 1.26 + 1.27 +shared = -shared -Wl,-soname,$(soname) 1.28 + 1.29 +.PHONY: all 1.30 +all: $(libso) $(liba) 1.31 + 1.32 +$(liba): $(obj) 1.33 + $(AR) rcs $@ $(obj) 1.34 + 1.35 +$(libso): $(obj) 1.36 + $(CC) -o $@ $(shared) $(obj) $(LDFLAGS) 1.37 + 1.38 +-include $(dep) 1.39 + 1.40 +%.d: %.cpp 1.41 + @echo depfile $@ 1.42 + @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@ 1.43 + 1.44 +.PHONY: clean 1.45 +clean: 1.46 + rm -f $(obj) $(liba) $(libso)