-.SUFFIXES: .cc .o .hh .yy .ll .dep
+.SUFFIXES: .cc .dep .hh .ll .o .so .yy
-# compile rules:
-#
$(outdir)/%.o: %.cc
- $(DO_CXX_COMPILE)
+ $(DO_O_DEP) $(CXX) -c $(ALL_CXXFLAGS) -o $@ $<
$(outdir)/%.o: $(outdir)/%.cc
- $(DO_CXX_COMPILE)
+ $(DO_O_DEP) $(CXX) -c $(ALL_CXXFLAGS) -o $@ $<
+
+$(outdir)/%.lo: %.cc
+ $(DO_LO_DEP) $(CXX) -c $(ALL_CXXFLAGS) $(PIC_FLAGS) -o $@ $<
+
+$(outdir)/%.lo: $(outdir)/%.cc
+ $(DO_LO_DEP) $(CXX) -c $(ALL_CXXFLAGS) $(PIC_FLAGS) -o $@ $<
$(outdir)/%.cc: %.yy
- $(BISON) $<
- mv $<.tab.c $@
+ $(BISON) -o $@ $<
$(outdir)/%.hh: %.yy
- $(BISON) -d $<
- mv $<.tab.h $@
- rm $<.tab.c # if this happens in the wrong order it triggers recompile of the .cc file
+ $(BISON) -o $(subst .hh,-tmp.cc,$@) -d $<
+ rm $(subst .hh,-tmp.cc,$@)
+ mv $(subst .hh,-tmp.hh,$@) $@
$(outdir)/%.cc: %.ll
- $(FLEX) -Cfe -p -p -t $< > $@
+ $(FLEX) -Cfe -p -p -o$@ $<
+
+$(outdir)/%-rc.o: $(outdir)/%.rc
+ $(WINDRES) $(WINDRES_FLAGS) -o$@ $<