]> git.donarmstrong.com Git - lilypond.git/blobdiff - stepmake/stepmake/c++-rules.make
Merge remote-tracking branch 'origin/translation' into master
[lilypond.git] / stepmake / stepmake / c++-rules.make
index 83b54258e0cbcf52fd25be9e72cd88c7de796710..a368f4f6669b6e2d223604bce7507c824c4e8f79 100644 (file)
@@ -1,24 +1,27 @@
-# title           C++ rules
-# file    make/C++_rules.make
+.SUFFIXES: .cc .dep .hh .ll .o .so .yy
 
-.SUFFIXES: .cc .o .hh .yy .ll  .dep
-
-# 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$@ $<