]> git.donarmstrong.com Git - lilypond.git/blobdiff - stepmake/stepmake/c++-rules.make
Merge branch 'lilypond/translation'
[lilypond.git] / stepmake / stepmake / c++-rules.make
index 1c7a0cc0db3e7ac959aea503dd6982237ea79080..25c1d1207a643b4c5d4eae985d22e499b28b4b6c 100644 (file)
@@ -1,21 +1,22 @@
-.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)/%.cc: %.yy
-       $(BISON) $<
-       mv $<.tab.c $@
+$(outdir)/%.lo: %.cc
+       $(DO_LO_DEP) $(CXX) -c $(ALL_CXXFLAGS) $(PIC_FLAGS) -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 
+$(outdir)/%.lo: $(outdir)/%.cc
+       $(DO_LO_DEP) $(CXX) -c $(ALL_CXXFLAGS) $(PIC_FLAGS) -o $@ $<
+
+$(outdir)/%.cc $(outdir)/%.hh: %.yy
+       $(BISON) -d -o $(subst .hh,.cc,$@)  $<
 
 $(outdir)/%.cc: %.ll
-       $(FLEX) -Cfe -p -p -t $< > $@
+       $(FLEX) -Cfe -p -p -o$@ $<
+
+$(outdir)/%-rc.o: $(outdir)/%.rc
+       $(WINDRES) $(WINDRES_FLAGS) -o$@ $<