.SUFFIXES: .cc .dep .hh .ll .o .so .yy
$(outdir)/%.o: %.cc
- $(DO_O_DEP) $(CXX) -c $(CXXFLAGS) -o $@ $<
+ $(DO_O_DEP) $(CXX) -c $(ALL_CXXFLAGS) -o $@ $<
$(outdir)/%.o: $(outdir)/%.cc
- $(DO_O_DEP) $(CXX) -c $(CXXFLAGS) -o $@ $<
+ $(DO_O_DEP) $(CXX) -c $(ALL_CXXFLAGS) -o $@ $<
$(outdir)/%.lo: %.cc
- $(DO_LO_DEP) $(CXX) -c $(CXXFLAGS) $(PIC_FLAGS) -o $@ $<
+ $(DO_LO_DEP) $(CXX) -c $(ALL_CXXFLAGS) $(PIC_FLAGS) -o $@ $<
$(outdir)/%.lo: $(outdir)/%.cc
- $(DO_LO_DEP) $(CXX) -c $(CXXFLAGS) $(PIC_FLAGS) -o $@ $<
+ $(DO_LO_DEP) $(CXX) -c $(ALL_CXXFLAGS) $(PIC_FLAGS) -o $@ $<
$(outdir)/%.cc: %.yy
- $(BISON) $<
- @-mv -f parser.tab.c parser.tab.cc # bison < 1.30
- mv parser.tab.cc $@
+ $(BISON) -o $@ $<
+ -mv -f $(*F).yy.tab.c $@ # bison < 1.30
$(outdir)/%.hh: %.yy
- $(BISON) -d $<
- @-mv -f parser.tab.h parser.tab.hh # bison < 1.30
- mv parser.tab.hh $@
- rm -f parser.tab.c parser.tab.cc # if this happens in the wrong order it triggers recompile of the .cc file
+ $(BISON) -o$(outdir)/$(*F).cc -d $<
+ -mv -f $(*F).yy.tab.h $@ # bison < 1.30 ???
+ -mv -f $(outdir)/$(*F).cc.h $@ # bison < 1.30
+ -mv $(*F).tab.hh $@
+ rm -f $(*F).tab.c $(*F).tab.cc # bison < 1.30
+ rm -f $(outdir)/$(*F).cc # avoid recompiling the .cc file
$(outdir)/%.cc: %.ll
- $(FLEX) -Cfe -p -p -t $< > $@
+ $(FLEX) -Cfe -p -p -o$@ $<