X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=lily%2FGNUmakefile;h=4056eefb938bf6de297735f2202a6d44f8802be2;hb=aeca8fad67c65a7d6e8a6e943d0d9f050e6a67c5;hp=edc0c0ae6e3a10ad6a37a88c8acd08f43da5f750;hpb=ce521e79fd7669b45c8c1132e4b5693a03b5d90a;p=lilypond.git diff --git a/lily/GNUmakefile b/lily/GNUmakefile index edc0c0ae6e..4056eefb93 100644 --- a/lily/GNUmakefile +++ b/lily/GNUmakefile @@ -4,22 +4,86 @@ depth = .. NAME = lilypond SUBDIRS = include -MODULE_LIBS=$(depth)/flower +MODULE_LIBS=$(depth)/flower MODULE_INCLUDES= $(depth)/flower/include -MODULE_CXXFLAGS= + +# need this to convert between function pointers and member function pointers. +MODULE_CXXFLAGS= -Wno-pmf-conversions + + HELP2MAN_EXECS = lilypond +STEPMAKE_TEMPLATES=c c++ executable po help2man + +# list parser.hh first: making parser.hh removes parser.cc +OUT_DIST_FILES=$(addprefix $(outdir)/,parser.hh parser.cc) + +include $(depth)/make/stepmake.make + +ifeq ($(LINK_GXX_STATICALLY),yes) +MODULE_LDFLAGS += -L$(outdir) -static-libgcc +endif + +CXXFLAGS += -Woverloaded-virtual + + +# for profiling, link guile statically: +# +# CONFIG_LDFLAGS += -static -lltdl -ldl +# + +ifeq ($(PLATFORM_WINDOWS),yes) +WINDRES_FLAGS += -DLilyPond=0 -DLY=1 +O_FILES += $(outdir)/lilypond.rc.o +$(outdir)/lilypond: $(outdir)/lilypond.rc.o -STEPMAKE_TEMPLATES= c++ executable po help2man +$(outdir)/lilypond.rc.o: $(outdir)/lilypond.ico $(outdir)/ly.ico +$(top-build-dir)/Documentation/logo/$(outbase)/lilypond.ico: + $(MAKE) -C $(top-build-dir)/Documentation/logo -include $(depth)/make/stepmake.make +$(outdir)/lilypond.ico: $(top-build-dir)/Documentation/logo/$(outbase)/lilypond.ico + cp $< $@ +$(top-build-dir)/Documentation/logo/$(outbase)/ly.ico: + $(MAKE) -C $(top-build-dir)/Documentation/logo -default: +$(outdir)/ly.ico: $(top-build-dir)/Documentation/logo/$(outbase)/ly.ico + cp $< $@ +endif + +ETAGS_FLAGS += --regex='{c++}/^LY_DEFINE *(\([^,]+\)/\1/' +ETAGS_FLAGS += --regex='{c++}/^LY_DEFINE *([^"]*"\([^"]+\)"/\1/' + +default: + + +$(outdir)/libstdc++.a: + rm -f $@ + ln -s `$(CXX) -print-file-name=libstdc++.a` $(outdir) + +ifeq ($(LINK_GXX_STATICALLY),yes) +$(outdir)/lilypond: $(outdir)/libstdc++.a +endif # force these: Make can't know these have to be generated in advance -$(outdir)/my-lily-parser.o: $(outdir)/parser.hh -$(outdir)/my-lily-lexer.o: $(outdir)/parser.hh -$(outdir)/lexer.o: $(outdir)/parser.hh +$(outdir)/lily-parser.o: $(outdir)/parser.hh +$(outdir)/lily-lexer.o: $(outdir)/parser.hh $(outdir)/FlexLexer.h +$(outdir)/lexer.o: $(outdir)/parser.hh $(outdir)/version.hh -$(outdir)/kpath.o: $(outdir)/version.hh +ifneq ($(FLEXLEXER_FILE),) +$(outdir)/FlexLexer.h: $(FLEXLEXER_FILE) $(config_h) + cp $< $@ +endif + +$(outdir)/lexer.cc: $(config_h) +$(outdir)/parser.cc: $(config_h) + +$(outdir)/general-scheme.o: $(outdir)/version.hh $(outdir)/lily-guile.o: $(outdir)/version.hh $(outdir)/lily-version.o: $(outdir)/version.hh + +local-po: $(outdir)/parser.cc + +# ugh. For --srcdir builds, these must exist to satisfy their broken +# lexer.dep and parser.dep file entries. +ifneq ($(configure-srcdir),.) +.PRECIOUS: $(outdir)/lexer.cc $(outdir)/parser.cc +endif