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