stratgame
annotate common/Makefile @ 5:2e38715de41b
terrain
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 27 May 2012 07:00:48 +0300 |
parents | |
children |
rev | line source |
---|---|
nuclear@2 | 1 ccsrc = $(wildcard src/*.cc) |
nuclear@2 | 2 obj = $(ccsrc:.cc=.o) |
nuclear@2 | 3 dep = $(obj:.o=.d) |
nuclear@2 | 4 lib_a = libcommon.a |
nuclear@2 | 5 |
nuclear@2 | 6 CXXFLAGS = -std=c++0x -pedantic -Wall -g |
nuclear@2 | 7 |
nuclear@2 | 8 ifeq ($(shell uname -s), Darwin) |
nuclear@2 | 9 CC = clang |
nuclear@2 | 10 CXX = clang++ |
nuclear@2 | 11 endif |
nuclear@2 | 12 |
nuclear@2 | 13 $(lib_a): $(obj) |
nuclear@2 | 14 $(AR) rcs $@ $(obj) |
nuclear@2 | 15 |
nuclear@2 | 16 -include $(dep) |
nuclear@2 | 17 |
nuclear@2 | 18 %.d: %.cc |
nuclear@2 | 19 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@ |
nuclear@2 | 20 |
nuclear@2 | 21 .PHONY: clean |
nuclear@2 | 22 clean: |
nuclear@2 | 23 rm -f $(obj) $(bin) $(dep) |