CXX=g++ CXXFLAGS=-g -Wall #-Wno-unused SRCS:=Type.cc Constant.cc Expression.cc Statement.cc CodeGenVisitor.cc translate.cc OBJECTS:=$(SRCS:.cc=.o) DEPS:=$(SRCS:.cc=.d) # libSynTree.a: $(OBJECTS) # ar -rs $@ $(OBJECTS) # $(CXX) $(CXXFLAGS) $(OBJS) -o $@ $(EXTRALIBS) %.d: %.cc g++ -M $(CXXFLAGS) $< | sed -e '1s/^\(.*\)\.o/\1.d \1.o/' > $@ all: $(OBJECTS) ifneq ($(MAKECMDGOALS),clean) include $(DEPS) endif clean: rm -f cfa $(OBJECTS) $(DEPS) core