lilypond-0.0.40
[lilypond.git] / make / Targets.make
blob884eef7846ed1dfd2c5c8089344f142803450c71
2 # project LilyPond -- the musical typesetter
3 # title generic make rules
4 # file make/Rules.make
6 # Copyright (c) 1997 by
7 # Jan Nieuwenhuizen <jan@digicash.com>
8 # Han-Wen Nienhuys <hanwen@stack.nl>
10 .PHONY : all clean default dist doc doc++ dummy exe help lib tags
12 # target all:
14 all: default
15 for i in $(SUBDIRS); do $(MAKE) -C $$i all; done
18 # dependency list of executable:
20 EXECUTABLE = $(bindir)/$(NAME)
21 $(EXECUTABLE): $(OFILES) $(CUSTOMLIBES)
22 # $(STRIPDEBUG) $(STABLEOBS)
23 # $(LD_COMMAND) -o $@ $^ $(LOADLIBES)
24 $(LD_COMMAND) $(OFILES) $(LOADLIBES)
25 touch $(VERSION_DEPENDENCY)
26 $(INCREASE_BUILD)
27 touch $(build) #waai necessary?
29 exe: $(EXECUTABLE)
32 # dependency list of library:
34 LIBRARY = $(libdir)/$(LIB_PREFIX)$(NAME)$(LIB_SUFFIX)
35 $(LIBRARY): $(OFILES) $(CUSTOMLIBES)
36 $(AR_COMMAND) $(OFILES)
37 touch $(VERSION_DEPENDENCY)
38 $(INCREASE_BUILD)
39 touch $(build) #waai necessary?
41 lib: $(LIBRARY)
44 clean:
45 rm -f $(allexe) core $(allobs)
46 for i in $(SUBDIRS); do $(MAKE) -C $$i clean; done
48 distclean: clean
49 rm -rf $(lily-version) $(flower-version) .b $(build) .GENERATE *~ $(allout)
52 # configure:
54 config:
55 $(bindir)/configure
58 # value of $(OSTYPE) on windhoos; "make $OSTYPE" if you use bash :-)
60 win32:
61 $(MAKE) -C . CXX=g++
64 # xcompile to doze:
66 doze: dos
67 dos:
68 $(MAKE) -C . CXX="gcc-go32 -I/usr/i386-go32/include -I/usr/i386-go32/include/g++ -D_WIN32 -Dcaddr_t=char* -DMAP_SHARED=0"
71 # target help:
73 help:
74 @echo "Usage:"
75 @echo " $(MAKE) ["VARIABLE=value" ...] [target]"
76 @echo
77 @echo "targets:"
78 @echo " all clean config dist distclean doc doc++"
79 @echo " exe help lib moduledist tags"
80 @echo " dos: xcomplile to dos"
81 @echo " win32: native cygnus-win32 compile"
84 doc:
85 $(MAKE) -C Documentation do-doc
87 # doc++ documentation of classes
88 doc++: $(progdocs)
89 doc++ -kp -d $(DOCDIR) $^
91 dist:
92 -mkdir $(distdir)
93 $(MAKE) localdist
94 (cd ./$(depth); tar cfz $(DIST_NAME).tar.gz $(DIST_NAME))
95 rm -rf $(distdir)/ # should be trapped
97 localdist:
98 ln $(DISTFILES) $(distdir)/$(localdir)
99 for i in $(SUBDIRS); do mkdir $(distdir)/$(localdir)/$$i; done
100 for i in $(SUBDIRS); do $(MAKE) localdir=$(localdir)/$$i -C $$i localdist; done
102 moduledist:
103 -mkdir $(module-distdir)
104 $(MAKE) localmoduledist
105 (cd ./$(depth); tar cfz $(MODULE_DIST_NAME).tar.gz $(MODULE_DIST_NAME))
106 rm -rf $(module-distdir)/ # should be trapped
108 localmoduledist:
109 ln $(DISTFILES) $(module-distdir)/$(localdir)
110 for i in $(SUBDIRS); do mkdir $(module-distdir)/$(localdir)/$$i; done
111 for i in $(SUBDIRS); do $(MAKE) localdir=$(localdir)/$$i -C $$i localmoduledist; done
113 all-tags: tags
114 for i in $(SUBDIRS); do $(MAKE) -C $$i all-tags; done
116 tags:
117 etags -CT $(allcc)
119 # version stuff:
121 check-flower-version:
122 $(MAKE) flower-version -C ./$(depth)/flower
123 $(lily-version): ./$(depth)/.version ./$(bindir)/make_version $(build)
124 ./$(bindir)/make_version "$(MAJOR_VERSION)" "$(MINOR_VERSION)" "$(PATCH_LEVEL)" "$(MY_PATCH_LEVEL)" "$(BUILD)" "$(CXX) $(CXXVER)" > $@