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 html lib TAGS\
11 check-flower-deps check-lib-deps check-doc-deps check-html-deps
17 # dependency list of executable:
20 $(EXECUTABLE): $(configheader) $(OFILES) $(outdir)/version.hh
22 $(MAKE) $(MODULE_LIBDEPS)
25 $(DO_STRIP) $(STABLEOBS)
27 $(LD_COMMAND) $(OFILES) $(LOADLIBES)
32 # dependency list of library:
34 $(LIBRARY): $(configheader) $(OFILES)
35 $(AR_COMMAND) $(OFILES)
36 $(AR) ts $@ #silly irix
39 $(SHAREDLIBRARY): $(configheader) $(OFILES) $(MODULE_LIBDEPS)
40 $(LD_COMMAND) $(OFILES) -o $@.$(VERSION)
42 ln -sf $(outdir)/$(LIB_PREFIX)$(NAME).so.$(VERSION) $@.$(MAJOR_VERSION)
43 ln -sf $(LIB_PREFIX)$(NAME).so.$(VERSION) $@
55 # be careful about deletion.
58 touch $(outdir)/dummy.dep
63 $(MAKE) local-distclean
67 $(MAKE) local-maintainerclean
68 $(MAKE) local-distclean
80 dummydep: $(DUMMYDEPS)
83 # value of $(OSTYPE) on windhoos...; "make $OSTYPE" if you use bash :-)
85 win32: windows32 # win/lose?
88 $(MAKE) -C . "CXX=g++ -D_WINDOWS32"
95 $(MAKE) -C . CXX="gcc-go32 -I/usr/i386-go32/include -I/usr/i386-go32/include/g++ -D_WINDOWS32 -Dcaddr_t=char* -DMAP_SHARED=0"
101 @echo "Makefile for LilyPond $(TOPLEVEL_VERSION)"
103 @echo " $(MAKE) ["VARIABLE=value" ...] [target]"
106 @echo " all clean config dist distclean doc doc++"
107 @echo " exe help lib TAGS"
108 @echo " dos: xcomplile to dos"
109 @echo " windows32: native cygnus-gnu compile"
113 # $(MAKE) -C $(depth)/Documentation do-doc
114 $(MAKE) -C $(depth)/Documentation all
118 # ugh. should generate in out/
123 chmod -R a+r $(distdir)
124 chmod a+x `find $(distdir) -type d -print`
126 (cd ./$(depth)/$(outdir); $(TAR) cf - $(DIST_NAME) | gzip -9 > $(DIST_NAME).tar.gz)
131 # ugh. should generate in out/
133 doosdist: check-mf-deps
137 chmod -Rf a+rX $(distdir)
138 # ugh, the ugly way, then
139 rm -f $(distdir)/mf/$(outdir)/*.log
141 (cd $(distdir)/init; ln -s ../../../mf/out/*.ly .)
142 (cd $(distdir)/tex; ln -s ../../../mf/out/*.tex .)
143 (cd $(distdir); rm -rf $(NO_DOOS_DIST))
144 ln $(lilyout)/lilypond $(distdir)/bin/lilypond.exe
145 -strip -s $(distdir)/bin/lilypond.exe
146 ln $(mi2muout)/mi2mu $(distdir)/bin/mi2mu.exe
147 -strip -s $(distdir)/bin/mi2mu.exe
148 (cd ./$(depth)/$(outdir); $(ZIP) $(DIST_NAME).exe.zip $(DIST_NAME))
153 localdist: $(DISTFILES) $(OUT_DISTFILES)
154 touch $(outdir)/dummy.dep; \
155 mkdir $(distdir)/$(localdir)/out; \
156 $(LN) $(DISTFILES) $(distdir)/$(localdir)
157 $(LN) $(outdir)/dummy.dep $(OUT_DISTFILES) $(distdir)/$(localdir)/out
159 set -e; for i in $(SUBDIRS); do mkdir $(distdir)/$(localdir)/$$i; \
160 $(MAKE) localdir=$(localdir)/$$i -C $$i localdist; done
164 TAGS:$(all-tag-sources)
165 ifdef all-tag-sources
166 -etags -CT $(all-tag-sources) $(ERROR_LOG)
167 -ctags -h ".h.hh.tcc.icc" $(all-tag-sources) $(ERROR_LOG)
175 $(outdir)/version.hh: VERSION
176 sh ./$(lily_bindir)/make-version.sh > $@
179 # should this be in Rules?
180 configure: configure.in aclocal.m4
188 local-maintainerclean:
191 $(MAKE) INSTALL="$(INSTALL) -s" install
193 install: localinstall
198 uninstall: localuninstall
205 $(LIBFLOWER): check-flower-deps
208 $(MAKE) -C $(depth)/flower/ default
210 check-lib-deps: check-flower-deps
211 $(MAKE) -C $(depth)/lib
214 $(MAKE) -C $(depth)/Documentation
217 $(MAKE) -C $(depth)/Documentation html
220 $(MAKE) ./$(outdir)/$(@F) -C $(depth)/lib
223 # RedHat rpm package:
225 rpm: check-rpm-doc-deps
226 -cp $(depth)/lilypond-$(TOPLEVEL_VERSION).tar.gz $(rpm-sources)
227 # -cp $(wildcard $(depth)/Documentation/*.xpm) $(rpm-sources)
228 -cp $(wildcard $(depth)/Documentation/$(outdir)/*.gif) $(rpm-sources)
229 $(MAKE) -C $(make-dir) spec
230 rpm -ba $(makeout)/lilypond.spec
233 $(MAKE) -C $(depth)/Documentation gifs
236 $(MAKE) -C $(depth)/mf
238 $(configheader): $(depth)/$(configuration).hh