Mercurial > audlegacy
annotate mk/objective.mk @ 714:3c030d963be4 trunk
[svn] convert to objective make
author | nenolod |
---|---|
date | Sun, 26 Feb 2006 20:20:17 -0800 |
parents | cf7b5a288564 |
children | 840c49684e2c |
rev | line source |
---|---|
562
5cdadcf74ec3
[svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff
changeset
|
1 # Shut up GNU make |
5cdadcf74ec3
[svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff
changeset
|
2 .SILENT: |
5cdadcf74ec3
[svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff
changeset
|
3 |
578 | 4 OBJECTIVE_DIRECTORIES = none |
5 OBJECTIVE_LIBS = none | |
581 | 6 OBJECTIVE_LIBS_NOINST = none |
578 | 7 OBJECTIVE_BINS = none |
713 | 8 OBJECTIVE_DATA = none |
566
ab7027a06ca9
[svn] convert mpg123 over... right now we don't use the "x86-optimized code", although I doubt it makes a lick of
nenolod
parents:
564
diff
changeset
|
9 SUBDIRS = none |
658
a019c0e28b28
[svn] If the makefile has a HEADERS variable, then install them to the
nenolod
parents:
626
diff
changeset
|
10 HEADERS = none |
a019c0e28b28
[svn] If the makefile has a HEADERS variable, then install them to the
nenolod
parents:
626
diff
changeset
|
11 |
595 | 12 LIBDIR = $(libdir) |
13 BINDIR = $(bindir) | |
671 | 14 INCLUDEDIR = $(pkgincludedir) |
566
ab7027a06ca9
[svn] convert mpg123 over... right now we don't use the "x86-optimized code", although I doubt it makes a lick of
nenolod
parents:
564
diff
changeset
|
15 CFLAGS += -DHAVE_CONFIG_H |
ab7027a06ca9
[svn] convert mpg123 over... right now we don't use the "x86-optimized code", although I doubt it makes a lick of
nenolod
parents:
564
diff
changeset
|
16 |
562
5cdadcf74ec3
[svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff
changeset
|
17 default: all |
5cdadcf74ec3
[svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff
changeset
|
18 all: build |
5cdadcf74ec3
[svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff
changeset
|
19 |
5cdadcf74ec3
[svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff
changeset
|
20 install: |
5cdadcf74ec3
[svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff
changeset
|
21 $(MAKE) install-prehook |
708 | 22 @for i in $(BINDIR) $(LIBDIR) $(INCLUDEDIR); do \ |
23 if test ! -d $(DESTDIR)/$$i; then \ | |
705
93c09e025180
[svn] - more intelligently handle directory creation
nenolod
parents:
699
diff
changeset
|
24 $(INSTALL) -d -m 755 $(DESTDIR)/$$i; \ |
708 | 25 fi; \ |
26 done; | |
593 | 27 @if test "$(SUBDIRS)" != "none"; then \ |
28 for i in $(SUBDIRS); do \ | |
29 echo "[installing subobjective: $$i]"; \ | |
30 (cd $$i; $(MAKE) install; cd ..); \ | |
31 done; \ | |
32 fi | |
578 | 33 @if test "$(OBJECTIVE_DIRECTORIES)" != "none"; then \ |
34 for i in $(OBJECTIVE_DIRECTORIES); do \ | |
35 printf "%10s %-20s\n" MKDIR $$i; \ | |
36 $(INSTALL) -d -m 755 $(DESTDIR)/$$i; \ | |
37 done; \ | |
38 fi | |
658
a019c0e28b28
[svn] If the makefile has a HEADERS variable, then install them to the
nenolod
parents:
626
diff
changeset
|
39 @if test "$(HEADERS)" != "none"; then \ |
a019c0e28b28
[svn] If the makefile has a HEADERS variable, then install them to the
nenolod
parents:
626
diff
changeset
|
40 for i in $(HEADERS); do \ |
a019c0e28b28
[svn] If the makefile has a HEADERS variable, then install them to the
nenolod
parents:
626
diff
changeset
|
41 printf "%10s %-20s\n" INSTALL $$i; \ |
671 | 42 $(INSTALL_DATA) $(INSTALL_OVERRIDE) $$i $(DESTDIR)/$(INCLUDEDIR)/$$i; \ |
658
a019c0e28b28
[svn] If the makefile has a HEADERS variable, then install them to the
nenolod
parents:
626
diff
changeset
|
43 done; \ |
a019c0e28b28
[svn] If the makefile has a HEADERS variable, then install them to the
nenolod
parents:
626
diff
changeset
|
44 fi |
578 | 45 @if test "$(OBJECTIVE_LIBS)" != "none"; then \ |
46 for i in $(OBJECTIVE_LIBS); do \ | |
47 printf "%10s %-20s\n" INSTALL $$i; \ | |
48 $(INSTALL) $(INSTALL_OVERRIDE) $$i $(DESTDIR)/$(LIBDIR)/$$i; \ | |
49 done; \ | |
50 fi | |
51 @if test "$(OBJECTIVE_BINS)" != "none"; then \ | |
52 for i in $(OBJECTIVE_BINS); do \ | |
53 printf "%10s %-20s\n" INSTALL $$i; \ | |
54 $(INSTALL) $(INSTALL_OVERRIDE) $$i $(DESTDIR)/$(BINDIR)/$$i; \ | |
55 done; \ | |
56 fi; | |
713 | 57 @if test "$(OBJECTIVE_DATA)" != "none"; then \ |
58 for i in $(OBJECTIVE_DATA); do \ | |
59 source = `echo $$i | cut -d ":" -f1`; \ | |
60 destination = `echo $$i | cut -d ":" -f2`; \ | |
61 printf "%10s %-20s\n" INSTALL $$source; \ | |
62 $(INSTALL_DATA) $(INSTALL_OVERRIDE) $$source $(DESTDIR)/$$destination; \ | |
63 done; \ | |
64 fi | |
562
5cdadcf74ec3
[svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff
changeset
|
65 $(MAKE) install-posthook |
564 | 66 @echo "[all objectives installed]" |
562
5cdadcf74ec3
[svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff
changeset
|
67 |
563
0879e7ad85b1
[svn] some buildsystem changes... nothing notable yet
nenolod
parents:
562
diff
changeset
|
68 clean: |
0879e7ad85b1
[svn] some buildsystem changes... nothing notable yet
nenolod
parents:
562
diff
changeset
|
69 $(MAKE) clean-prehook |
567 | 70 @if test "$(SUBDIRS)" != "none"; then \ |
71 for i in $(SUBDIRS); do \ | |
72 echo "[cleaning subobjective: $$i]"; \ | |
73 (cd $$i; $(MAKE) clean; cd ..); \ | |
74 done; \ | |
75 fi | |
563
0879e7ad85b1
[svn] some buildsystem changes... nothing notable yet
nenolod
parents:
562
diff
changeset
|
76 $(MAKE) clean-posthook |
568
f34898e3333a
[svn] Announce when we're building a library or binary objective, not just a component objective.
nenolod
parents:
567
diff
changeset
|
77 $(RM) *.o *.lo *.so *.a *.sl |
564 | 78 @echo "[all objectives cleaned]" |
563
0879e7ad85b1
[svn] some buildsystem changes... nothing notable yet
nenolod
parents:
562
diff
changeset
|
79 |
0879e7ad85b1
[svn] some buildsystem changes... nothing notable yet
nenolod
parents:
562
diff
changeset
|
80 distclean: clean |
712 | 81 @if test "$(SUBDIRS)" != "none"; then \ |
82 for i in $(SUBDIRS); do \ | |
83 echo "[distcleaning subobjective: $$i]"; \ | |
84 (cd $$i; $(MAKE) distclean; cd ..); \ | |
85 echo "[distcleaning subobjective: $$i]"; \ | |
86 done; \ | |
87 fi | |
88 @if test -f Makefile.in; then \ | |
89 $(RM) -f Makefile; \ | |
90 fi | |
91 @if test -f mk/rules.mk; then \ | |
92 $(RM) -f mk/rules.mk; \ | |
93 fi | |
563
0879e7ad85b1
[svn] some buildsystem changes... nothing notable yet
nenolod
parents:
562
diff
changeset
|
94 |
562
5cdadcf74ec3
[svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff
changeset
|
95 build: |
5cdadcf74ec3
[svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff
changeset
|
96 $(MAKE) build-prehook |
712 | 97 @if test "$(SUBDIRS)" != "none"; then \ |
566
ab7027a06ca9
[svn] convert mpg123 over... right now we don't use the "x86-optimized code", although I doubt it makes a lick of
nenolod
parents:
564
diff
changeset
|
98 for i in $(SUBDIRS); do \ |
ab7027a06ca9
[svn] convert mpg123 over... right now we don't use the "x86-optimized code", although I doubt it makes a lick of
nenolod
parents:
564
diff
changeset
|
99 echo "[building subobjective: $$i]"; \ |
ab7027a06ca9
[svn] convert mpg123 over... right now we don't use the "x86-optimized code", although I doubt it makes a lick of
nenolod
parents:
564
diff
changeset
|
100 (cd $$i; $(MAKE); cd ..); \ |
570 | 101 echo "[finished subobjective: $$i]"; \ |
566
ab7027a06ca9
[svn] convert mpg123 over... right now we don't use the "x86-optimized code", although I doubt it makes a lick of
nenolod
parents:
564
diff
changeset
|
102 done; \ |
ab7027a06ca9
[svn] convert mpg123 over... right now we don't use the "x86-optimized code", although I doubt it makes a lick of
nenolod
parents:
564
diff
changeset
|
103 fi |
581 | 104 @if test "$(OBJECTIVE_LIBS)" != "none"; then \ |
105 for i in $(OBJECTIVE_LIBS); do \ | |
106 echo "[building library objective: $$i]"; \ | |
107 $(MAKE) $$i; \ | |
108 echo "[finished library objective: $$i]"; \ | |
109 done; \ | |
110 fi | |
111 @if test "$(OBJECTIVE_LIBS_NOINST)" != "none"; then \ | |
112 for i in $(OBJECTIVE_LIBS_NOINST); do \ | |
113 echo "[building library dependency: $$i]"; \ | |
114 $(MAKE) $$i; \ | |
115 echo "[finished library dependency: $$i]"; \ | |
116 done; \ | |
117 fi | |
118 @if test "$(OBJECTIVE_BINS)" != "none"; then \ | |
119 for i in $(OBJECTIVE_BINS); do \ | |
120 echo "[building binary objective: $$i]"; \ | |
121 $(MAKE) $$i; \ | |
122 echo "[finished binary objective: $$i]"; \ | |
123 done; \ | |
124 fi | |
562
5cdadcf74ec3
[svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff
changeset
|
125 $(MAKE) build-posthook |
564 | 126 @echo "[all objectives built]" |
562
5cdadcf74ec3
[svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff
changeset
|
127 |
5cdadcf74ec3
[svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff
changeset
|
128 .c.o: |
566
ab7027a06ca9
[svn] convert mpg123 over... right now we don't use the "x86-optimized code", although I doubt it makes a lick of
nenolod
parents:
564
diff
changeset
|
129 printf "%10s %-20s\n" CC $< |
562
5cdadcf74ec3
[svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff
changeset
|
130 $(CC) $(CFLAGS) -c $< -o $@ |
5cdadcf74ec3
[svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff
changeset
|
131 |
5cdadcf74ec3
[svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff
changeset
|
132 .cc.o: |
566
ab7027a06ca9
[svn] convert mpg123 over... right now we don't use the "x86-optimized code", although I doubt it makes a lick of
nenolod
parents:
564
diff
changeset
|
133 printf "%10s %-20s\n" CXX $<; |
562
5cdadcf74ec3
[svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff
changeset
|
134 $(CXX) $(CXXFLAGS) -c $< -o $@ |
5cdadcf74ec3
[svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff
changeset
|
135 |
5cdadcf74ec3
[svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff
changeset
|
136 .cpp.o: |
566
ab7027a06ca9
[svn] convert mpg123 over... right now we don't use the "x86-optimized code", although I doubt it makes a lick of
nenolod
parents:
564
diff
changeset
|
137 printf "%10s %-20s\n" CXX $<; |
562
5cdadcf74ec3
[svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff
changeset
|
138 $(CXX) $(CXXFLAGS) -c $< -o $@ |
5cdadcf74ec3
[svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff
changeset
|
139 |
5cdadcf74ec3
[svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff
changeset
|
140 .cxx.o: |
566
ab7027a06ca9
[svn] convert mpg123 over... right now we don't use the "x86-optimized code", although I doubt it makes a lick of
nenolod
parents:
564
diff
changeset
|
141 printf "%10s %-20s\n" CXX $<; |
562
5cdadcf74ec3
[svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff
changeset
|
142 $(CXX) $(CXXFLAGS) -c $< -o $@ |
5cdadcf74ec3
[svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff
changeset
|
143 |
578 | 144 %.so: $(OBJECTS) |
626
eb0c533e7c48
[svn] do not forkbomb if we have a malformed makefile
nenolod
parents:
595
diff
changeset
|
145 if test "x$(OBJECTS)" != "x"; then \ |
699 | 146 $(MAKE) $(OBJECTS); \ |
626
eb0c533e7c48
[svn] do not forkbomb if we have a malformed makefile
nenolod
parents:
595
diff
changeset
|
147 printf "%10s %-20s\n" LINK $@; \ |
689 | 148 $(CC) -fPIC -DPIC -shared -o $@ -Wl,-soname=$@ $(OBJECTS) $(LDFLAGS) $(LIBADD); \ |
626
eb0c533e7c48
[svn] do not forkbomb if we have a malformed makefile
nenolod
parents:
595
diff
changeset
|
149 fi |
578 | 150 |
580 | 151 %.a: $(OBJECTS) |
626
eb0c533e7c48
[svn] do not forkbomb if we have a malformed makefile
nenolod
parents:
595
diff
changeset
|
152 if test "x$(OBJECTS)" != "x"; then \ |
699 | 153 $(MAKE) $(OBJECTS); \ |
626
eb0c533e7c48
[svn] do not forkbomb if we have a malformed makefile
nenolod
parents:
595
diff
changeset
|
154 printf "%10s %-20s\n" LINK $@; \ |
eb0c533e7c48
[svn] do not forkbomb if we have a malformed makefile
nenolod
parents:
595
diff
changeset
|
155 $(AR) cq $@ $(OBJECTS); \ |
eb0c533e7c48
[svn] do not forkbomb if we have a malformed makefile
nenolod
parents:
595
diff
changeset
|
156 fi |
580 | 157 |
579
785ec2ad4ea4
[svn] try to add a "default" make rule for $(OBJECTIVE_BINS)
nenolod
parents:
578
diff
changeset
|
158 $(OBJECTIVE_BINS): $(OBJECTS) |
626
eb0c533e7c48
[svn] do not forkbomb if we have a malformed makefile
nenolod
parents:
595
diff
changeset
|
159 if test "x$(OBJECTS)" != "x"; then \ |
699 | 160 $(MAKE) $(OBJECTS); \ |
626
eb0c533e7c48
[svn] do not forkbomb if we have a malformed makefile
nenolod
parents:
595
diff
changeset
|
161 printf "%10s %-20s\n" LINK $@; \ |
eb0c533e7c48
[svn] do not forkbomb if we have a malformed makefile
nenolod
parents:
595
diff
changeset
|
162 $(CC) -o $@ $(OBJECTS) $(LDFLAGS) $(LIBADD); \ |
eb0c533e7c48
[svn] do not forkbomb if we have a malformed makefile
nenolod
parents:
595
diff
changeset
|
163 fi |
579
785ec2ad4ea4
[svn] try to add a "default" make rule for $(OBJECTIVE_BINS)
nenolod
parents:
578
diff
changeset
|
164 |
563
0879e7ad85b1
[svn] some buildsystem changes... nothing notable yet
nenolod
parents:
562
diff
changeset
|
165 clean-prehook: |
0879e7ad85b1
[svn] some buildsystem changes... nothing notable yet
nenolod
parents:
562
diff
changeset
|
166 clean-posthook: |
0879e7ad85b1
[svn] some buildsystem changes... nothing notable yet
nenolod
parents:
562
diff
changeset
|
167 build-prehook: |
0879e7ad85b1
[svn] some buildsystem changes... nothing notable yet
nenolod
parents:
562
diff
changeset
|
168 build-posthook: |
0879e7ad85b1
[svn] some buildsystem changes... nothing notable yet
nenolod
parents:
562
diff
changeset
|
169 install-prehook: |
0879e7ad85b1
[svn] some buildsystem changes... nothing notable yet
nenolod
parents:
562
diff
changeset
|
170 install-posthook: |
0879e7ad85b1
[svn] some buildsystem changes... nothing notable yet
nenolod
parents:
562
diff
changeset
|
171 |
0879e7ad85b1
[svn] some buildsystem changes... nothing notable yet
nenolod
parents:
562
diff
changeset
|
172 # compatibility with automake follows |
0879e7ad85b1
[svn] some buildsystem changes... nothing notable yet
nenolod
parents:
562
diff
changeset
|
173 am--refresh: |