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 -R a+r $(distdir)
133 chmod a+x `find $(distdir) -type d -print`
135 (cd ./$(depth)/$(outdir); $(TAR) cf - $(DIST_NAME) | gzip -9 > $(DIST_NAME).tar.gz)
140 # ugh. should generate in out/
144 # nogo, SUBDIRS is handed down to subdir...
145 # $(MAKE) SUBDIRS="Documentation init input tex" localdist
147 chmod -Rf a+rX $(distdir)
148 # ugh, the ugly way, then
149 (cd $(distdir); rm -rf $(NO_DOOS_DIST))
150 cp $(lilyout)/lilypond.exe $(distdir)
151 strip -s $(distdir)/lilypond.exe
152 cp $(mi2muout)/mi2mu.exe $(distdir)
153 strip -s $(distdir)/mi2mu.exe
154 (cd ./$(depth); $(ZIP) $(DIST_NAME).exe.zip $(distdir))
159 localdist: $(DISTFILES)
160 if [ -d out ]; then \
161 mkdir $(distdir)/$(localdir)/out; \
162 touch $(distdir)/$(localdir)/out/dummy.dep; \
164 $(LN) $(DISTFILES) $(distdir)/$(localdir)
166 set -e; for i in $(SUBDIRS); do mkdir $(distdir)/$(localdir)/$$i; \
167 $(MAKE) localdir=$(localdir)/$$i -C $$i localdist; done
171 -mkdir $(module-distdir)
172 $(MAKE) localmoduledist
173 (cd $(depth)/$(outdir); $(TAR) cfz $(MODULE_DIST_NAME).tar.gz $(MODULE_DIST_NAME))
174 rm -rf $(module-distdir)/
177 $(LN) $(DISTFILES) $(module-distdir)/$(localdir)
179 set -e; for i in $(SUBDIRS); do mkdir $(module-distdir)/$(localdir)/$$i; done
180 set -e; for i in $(SUBDIRS); do $(MAKE) localdir=$(localdir)/$$i -C $$i localmoduledist; done
183 TAGS:$(all-tag-sources)
184 ifdef all-tag-sources
185 -etags -CT $(all-tag-sources) $(ERROR_LOG)
186 -ctags -CT $(all-tag-sources) $(ERROR_LOG)
189 set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i TAGS ; done
196 $(outdir)/version.hh: VERSION
197 sh ./$(lily_bindir)/make-version.sh > $@
200 # should this be in Rules?
201 configure: configure.in aclocal.m4
208 $(MAKE) INSTALL="$(INSTALL) -s" install
210 install: localinstall
212 set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i install; done
217 uninstall: localuninstall
219 set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i uninstall; done
226 $(LIBFLOWER): check-flower-deps
229 $(MAKE) -C $(depth)/flower/ default
231 check-lib-deps: check-flower-deps
232 $(MAKE) -C $(depth)/lib
235 $(MAKE) -C $(depth)/Documentation
238 $(MAKE) ./$(outdir)/$(@F) -C $(depth)/lib
241 # RedHat rpm package:
243 rpm: check-rpm-doc-deps
244 -cp $(depth)/lilypond-$(TOPLEVEL_VERSION).tar.gz $(rpm-sources)
245 # -cp $(wildcard $(depth)/Documentation/*.xpm) $(rpm-sources)
246 -cp $(wildcard $(depth)/Documentation/$(outdir)/*.gif) $(rpm-sources)
247 $(MAKE) -C $(make-dir) spec
248 rpm -ba $(makeout)/lilypond.spec
251 $(MAKE) -C $(depth)/Documentation gifs
254 $(MAKE) -C $(depth)/mf
259 $(INSTALL) -d $(bindir)
260 $(INSTALL) -m 755 $(EXECUTABLES) $(bindir)
263 for a in $(EXECUTABLES); do rm -f $(bindir)/`basename $$a`; done