stratgame

view gfx/Makefile @ 4:cd12944a8ea8

foo
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 25 May 2012 05:28:20 +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)