miniassimp

view Makefile @ 0:879c81d94345

initial commit
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 28 Jan 2019 18:19:26 +0200
parents
children
line source
1 src = $(wildcard src/*.cpp)
2 obj = $(src:.cpp=.o)
3 dep = $(obj:.o=.d)
5 name = miniassimp
6 so_major = 0
7 so_minor = 1
9 liba = lib$(name).a
10 libso = lib$(name).so
11 ldname = lib$(name).so.$(so_major)
12 soname = lib$(name).so.$(so_major).$(so_minor)
14 warn = -pedantic -Wall
15 dbg = -g
16 opt = -O0
17 inc = -Iinclude
19 CC=gcc
20 CXX=g++
21 CFLAGS = $(warn) $(dbg) $(opt) $(def) $(inc)
22 CXXFLAGS = $(warn) $(dbg) $(opt) $(def) $(inc)
24 shared = -shared -Wl,-soname,$(soname)
26 .PHONY: all
27 all: $(libso) $(liba)
29 $(liba): $(obj)
30 $(AR) rcs $@ $(obj)
32 $(libso): $(obj)
33 $(CC) -o $@ $(shared) $(obj) $(LDFLAGS)
35 -include $(dep)
37 %.d: %.cpp
38 @echo depfile $@
39 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
41 .PHONY: clean
42 clean:
43 rm -f $(obj) $(liba) $(libso)