2 # project LilyPond -- the musical typesetter
3 # title generic make targets
4 # file make/Targets.make
6 # Copyright (c) 1997 by
7 # Jan Nieuwenhuizen <jan@digicash.com>
8 # Han-Wen Nienhuys <hanwen@stack.nl>
10 .PHONY : all clean config default dist doc doc++ dummy exe help lib TAGS html\
11 check-flower-deps check-lib-deps check-doc-deps
17 set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i all; done
22 # platform specific variables,
24 #include ./$(depth)/make/out/Site.make
28 .PRECIOUS: $(makeout)/Site.make
30 # dependency list of executable:
33 $(EXECUTABLE): $(OFILES) $(outdir)/version.hh
34 $(MAKE) $(MODULE_LIBDEPS)
36 $(DO_STRIP) $(STABLEOBS)
38 $(LD_COMMAND) $(OFILES) $(LOADLIBES)
43 # dependency list of library:
46 $(AR_COMMAND) $(OFILES)
49 $(SHAREDLIBRARY): $(OFILES) $(MODULE_LIBDEPS)
50 $(LD_COMMAND) $(OFILES) -o $@.$(VERSION)
52 ln -sf $(outdir)/$(LIB_PREFIX)$(NAME).so.$(VERSION) $@.$(MAJOR_VERSION)
53 ln -sf $(LIB_PREFIX)$(NAME).so.$(VERSION) $@
60 make-all-outdirs: make-outdir
61 set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i make-all-outdirs; done
66 # be careful about deletion.
69 touch $(outdir)/dummy.dep
71 set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i clean; done
74 distclean: subdir-distclean local-distclean
78 set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i clean; done
89 dummydep: $(DUMMYDEPS)
92 # value of $(OSTYPE) on windhoos...; "make $OSTYPE" if you use bash :-)
94 win32: windows32 # win/lose?
97 $(MAKE) -C . "CXX=g++ -D_WINDOWS32"
104 $(MAKE) -C . CXX="gcc-go32 -I/usr/i386-go32/include -I/usr/i386-go32/include/g++ -D_WINDOWS32 -Dcaddr_t=char* -DMAP_SHARED=0"
110 @echo "Makefile for LilyPond $(TOPLEVEL_VERSION)"
112 @echo " $(MAKE) ["VARIABLE=value" ...] [target]"
115 @echo " all clean config dist distclean doc doc++"
116 @echo " exe help lib TAGS"
117 @echo " dos: xcomplile to dos"
118 @echo " windows32: native cygnus-gnu compile"
122 $(MAKE) -C $(depth)/Documentation do-doc
125 # ugh. should generate in out/
130 chmod -R a+r $(distdir)
131 chmod a+x `find $(distdir) -type d -print`
133 (cd ./$(depth)/$(outdir); $(TAR) cf - $(DIST_NAME) | gzip -9 > $(DIST_NAME).tar.gz)
138 # ugh. should generate in out/
142 # nogo, SUBDIRS is handed down to subdir...
143 # $(MAKE) SUBDIRS="Documentation init input tex" localdist
145 chmod -Rf a+rX $(distdir)
146 # ugh, the ugly way, then
147 (cd $(distdir); rm -rf $(NO_DOOS_DIST))
148 cp $(lilyout)/lilypond.exe $(distdir)
149 strip -s $(distdir)/lilypond.exe
150 cp $(mi2muout)/mi2mu.exe $(distdir)
151 strip -s $(distdir)/mi2mu.exe
152 (cd ./$(depth); $(ZIP) $(DIST_NAME).exe.zip $(distdir))
157 localdist: $(DISTFILES)
158 if [ -d out ]; then \
159 mkdir $(distdir)/$(localdir)/out; \
160 touch $(distdir)/$(localdir)/out/dummy.dep; \
162 $(LN) $(DISTFILES) $(distdir)/$(localdir)
164 set -e; for i in $(SUBDIRS); do mkdir $(distdir)/$(localdir)/$$i; \
165 $(MAKE) localdir=$(localdir)/$$i -C $$i localdist; done
169 TAGS:$(all-tag-sources)
170 ifdef all-tag-sources
171 -etags -CT $(all-tag-sources) $(ERROR_LOG)
172 -ctags -CT $(all-tag-sources) $(ERROR_LOG)
175 set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i TAGS ; done
182 $(outdir)/version.hh: VERSION
183 sh ./$(lily_bindir)/make-version.sh > $@
186 # should this be in Rules?
187 configure: configure.in aclocal.m4
196 $(MAKE) INSTALL="$(INSTALL) -s" install
198 install: localinstall
200 set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i install; done
205 uninstall: localuninstall
207 set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i uninstall; done
214 $(LIBFLOWER): check-flower-deps
217 $(MAKE) -C $(depth)/flower/ default
219 check-lib-deps: check-flower-deps
220 $(MAKE) -C $(depth)/lib
223 $(MAKE) -C $(depth)/Documentation
226 $(MAKE) ./$(outdir)/$(@F) -C $(depth)/lib
229 # RedHat rpm package:
231 rpm: check-rpm-doc-deps
232 -cp $(depth)/lilypond-$(TOPLEVEL_VERSION).tar.gz $(rpm-sources)
233 # -cp $(wildcard $(depth)/Documentation/*.xpm) $(rpm-sources)
234 -cp $(wildcard $(depth)/Documentation/$(outdir)/*.gif) $(rpm-sources)
235 $(MAKE) -C $(make-dir) spec
236 rpm -ba $(makeout)/lilypond.spec
239 $(MAKE) -C $(depth)/Documentation gifs
242 $(MAKE) -C $(depth)/mf