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
124 # doc++ documentation of classes
126 $(docxx
) $(docxx-opts
) -d
$(DOCDIR
) $^
128 # ugh. should generate in out/
132 chmod
-Rf a
+rX
$(distdir
)
134 (cd .
/$(depth
); $(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 mkdir
$(distdir
)/$(localdir
)/out
; fi
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
); $(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 .
/$(lily_bindir
)/make-version
> $@
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
$< $(rpm-sources
)
242 $(MAKE
) -C
$(make-dir
) spec
243 rpm
-ba
$(makeout
)/lilypond.spec
246 $(MAKE
) -C
$(depth
)/Documentation
/ xpms
250 $(INSTALL
) -d
$(bindir)
251 $(INSTALL
) -m
755 $(EXECUTABLES
) $(bindir)
254 for a in
$(EXECUTABLES
); do
rm -f
$(bindir)/`basename $$a`; done