stratgame

annotate gfx/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@3 1 csrc = $(wildcard src/*.c)
nuclear@3 2 ccsrc = $(wildcard src/*.cc)
nuclear@3 3 obj = $(ccsrc:.cc=.o) $(csrc:.c=.o)
nuclear@3 4 dep = $(obj:.o=.d)
nuclear@3 5 lib_a = libgfx.a
nuclear@3 6
nuclear@3 7 CFLAGS = -pedantic -Wall -g -I../common/src
nuclear@3 8 CXXFLAGS = -std=c++0x $(CFLAGS)
nuclear@3 9
nuclear@3 10 ifeq ($(shell uname -s), Darwin)
nuclear@3 11 CC = clang
nuclear@3 12 CXX = clang++
nuclear@3 13 endif
nuclear@3 14
nuclear@3 15 $(lib_a): $(obj)
nuclear@3 16 $(AR) rcs $@ $(obj)
nuclear@3 17
nuclear@3 18 -include $(dep)
nuclear@3 19
nuclear@3 20 %.d: %.c
nuclear@3 21 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
nuclear@3 22
nuclear@3 23 %.d: %.cc
nuclear@3 24 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
nuclear@3 25
nuclear@3 26 .PHONY: clean
nuclear@3 27 clean:
nuclear@3 28 rm -f $(obj) $(bin) $(dep)