]> git.donarmstrong.com Git - lilypond.git/blob - lily/GNUmakefile
* stepmake/stepmake/*:
[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 OUT_DIST_FILES=$(addprefix $(outdir)/,parser.cc parser.hh )
18
19 include $(depth)/make/stepmake.make 
20
21 ifeq ($(HAVE_LIBKPATHSEA_SO),no)
22 MODULE_LDFLAGS += $(KPATHSEA_LIBS)
23 endif
24 ifeq ($(LINK_GXX_STATICALLY),yes)
25 MODULE_LDFLAGS += -L$(outdir) -static-libgcc
26 endif
27
28
29
30 # for profiling, link guile statically:
31 #
32 # CONFIG_LDFLAGS += -static -lltdl -ldl
33 #
34
35 ifeq ($(PLATFORM_WINDOWS),yes)
36 WINDRES_FLAGS += -DLilyPond=0 -DLY=1
37 O_FILES += $(outdir)/lilypond.rc.o
38 $(outdir)/lilypond: $(outdir)/lilypond.rc.o
39
40 $(outdir)/lilypond.rc.o: $(outdir)/lilypond.ico $(outdir)/ly.ico
41 $(top-build-dir)/Documentation/pictures/$(outbase)/lilypond.ico:
42         $(MAKE) -C $(top-src-dir)/Documentation/pictures
43 $(outdir)/lilypond.ico: $(top-build-dir)/Documentation/pictures/$(outbase)/lilypond.ico
44         cp $< $@ 
45 $(top-build-dir)/Documentation/pictures/$(outbase)/ly.ico:
46         $(MAKE) -C $(top-src-dir)/Documentation/pictures
47 $(outdir)/ly.ico: $(top-build-dir)/Documentation/pictures/$(outbase)/ly.ico
48         cp $< $@ 
49 endif
50
51 ETAGS_FLAGS += --regex='{c++}/^LY_DEFINE *(\([^,]+\)/\1/'
52 ETAGS_FLAGS += --regex='{c++}/^LY_DEFINE *([^"]*"\([^"]+\)"/\1/'
53
54 default:
55
56
57 $(outdir)/libstdc++.a:
58         rm -f $@
59         ln -s `$(CXX) -print-file-name=libstdc++.a` $(outdir)/
60
61 ifeq ($(LINK_GXX_STATICALLY),yes)
62 $(outdir)/lilypond: $(outdir)/libstdc++.a
63 endif
64
65 # force these: Make can't know these have to be generated in advance
66 $(outdir)/lily-parser.o: $(outdir)/parser.hh
67 $(outdir)/lily-lexer.o: $(outdir)/parser.hh $(outdir)/FlexLexer.h
68 $(outdir)/lexer.o: $(outdir)/parser.hh $(outdir)/version.hh
69
70 ifneq ($(FLEXLEXER_PATH),)
71 $(outdir)/FlexLexer.h: $(FLEXLEXER_PATH)/FlexLexer.h
72         cp $<  $@
73 endif
74
75
76
77 $(outdir)/general-scheme.o: $(outdir)/version.hh
78 $(outdir)/kpath.o: $(outdir)/version.hh
79 $(outdir)/lily-guile.o: $(outdir)/version.hh
80 $(outdir)/lily-version.o: $(outdir)/version.hh
81
82 local-po: $(outdir)/parser.cc
83
84 # ugh.  For --srcdir builds, these must exist to satisfy their broken
85 # lexer.dep and parser.dep file entries.
86 ifneq ($(configure-srcdir),.)
87 .PRECIOUS: $(outdir)/lexer.cc $(outdir)/parser.cc
88 endif
89
90
91 foe:
92         @echo b:$(build-dir)
93         @echo s:$(src-dir)
94         @echo t:$(tree-dir)