X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2FGNUmakefile;h=ea7785b947c687e39f0ce73cb5c94b29600bb657;hb=09ae845ea458bc35ffa486b4bcac25c88e2fb856;hp=0fe59e0fe13af6cd6d9f35948ca8bb59c7589d1f;hpb=dbe2d4d495590abfa3829f93c99c2ae3a71841f3;p=lilypond.git diff --git a/lily/GNUmakefile b/lily/GNUmakefile index 0fe59e0fe1..ea7785b947 100644 --- a/lily/GNUmakefile +++ b/lily/GNUmakefile @@ -1,31 +1,94 @@ -# lilypond/GNUmakefile + +depth = .. + +NAME = lilypond +SUBDIRS = include + +MODULE_LIBS=$(depth)/flower +MODULE_INCLUDES= $(depth)/flower/include + +# 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 + +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: # -# This file helps maintainers to keep their Makefile.am automatically -# up to date using GNU make features. -# If you don't have (or run) GNU make, Makefile.am will not be updated -# automatically when source files are added/removed. +# 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 + +$(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 + +$(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 + +$(outdir)/ly.ico: $(top-build-dir)/Documentation/logo/$(outbase)/ly.ico + cp $< $@ +endif -# automake/wild-make should generate this file from Makefile.am.wild +ETAGS_FLAGS += --regex='{c++}/^LY_DEFINE *(\([^,]+\)/\1/' +ETAGS_FLAGS += --regex='{c++}/^LY_DEFINE *([^"]*"\([^"]+\)"/\1/' -include Makefile +default: -# Makefile.am.wild: lilypond_SOURCES = $(wildcard *.cc) -CURRENT_lilypond_SOURCES = $(wildcard *.cc) -# ugh: there is a dummy file 'wild-check' to satisfy the wild-check target -# for non-GNU makes in Makefile(.test) -# but we'll ignore that -# .PHONY: wild-check +$(outdir)/libstdc++.a: + rm -f $@ + ln -s `$(CXX) -print-file-name=libstdc++.a` $(outdir) -# ugh: stupid lexer.cc/parser.cc cluttering sourcedir! -# but it works fine in other dirs (see ../mi2mu) -# wild-check: check-lilypond-sources +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)/lily-parser.o $(outdir)/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)/lily-lexer-scheme.o \ + $(outdir)/lily-parser-scheme.o \ + $(outdir)/parse-scm.o: $(outdir)/parser.hh -check-lilypond-sources: -ifneq ($(lilypond_SOURCES),$(CURRENT_mi2mu_SOURCES)) - @echo \"$(lilypond_SOURCES)\" - @echo \"$(CURRENT_lilypond_SOURCES)\" - @echo lilypond_SOURCES changed: NOT yet rerunning make-wild. Please type: - @echo "$(PERL) $(top_srcdir)/bin/wild-perl < Makefile.am.wild > Makefile.am" +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 +$(outdir)/main.o: $(outdir)/version.hh +$(outdir)/relocate.o: $(outdir)/version.hh +$(outdir)/warn-scheme.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