nuclear@3: csrc = $(wildcard src/*.c) nuclear@3: ccsrc = $(wildcard src/*.cc) nuclear@3: obj = $(ccsrc:.cc=.o) $(csrc:.c=.o) nuclear@3: dep = $(obj:.o=.d) nuclear@3: lib_a = libgfx.a nuclear@3: nuclear@3: CFLAGS = -pedantic -Wall -g -I../common/src nuclear@3: CXXFLAGS = -std=c++0x $(CFLAGS) nuclear@3: nuclear@3: ifeq ($(shell uname -s), Darwin) nuclear@3: CC = clang nuclear@3: CXX = clang++ nuclear@3: endif nuclear@3: nuclear@3: $(lib_a): $(obj) nuclear@3: $(AR) rcs $@ $(obj) nuclear@3: nuclear@3: -include $(dep) nuclear@3: nuclear@3: %.d: %.c nuclear@3: @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@ nuclear@3: nuclear@3: %.d: %.cc nuclear@3: @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@ nuclear@3: nuclear@3: .PHONY: clean nuclear@3: clean: nuclear@3: rm -f $(obj) $(bin) $(dep)