stratgame
annotate common/Makefile @ 3:8d95187cb3ee
foo
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Wed, 23 May 2012 17:10:46 +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) |