]> git.donarmstrong.com Git - lilypond.git/blob - lily/GNUmakefile
* lily/GNUmakefile (OUT_DIST_FILES): Bugfix.
[lilypond.git] / lily / GNUmakefile
1
2 depth = ..
3
4 NAME = lilypond
5 SUBDIRS = include
6
7 MODULE_LIBS=  $(depth)/flower   $(depth)/kpath-guile 
8 MODULE_INCLUDES= $(depth)/flower/include 
9
10 # need this to convert between function pointers and member function pointers.
11 MODULE_CXXFLAGS= -Wno-pmf-conversions
12
13
14 HELP2MAN_EXECS = lilypond
15 STEPMAKE_TEMPLATES=c c++ executable po help2man
16
17 # list parser.hh first: making parser.hh removes parser.cc
18 OUT_DIST_FILES=$(addprefix $(outdir)/,parser.hh parser.cc)
19
20 include $(depth)/make/stepmake.make 
21
22 ifeq ($(HAVE_LIBKPATHSEA_SO),no)
23 MODULE_LDFLAGS += $(KPATHSEA_LIBS)
24 endif
25 ifeq ($(LINK_GXX_STATICALLY),yes)
26 MODULE_LDFLAGS += -L$(outdir) -static-libgcc
27 endif
28
29
30
31 # for profiling, link guile statically:
32 #
33 # CONFIG_LDFLAGS += -static -lltdl -ldl
34 #
35
36 ifeq ($(PLATFORM_WINDOWS),yes)
37 WINDRES_FLAGS += -DLilyPond=0 -DLY=1
38 O_FILES += $(outdir)/lilypond.rc.o
39 $(outdir)/lilypond: $(outdir)/lilypond.rc.o
40
41 $(outdir)/lilypond.rc.o: $(outdir)/lilypond.ico $(outdir)/ly.ico
42 $(top-build-dir)/Documentation/pictures/$(outbase)/lilypond.ico:
43         $(MAKE) -C $(top-src-dir)/Documentation/pictures
44 $(outdir)/lilypond.ico: $(top-build-dir)/Documentation/pictures/$(outbase)/lilypond.ico
45         cp $< $@ 
46 $(top-build-dir)/Documentation/pictures/$(outbase)/ly.ico:
47         $(MAKE) -C $(top-src-dir)/Documentation/pictures
48 $(outdir)/ly.ico: $(top-build-dir)/Documentation/pictures/$(outbase)/ly.ico
49         cp $< $@ 
50 endif
51
52 ETAGS_FLAGS += --regex='{c++}/^LY_DEFINE *(\([^,]+\)/\1/'
53 ETAGS_FLAGS += --regex='{c++}/^LY_DEFINE *([^"]*"\([^"]+\)"/\1/'
54
55 default:
56
57
58 $(outdir)/libstdc++.a:
59         rm -f $@
60         ln -s `$(CXX) -print-file-name=libstdc++.a` $(outdir)/
61
62 ifeq ($(LINK_GXX_STATICALLY),yes)
63 $(outdir)/lilypond: $(outdir)/libstdc++.a
64 endif
65
66 # force these: Make can't know these have to be generated in advance
67 $(outdir)/lily-parser.o: $(outdir)/parser.hh
68 $(outdir)/lily-lexer.o: $(outdir)/parser.hh $(outdir)/FlexLexer.h
69 $(outdir)/lexer.o: $(outdir)/parser.hh $(outdir)/version.hh
70
71 ifneq ($(FLEXLEXER_PATH),)
72 $(outdir)/FlexLexer.h: $(FLEXLEXER_PATH)/FlexLexer.h
73         cp $<  $@
74 endif
75
76
77
78 $(outdir)/general-scheme.o: $(outdir)/version.hh
79 $(outdir)/kpath.o: $(outdir)/version.hh
80 $(outdir)/lily-guile.o: $(outdir)/version.hh
81 $(outdir)/lily-version.o: $(outdir)/version.hh
82
83 local-po: $(outdir)/parser.cc
84
85 # ugh.  For --srcdir builds, these must exist to satisfy their broken
86 # lexer.dep and parser.dep file entries.
87 ifneq ($(configure-srcdir),.)
88 .PRECIOUS: $(outdir)/lexer.cc $(outdir)/parser.cc
89 endif