stratgame
view gfx/Makefile @ 3:8d95187cb3ee
foo
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Wed, 23 May 2012 17:10:46 +0300 |
parents | |
children |
line source
1 csrc = $(wildcard src/*.c)
2 ccsrc = $(wildcard src/*.cc)
3 obj = $(ccsrc:.cc=.o) $(csrc:.c=.o)
4 dep = $(obj:.o=.d)
5 lib_a = libgfx.a
7 CFLAGS = -pedantic -Wall -g -I../common/src
8 CXXFLAGS = -std=c++0x $(CFLAGS)
10 ifeq ($(shell uname -s), Darwin)
11 CC = clang
12 CXX = clang++
13 endif
15 $(lib_a): $(obj)
16 $(AR) rcs $@ $(obj)
18 -include $(dep)
20 %.d: %.c
21 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
23 %.d: %.cc
24 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
26 .PHONY: clean
27 clean:
28 rm -f $(obj) $(bin) $(dep)