]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/GNUmakefile
* Documentation/topdocs/INSTALL.texi (Top): remove Flex
[lilypond.git] / lily / GNUmakefile
index 0a05b2684968ebd32c77b39796a6290ea2f0e66e..8e8025db6dcab9ec2372cddd6d9b19905c24a444 100644 (file)
@@ -1,72 +1,67 @@
-# lilypond/GNUmakefile
-#
-# 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.
 
-# automake/wild-make should generate this file from Makefile.am.wild
+depth = ..
 
-#ugh
-Makefile=$(wildcard Makefile)
-# are we configured here, or are we using --srcdir
-ifeq ($(Makefile),Makefile)
+NAME = lilypond
+SUBDIRS = include
 
-include Makefile
+MODULE_LIBS= $(depth)/flower  $(depth)/ttftool $(depth)/kpath-guile 
+MODULE_INCLUDES= $(depth)/flower/include $(depth)/ttftool/include 
+MODULE_CXXFLAGS=
 
-biltdir=.
+HELP2MAN_EXECS = lilypond
+STEPMAKE_TEMPLATES=c c++ executable po help2man
 
-else
+OUT_DIST_FILES=$(addprefix $(outdir)/,parser.cc parser.hh FlexLexer.h lexer.cc)
 
-#ugh
-biltdir=../../build/lily
+include $(depth)/make/stepmake.make 
 
-make-in-build: wild-check
-       echo exec $(MAKE) -C $(biltdir)
-       exec $(MAKE) -C $(biltdir)
+ifeq ($(HAVE_LIBKPATHSEA_SO),no)
+MODULE_LDFLAGS+= $(KPATHSEA_LIBS)
+endif
 
-include $(biltdir)/Makefile
 
-clean: wild-check
-       exec $(MAKE) -C $(biltdir) $@
+# for profiling, link guile statically:
+#
+# USER_LDFLAGS += -static -lltdl -ldl
+#
 
-dist: wild-check
-       exec $(MAKE) -C $(biltdir) $@
+ifeq ($(PLATFORM_WINDOWS),yes)
+WINDRES_FLAGS += -DLilyPond=1
+O_FILES += $(outdir)/lilypond.rc.o
+$(outdir)/lilypond: $(outdir)/lilypond.rc.o
 
-distclean: wild-check
-       exec $(MAKE) -C $(biltdir) $@
+$(outdir)/lilypond.rc.o: $(outdir)/lilypond.ico
+$(builddir)/Documentation/pictures/$(outbase)/lilypond.ico:
+       $(MAKE) -C $(abs-srcdir)/Documentation/pictures
+$(outdir)/lilypond.ico: $(builddir)/Documentation/pictures/$(outbase)/lilypond.ico
+       cp $< $@ 
+endif
 
-lexer.cc: wild-check
-       exec $(MAKE) -C $(biltdir) $@
+ETAGS_FLAGS += --regex='{c++}/^LY_DEFINE *(\([^,]+\)/\1/'
+ETAGS_FLAGS += --regex='{c++}/^LY_DEFINE *([^"]*"\([^"]+\)"/\1/'
 
-parser.hh: wild-check
-       exec $(MAKE) -C $(biltdir) $@
+default:
 
-parser.cc: wild-check
-       exec $(MAKE) -C $(biltdir) $@
+# force these: Make can't know these have to be generated in advance
+$(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
 
-#ugh OMIT_DEPENDENCIES does not seem to work
-.deps/lexer.P:
-       exec $(MAKE) -C $(biltdir) $@
+$(outdir)/FlexLexer.h: $(FLEXLEXER_PATH)/FlexLexer.h
+       cp $<  $@
 
-.deps/parser.P:
-       exec $(MAKE) -C $(biltdir) $@
 
-endif
 
-# Makefile.am.wild: lilypond_SOURCES = $(wildcard *.cc *.ll *.yy)
-# ugh
-CURRENT_lilypond_SOURCES = $(wildcard *.cc lexer.ll parser.yy)
+$(outdir)/general-scheme.o: $(outdir)/version.hh
+$(outdir)/kpath.o: $(outdir)/version.hh
+$(outdir)/lily-guile.o: $(outdir)/version.hh
+$(outdir)/lily-version.o: $(outdir)/version.hh
 
-# ugh: stupid lexer.cc/parser.cc cluttering sourcedir!
-wild-check: check-lilypond-sources
+local-po: $(outdir)/parser.cc
 
-check-lilypond-sources:
-ifneq ($(lilypond_SOURCES),$(filter-out $(IGNORE_WILDCARDS), $(CURRENT_lilypond_SOURCES)))
-       @echo \"$(lilypond_SOURCES)\"
-       @echo \"$(CURRENT_lilypond_SOURCES)\"
-       @echo  lilypond_SOURCES changed: rerunning make-wild.
-       @-rm -f Makefile.am
-       $(PERL) $(top_srcdir)/bin/wild-perl < Makefile.am.wild > Makefile.am
+# ugh.  For --srcdir builds, these must exist to satisfy their broken
+# lexer.dep and parser.dep file entries.
+ifneq ($(srcdir), .)
+.PRECIOUS: $(outdir)/lexer.cc $(outdir)/parser.cc
 endif