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): $(build) $(OFILES) $(outdir)/version.hh
34 $(MAKE) $(MODULE_LIBDEPS)
36 $(MAKE) -S $(OFILES) $(SILENT_LOG)
38 $(DO_STRIP) $(STABLEOBS)
40 $(LD_COMMAND) $(OFILES) $(LOADLIBES)
44 $(build): $(depth)/VERSION
47 # dependency list of library:
49 LIBRARY = $(outdir)/$(LIB_PREFIX)$(NAME).a
50 $(LIBRARY): $(build) $(OFILES)
52 $(MAKE) $(OFILES) $(SILENT_LOG)
53 $(AR_COMMAND) $(OFILES)
56 SHAREDLIBRARY=$(outdir)/$(LIB_PREFIX)$(NAME).so
57 $(SHAREDLIBRARY): $(build) $(OFILES) $(MODULE_LIBDEPS)
59 $(MAKE) $(OFILES) $(SILENT_LOG)
60 $(LD_COMMAND) $(OFILES) -o $@
61 # ln -sf $(outdir)/$(LIB_PREFIX)$(NAME).so.$(VERSION) $(outdir)/$(LIB_PREFIX)$(NAME).so
66 # be careful about deletion.
79 set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i clean; done
90 dummydep: $(DUMMYDEPS)
93 # value of $(OSTYPE) on windhoos...; "make $OSTYPE" if you use bash :-)
95 win32: windows32 # win/lose?
98 $(MAKE) -C . "CXX=g++ -D_WINDOWS32"
105 $(MAKE) -C . CXX="gcc-go32 -I/usr/i386-go32/include -I/usr/i386-go32/include/g++ -D_WINDOWS32 -Dcaddr_t=char* -DMAP_SHARED=0"
112 @echo " $(MAKE) ["VARIABLE=value" ...] [target]"
115 @echo " all clean config dist distclean doc doc++"
116 @echo " exe help lib moduledist 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/
129 chmod -Rf a+rX $(distdir)
131 (cd ./$(depth)/$(outdir); $(TAR) cf - $(DIST_NAME) | gzip -9 > $(DIST_NAME).tar.gz)
136 # ugh. should generate in out/
140 # nogo, SUBDIRS is handed down to subdir...
141 # $(MAKE) SUBDIRS="Documentation init input tex" localdist
143 chmod -Rf a+rX $(distdir)
144 # ugh, the ugly way, then
145 (cd $(distdir); rm -rf $(NO_DOOS_DIST))
146 cp $(lilyout)/lilypond.exe $(distdir)
147 strip -s $(distdir)/lilypond.exe
148 cp $(mi2muout)/mi2mu.exe $(distdir)
149 strip -s $(distdir)/mi2mu.exe
150 (cd ./$(depth); $(ZIP) $(DIST_NAME).exe.zip $(distdir))
155 localdist: $(DISTFILES)
156 if [ -d out ]; then \
157 mkdir $(distdir)/$(localdir)/out; \
158 touch $(distdir)/$(localdir)/out/dummy.dep; \
160 $(LN) $(DISTFILES) $(distdir)/$(localdir)
162 set -e; for i in $(SUBDIRS); do mkdir $(distdir)/$(localdir)/$$i; \
163 $(MAKE) localdir=$(localdir)/$$i -C $$i localdist; done
167 -mkdir $(module-distdir)
168 $(MAKE) localmoduledist
169 (cd $(depth)/$(outdir); $(TAR) cfz $(MODULE_DIST_NAME).tar.gz $(MODULE_DIST_NAME))
170 rm -rf $(module-distdir)/
173 $(LN) $(DISTFILES) $(module-distdir)/$(localdir)
175 set -e; for i in $(SUBDIRS); do mkdir $(module-distdir)/$(localdir)/$$i; done
176 set -e; for i in $(SUBDIRS); do $(MAKE) localdir=$(localdir)/$$i -C $$i localmoduledist; done
179 TAGS:$(all-tag-sources)
180 ifdef all-tag-sources
181 -etags -CT $(all-tag-sources) $(ERROR_LOG)
182 -ctags -CT $(all-tag-sources) $(ERROR_LOG)
185 set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i TAGS ; done
192 $(outdir)/version.hh: VERSION
193 sh ./$(lily_bindir)/make-version.sh > $@
196 # should this be in Rules?
197 configure: configure.in aclocal.m4
204 $(MAKE) INSTALL="$(INSTALL) -s" install
206 install: localinstall
208 set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i install; done
213 uninstall: localuninstall
215 set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i uninstall; done
222 $(LIBFLOWER): check-flower-deps
225 $(MAKE) -C $(depth)/flower/ default
227 check-lib-deps: check-flower-deps
228 $(MAKE) -C $(depth)/lib
231 $(MAKE) -C $(depth)/Documentation
234 $(MAKE) ./$(outdir)/$(@F) -C $(depth)/lib
237 # RedHat rpm package:
239 rpm: check-rpm-doc-deps
240 -cp $(depth)/lilypond-$(TOPLEVEL_VERSION).tar.gz $(rpm-sources)
241 # -cp $(wildcard $(depth)/Documentation/*.xpm) $(rpm-sources)
242 -cp $(wildcard $(depth)/Documentation/$(outdir)/*.gif) $(rpm-sources)
243 $(MAKE) -C $(make-dir) spec
244 rpm -ba $(makeout)/lilypond.spec
247 $(MAKE) -C $(depth)/Documentation gifs
250 $(MAKE) -C $(depth)/mf
255 $(INSTALL) -d $(bindir)
256 $(INSTALL) -m 755 $(EXECUTABLES) $(bindir)
259 for a in $(EXECUTABLES); do rm -f $(bindir)/`basename $$a`; done