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 $@.$(VERSION)
62 ln -sf $(outdir)/$(LIB_PREFIX)$(NAME).so.$(VERSION) $@.$(MAJOR_VERSION)
63 ln -sf $(LIB_PREFIX)$(NAME).so.$(VERSION) $@
69 # be careful about deletion.
82 set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i clean; done
93 dummydep: $(DUMMYDEPS)
96 # value of $(OSTYPE) on windhoos...; "make $OSTYPE" if you use bash :-)
98 win32: windows32 # win/lose?
101 $(MAKE) -C . "CXX=g++ -D_WINDOWS32"
108 $(MAKE) -C . CXX="gcc-go32 -I/usr/i386-go32/include -I/usr/i386-go32/include/g++ -D_WINDOWS32 -Dcaddr_t=char* -DMAP_SHARED=0"
115 @echo " $(MAKE) ["VARIABLE=value" ...] [target]"
118 @echo " all clean config dist distclean doc doc++"
119 @echo " exe help lib moduledist TAGS"
120 @echo " dos: xcomplile to dos"
121 @echo " windows32: native cygnus-gnu compile"
125 $(MAKE) -C $(depth)/Documentation do-doc
128 # ugh. should generate in out/
132 chmod -Rf a+rX $(distdir)
134 (cd ./$(depth)/$(outdir); $(TAR) cf - $(DIST_NAME) | gzip -9 > $(DIST_NAME).tar.gz)
139 # ugh. should generate in out/
143 # nogo, SUBDIRS is handed down to subdir...
144 # $(MAKE) SUBDIRS="Documentation init input tex" localdist
146 chmod -Rf a+rX $(distdir)
147 # ugh, the ugly way, then
148 (cd $(distdir); rm -rf $(NO_DOOS_DIST))
149 cp $(lilyout)/lilypond.exe $(distdir)
150 strip -s $(distdir)/lilypond.exe
151 cp $(mi2muout)/mi2mu.exe $(distdir)
152 strip -s $(distdir)/mi2mu.exe
153 (cd ./$(depth); $(ZIP) $(DIST_NAME).exe.zip $(distdir))
158 localdist: $(DISTFILES)
159 if [ -d out ]; then \
160 mkdir $(distdir)/$(localdir)/out; \
161 touch $(distdir)/$(localdir)/out/dummy.dep; \
163 $(LN) $(DISTFILES) $(distdir)/$(localdir)
165 set -e; for i in $(SUBDIRS); do mkdir $(distdir)/$(localdir)/$$i; \
166 $(MAKE) localdir=$(localdir)/$$i -C $$i localdist; done
170 -mkdir $(module-distdir)
171 $(MAKE) localmoduledist
172 (cd $(depth)/$(outdir); $(TAR) cfz $(MODULE_DIST_NAME).tar.gz $(MODULE_DIST_NAME))
173 rm -rf $(module-distdir)/
176 $(LN) $(DISTFILES) $(module-distdir)/$(localdir)
178 set -e; for i in $(SUBDIRS); do mkdir $(module-distdir)/$(localdir)/$$i; done
179 set -e; for i in $(SUBDIRS); do $(MAKE) localdir=$(localdir)/$$i -C $$i localmoduledist; done
182 TAGS:$(all-tag-sources)
183 ifdef all-tag-sources
184 -etags -CT $(all-tag-sources) $(ERROR_LOG)
185 -ctags -CT $(all-tag-sources) $(ERROR_LOG)
188 set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i TAGS ; done
195 $(outdir)/version.hh: VERSION
196 sh ./$(lily_bindir)/make-version.sh > $@
199 # should this be in Rules?
200 configure: configure.in aclocal.m4
207 $(MAKE) INSTALL="$(INSTALL) -s" install
209 install: localinstall
211 set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i install; done
216 uninstall: localuninstall
218 set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i uninstall; done
225 $(LIBFLOWER): check-flower-deps
228 $(MAKE) -C $(depth)/flower/ default
230 check-lib-deps: check-flower-deps
231 $(MAKE) -C $(depth)/lib
234 $(MAKE) -C $(depth)/Documentation
237 $(MAKE) ./$(outdir)/$(@F) -C $(depth)/lib
240 # RedHat rpm package:
242 rpm: check-rpm-doc-deps
243 -cp $(depth)/lilypond-$(TOPLEVEL_VERSION).tar.gz $(rpm-sources)
244 # -cp $(wildcard $(depth)/Documentation/*.xpm) $(rpm-sources)
245 -cp $(wildcard $(depth)/Documentation/$(outdir)/*.gif) $(rpm-sources)
246 $(MAKE) -C $(make-dir) spec
247 rpm -ba $(makeout)/lilypond.spec
250 $(MAKE) -C $(depth)/Documentation gifs
253 $(MAKE) -C $(depth)/mf
258 $(INSTALL) -d $(bindir)
259 $(INSTALL) -m 755 $(EXECUTABLES) $(bindir)
262 for a in $(EXECUTABLES); do rm -f $(bindir)/`basename $$a`; done