# # AST MODULE # include ../../Makefile.inc CPPFLAGS = $(PRJCFLAGS) \ -I.. \ `pkg-config $(PROTOBUFFLAGS) --cflags $(PROTOBUFCONFIG)` OBJLIBS = $(BUILDOUTPUTDIR)/libast.a OBJOUTPUTDIR:=$(OBJOUTPUTDIR)/ast OBJS = \ $(OBJOUTPUTDIR)/serialize/gen/FunctionNames.pb.o \ $(OBJOUTPUTDIR)/serialize/gen/Record.pb.o \ $(OBJOUTPUTDIR)/serialize/ProtoBufAstTraversal.o \ $(OBJOUTPUTDIR)/AstFactory.o \ $(OBJOUTPUTDIR)/CompleteAstTraversalVisitor.o \ $(OBJOUTPUTDIR)/ExpressionVisitor.o \ $(OBJOUTPUTDIR)/StatementVisitor.o \ $(OBJOUTPUTDIR)/PrintVisitor.o \ $(OBJOUTPUTDIR)/Ast.o \ $(OBJOUTPUTDIR)/DeepCloneVisitor.o \ $(OBJOUTPUTDIR)/expressions/Expression.o \ $(OBJOUTPUTDIR)/identifiers/Identifier.o \ $(OBJOUTPUTDIR)/statements/Statement.o \ $(OBJOUTPUTDIR)/types/Type.o \ $(OBJOUTPUTDIR)/types/ActionSystemType.o \ $(OBJOUTPUTDIR)/SymbolTable.o all : subdirs $(OBJLIBS) $(BUILDOUTPUTDIR)/%.a : $(OBJS) $(ECHO) $(AR) $(ARFLAGS) rv $@ $? $(AR) $(ARFLAGS) rv $@ $? $(ECHO) $(RANLIB) $@ $(RANLIB) $@ subdirs: mkdir -p $(OBJOUTPUTDIR)/expressions mkdir -p $(OBJOUTPUTDIR)/identifiers mkdir -p $(OBJOUTPUTDIR)/statements mkdir -p $(OBJOUTPUTDIR)/types mkdir -p $(OBJOUTPUTDIR)/serialize mkdir -p $(OBJOUTPUTDIR)/serialize/gen clean : $(ECHO) cleaning up in ast -$(RM) -f $(OBJS) # pull in dependency info for *existing* .o files -include $(OBJS:.o=.d) force_look : true include ../../Makefile.rules # Default rule to compile a cc file (generated by protoc) $(OBJOUTPUTDIR)/%.o: %.cc $(HEADERS) $(ECHO) " compiling $@" $(CC) -fPIC -c -o $@ $< $(CPPFLAGS) $(CC) -fPIC -MT $@ -MM $(CPPFLAGS) $< > $(@:.o=.d)