Mercurial > audlegacy-plugins
comparison mk/objective.mk @ 0:13389e613d67 trunk
[svn] - initial import of audacious-plugins tree (lots to do)
author | nenolod |
---|---|
date | Mon, 18 Sep 2006 01:11:49 -0700 |
parents | |
children | eb768b801ab1 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:13389e613d67 |
---|---|
1 default: all | |
2 all: build | |
3 | |
4 .SUFFIXES: .cxx .cc | |
5 | |
6 install: build | |
7 $(MAKE) install-prehook | |
8 @for i in $(BINDIR) $(LIBDIR) $(INCLUDEDIR); do \ | |
9 if [ ! -d $(DESTDIR)/$$i ]; then \ | |
10 $(INSTALL) -d -m 755 $(DESTDIR)/$$i; \ | |
11 fi; \ | |
12 done; | |
13 @if [ "x$(SUBDIRS)" != "x" ]; then \ | |
14 for i in $(SUBDIRS); do \ | |
15 if [ $(VERBOSITY) -gt 0 ]; then \ | |
16 echo "[installing subobjective: $$i]"; \ | |
17 fi; \ | |
18 (cd $$i; $(MAKE) install || exit; cd ..); \ | |
19 done; \ | |
20 fi | |
21 @if [ "x$(OBJECTIVE_DIRECTORIES)" != "x" ]; then \ | |
22 for i in $(OBJECTIVE_DIRECTORIES); do \ | |
23 printf "%10s %-20s\n" MKDIR $$i; \ | |
24 $(INSTALL) -d -m 755 $(DESTDIR)/$$i; \ | |
25 done; \ | |
26 fi | |
27 @if [ "x$(HEADERS)" != "x" ]; then \ | |
28 for i in $(HEADERS); do \ | |
29 printf "%10s %-20s\n" INSTALL $$i; \ | |
30 $(INSTALL_DATA) $(INSTALL_OVERRIDE) $$i $(DESTDIR)/$(INCLUDEDIR)/$$i; \ | |
31 done; \ | |
32 fi | |
33 @if [ "x$(OBJECTIVE_LIBS)" != "x" ]; then \ | |
34 for i in $(OBJECTIVE_LIBS); do \ | |
35 printf "%10s %-20s\n" INSTALL $$i; \ | |
36 $(INSTALL) $(INSTALL_OVERRIDE) $$i $(DESTDIR)/$(LIBDIR)/$$i; \ | |
37 done; \ | |
38 fi | |
39 @if [ "x$(OBJECTIVE_BINS)" != "x" ]; then \ | |
40 for i in $(OBJECTIVE_BINS); do \ | |
41 printf "%10s %-20s\n" INSTALL $$i; \ | |
42 $(INSTALL) $(INSTALL_OVERRIDE) $$i $(DESTDIR)/$(BINDIR)/$$i; \ | |
43 done; \ | |
44 fi; | |
45 @if [ "x$(OBJECTIVE_DATA)" != "x" ]; then \ | |
46 for i in $(OBJECTIVE_DATA); do \ | |
47 source=`echo $$i | cut -d ":" -f1`; \ | |
48 destination=`echo $$i | cut -d ":" -f2`; \ | |
49 if [ ! -d $(DESTDIR)/$$destination ]; then \ | |
50 $(INSTALL) -d -m 755 $(DESTDIR)/$$destination; \ | |
51 fi; \ | |
52 printf "%10s %-20s\n" INSTALL $$source; \ | |
53 $(INSTALL_DATA) $(INSTALL_OVERRIDE) $$source $(DESTDIR)/$$destination; \ | |
54 done; \ | |
55 fi | |
56 $(MAKE) install-posthook | |
57 @if [ $(VERBOSITY) -gt 0 ]; then \ | |
58 echo "[all objectives installed]"; \ | |
59 fi | |
60 | |
61 clean: | |
62 $(MAKE) clean-prehook | |
63 @if [ "x$(SUBDIRS)" != "x" ]; then \ | |
64 for i in $(SUBDIRS); do \ | |
65 if [ $(VERBOSITY) -gt 0 ]; then \ | |
66 echo "[cleaning subobjective: $$i]"; \ | |
67 fi; \ | |
68 (cd $$i; $(MAKE) clean || exit; cd ..); \ | |
69 done; \ | |
70 fi | |
71 $(MAKE) clean-posthook | |
72 rm -f *.o *.lo *.so *.a *.sl | |
73 @if [ "x$(OBJECTIVE_BINS)" != "x" ]; then \ | |
74 for i in $(OBJECTIVE_BINS); do \ | |
75 rm -f $$i; \ | |
76 done; \ | |
77 fi | |
78 @if [ "x$(OBJECTIVE_LIBS)" != "x" ]; then \ | |
79 for i in $(OBJECTIVE_LIBS); do \ | |
80 rm -f $$i; \ | |
81 done; \ | |
82 fi | |
83 @if [ "x$(OBJECTIVE_LIBS_NOINST)" != "x" ]; then \ | |
84 for i in $(OBJECTIVE_LIBS_NOINST); do \ | |
85 rm -f $$i; \ | |
86 done; \ | |
87 fi | |
88 @if [ $(VERBOSITY) -gt 0 ]; then \ | |
89 echo "[all objectives cleaned]"; \ | |
90 fi | |
91 | |
92 distclean: clean | |
93 @if [ "x$(SUBDIRS)" != "x" ]; then \ | |
94 for i in $(SUBDIRS); do \ | |
95 if [ $(VERBOSITY) -gt 0 ]; then \ | |
96 echo "[distcleaning subobjective: $$i]"; \ | |
97 fi; \ | |
98 (cd $$i; $(MAKE) distclean || exit; cd ..); \ | |
99 done; \ | |
100 fi | |
101 @if [ -f Makefile.in ]; then \ | |
102 rm -f Makefile; \ | |
103 fi | |
104 @if [ -f mk/rules.mk ]; then \ | |
105 rm -f mk/rules.mk; \ | |
106 fi | |
107 | |
108 build: | |
109 $(MAKE) build-prehook | |
110 @if [ "x$(SUBDIRS)" != "x" ]; then \ | |
111 for i in $(SUBDIRS); do \ | |
112 if [ $(VERBOSITY) -gt 0 ]; then \ | |
113 echo "[building subobjective: $$i]"; \ | |
114 fi; \ | |
115 cd $$i; $(MAKE) || exit; cd ..; \ | |
116 if [ $(VERBOSITY) -gt 0 ]; then \ | |
117 echo "[finished subobjective: $$i]"; \ | |
118 fi; \ | |
119 done; \ | |
120 fi | |
121 @if [ "x$(OBJECTIVE_LIBS)" != "x" ]; then \ | |
122 for i in $(OBJECTIVE_LIBS); do \ | |
123 if [ $(VERBOSITY) -gt 0 ]; then \ | |
124 echo "[building library objective: $$i]"; \ | |
125 fi; \ | |
126 $(MAKE) $$i || exit; \ | |
127 if [ $(VERBOSITY) -gt 0 ]; then \ | |
128 echo "[finished library objective: $$i]"; \ | |
129 fi; \ | |
130 done; \ | |
131 fi | |
132 @if [ "x$(OBJECTIVE_LIBS_NOINST)" != "x" ]; then \ | |
133 for i in $(OBJECTIVE_LIBS_NOINST); do \ | |
134 if [ $(VERBOSITY) -gt 0 ]; then \ | |
135 echo "[building library dependency: $$i]"; \ | |
136 fi; \ | |
137 $(MAKE) $$i || exit; \ | |
138 if [ $(VERBOSITY) -gt 0 ]; then \ | |
139 echo "[finished library dependency: $$i]"; \ | |
140 fi; \ | |
141 done; \ | |
142 fi | |
143 @if test "x$(OBJECTIVE_BINS)" != "x"; then \ | |
144 for i in $(OBJECTIVE_BINS); do \ | |
145 if [ $(VERBOSITY) -gt 0 ]; then \ | |
146 echo "[building binary objective: $$i]"; \ | |
147 fi; \ | |
148 $(MAKE) $$i || exit; \ | |
149 if [ $(VERBOSITY) -gt 0 ]; then \ | |
150 echo "[finished binary objective: $$i]"; \ | |
151 fi; \ | |
152 done; \ | |
153 fi | |
154 $(MAKE) build-posthook | |
155 @if [ $(VERBOSITY) -gt 0 ]; then \ | |
156 echo "[all objectives built]"; \ | |
157 fi | |
158 | |
159 .c.o: | |
160 @if [ $(SHOW_CFLAGS) -eq 1 ]; then \ | |
161 printf "%10s %-20s (%s)\n" CC $< "${CFLAGS}"; \ | |
162 else \ | |
163 printf "%10s %-20s\n" CC $<; \ | |
164 fi; | |
165 $(CC) $(CFLAGS) -c $< -o $@ | |
166 | |
167 .cc.o .cxx.o: | |
168 @if [ $(SHOW_CFLAGS) -eq 1 ]; then \ | |
169 printf "%10s %-20s (%s)\n" CXX $< "${CXXFLAGS}"; \ | |
170 else \ | |
171 printf "%10s %-20s\n" CXX $<; \ | |
172 fi; | |
173 $(CXX) $(CXXFLAGS) -c $< -o $@ | |
174 | |
175 $(OBJECTIVE_LIBS): $(OBJECTS) | |
176 if [ "x$(OBJECTS)" != "x" ]; then \ | |
177 $(MAKE) $(OBJECTS) || exit; \ | |
178 printf "%10s %-20s\n" LINK $@; \ | |
179 (if [ "x$(SHARED_SUFFIX)" = "xso" ]; then \ | |
180 (if [ "x$(OBJECTIVE_SONAME_SUFFIX)" != "x" ]; then \ | |
181 $(CC) $(PICLDFLAGS) -o $@ -Wl,-soname=$@.$(OBJECTIVE_SONAME_SUFFIX) $(OBJECTS) $(LDFLAGS) $(LIBADD); \ | |
182 else \ | |
183 $(CC) $(PICLDFLAGS) -o $@ -Wl,-soname=$@ $(OBJECTS) $(LDFLAGS) $(LIBADD); \ | |
184 fi;) \ | |
185 else \ | |
186 $(CC) $(PICLDFLAGS) -o $@ $(OBJECTS) $(LDFLAGS) $(LIBADD); \ | |
187 fi;) \ | |
188 fi | |
189 | |
190 %.a: $(OBJECTS) | |
191 if [ "x$(OBJECTS)" != "x" ]; then \ | |
192 $(MAKE) $(OBJECTS) || exit; \ | |
193 printf "%10s %-20s\n" LINK $@; \ | |
194 $(AR) cq $@ $(OBJECTS); \ | |
195 fi | |
196 | |
197 $(OBJECTIVE_BINS): $(OBJECTS) | |
198 if [ "x$(OBJECTS)" != "x" ]; then \ | |
199 $(MAKE) $(OBJECTS) || exit; \ | |
200 printf "%10s %-20s\n" LINK $@; \ | |
201 $(CC) -o $@ $(OBJECTS) $(LDFLAGS) $(LIBADD); \ | |
202 fi | |
203 | |
204 clean-prehook: | |
205 clean-posthook: | |
206 build-prehook: | |
207 build-posthook: | |
208 install-prehook: | |
209 install-posthook: | |
210 | |
211 # compatibility with automake follows | |
212 am--refresh: | |
213 | |
214 mk/rules.mk: | |
215 @if [ -f "configure" ]; then \ | |
216 echo "[building rules.mk for posix target, run configure manually if you do not want this]"; \ | |
217 sh configure $(CONFIG_OPTS); \ | |
218 echo "[complete]"; \ | |
219 fi | |
220 |