stratgame
diff common/Makefile @ 2:369b51c9e4a8
foo
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Wed, 23 May 2012 07:25:43 +0300 |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/common/Makefile Wed May 23 07:25:43 2012 +0300 1.3 @@ -0,0 +1,23 @@ 1.4 +ccsrc = $(wildcard src/*.cc) 1.5 +obj = $(ccsrc:.cc=.o) 1.6 +dep = $(obj:.o=.d) 1.7 +lib_a = libcommon.a 1.8 + 1.9 +CXXFLAGS = -std=c++0x -pedantic -Wall -g 1.10 + 1.11 +ifeq ($(shell uname -s), Darwin) 1.12 + CC = clang 1.13 + CXX = clang++ 1.14 +endif 1.15 + 1.16 +$(lib_a): $(obj) 1.17 + $(AR) rcs $@ $(obj) 1.18 + 1.19 +-include $(dep) 1.20 + 1.21 +%.d: %.cc 1.22 + @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@ 1.23 + 1.24 +.PHONY: clean 1.25 +clean: 1.26 + rm -f $(obj) $(bin) $(dep)