annotate mk/objective.mk @ 1509:ae369659010a trunk

[svn] Added awareness of the difference between stopped and playing.
author deitarion
date Sun, 06 Aug 2006 02:52:27 -0700
parents 43547cd5e74e
children e402e0217870
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
562
5cdadcf74ec3 [svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff changeset
1 # Shut up GNU make
819
e02f438d93c1 [svn] revert erroneous change in objective.mk
giacomo
parents: 818
diff changeset
2 .SILENT:
562
5cdadcf74ec3 [svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff changeset
3
1213
a4782cc65887 [svn] - no more "none"
nenolod
parents: 1209
diff changeset
4 OBJECTIVE_DIRECTORIES =
a4782cc65887 [svn] - no more "none"
nenolod
parents: 1209
diff changeset
5 OBJECTIVE_LIBS =
a4782cc65887 [svn] - no more "none"
nenolod
parents: 1209
diff changeset
6 OBJECTIVE_LIBS_NOINST =
a4782cc65887 [svn] - no more "none"
nenolod
parents: 1209
diff changeset
7 OBJECTIVE_BINS =
a4782cc65887 [svn] - no more "none"
nenolod
parents: 1209
diff changeset
8 OBJECTIVE_DATA =
a4782cc65887 [svn] - no more "none"
nenolod
parents: 1209
diff changeset
9 SUBDIRS =
a4782cc65887 [svn] - no more "none"
nenolod
parents: 1209
diff changeset
10 HEADERS =
1217
ce65f2a60bdd [svn] - tell users to use GNU make
nenolod
parents: 1215
diff changeset
11 V = 0
ce65f2a60bdd [svn] - tell users to use GNU make
nenolod
parents: 1215
diff changeset
12 VERBOSE ?= $(V)
873
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
13 VERBOSITY = 0
1217
ce65f2a60bdd [svn] - tell users to use GNU make
nenolod
parents: 1215
diff changeset
14 SHOW_CFLAGS ?= $(VERBOSE)
1161
c60ec089cd65 [svn] Add V=1 shorthand for SHOW_CFLAGS, patch by vapier (Gentoo).
chainsaw
parents: 1058
diff changeset
15
595
13a8fd9cbc33 [svn] fix some path issues
nenolod
parents: 593
diff changeset
16 LIBDIR = $(libdir)
13a8fd9cbc33 [svn] fix some path issues
nenolod
parents: 593
diff changeset
17 BINDIR = $(bindir)
671
3e03da73a514 [svn] install HEADERS properly (oops)
nenolod
parents: 660
diff changeset
18 INCLUDEDIR = $(pkgincludedir)
754
d7404302a6b3 [svn] add kludge for xorg on pkgsrc
nenolod
parents: 747
diff changeset
19 CFLAGS += -DHAVE_CONFIG_H -I/usr/pkg/include -I/usr/pkg/xorg/include
d7404302a6b3 [svn] add kludge for xorg on pkgsrc
nenolod
parents: 747
diff changeset
20 CXXFLAGS += -DHAVE_CONFIG_H -I/usr/pkg/include -I/usr/pkg/xorg/include
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
21
562
5cdadcf74ec3 [svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff changeset
22 default: all
5cdadcf74ec3 [svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff changeset
23 all: build
5cdadcf74ec3 [svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff changeset
24
973
8279241db8b9 [svn] - compile objectives before installing them (oops)
nenolod
parents: 912
diff changeset
25 install: build
562
5cdadcf74ec3 [svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff changeset
26 $(MAKE) install-prehook
708
e4069b00b174 [svn] - fix
nenolod
parents: 705
diff changeset
27 @for i in $(BINDIR) $(LIBDIR) $(INCLUDEDIR); do \
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
28 if [ ! -d $(DESTDIR)/$$i ]; then \
705
93c09e025180 [svn] - more intelligently handle directory creation
nenolod
parents: 699
diff changeset
29 $(INSTALL) -d -m 755 $(DESTDIR)/$$i; \
708
e4069b00b174 [svn] - fix
nenolod
parents: 705
diff changeset
30 fi; \
e4069b00b174 [svn] - fix
nenolod
parents: 705
diff changeset
31 done;
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
32 @if [ "x$(SUBDIRS)" != "x" ]; then \
593
81a746ef39d0 [svn] install subobjectives
nenolod
parents: 581
diff changeset
33 for i in $(SUBDIRS); do \
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
34 if [ $(VERBOSITY) -gt 0 ]; then \
873
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
35 echo "[installing subobjective: $$i]"; \
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
36 fi; \
870
c7dca48d8178 [svn] - properly recurse build errors
nenolod
parents: 829
diff changeset
37 (cd $$i; $(MAKE) install || exit; cd ..); \
593
81a746ef39d0 [svn] install subobjectives
nenolod
parents: 581
diff changeset
38 done; \
81a746ef39d0 [svn] install subobjectives
nenolod
parents: 581
diff changeset
39 fi
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
40 @if [ "x$(OBJECTIVE_DIRECTORIES)" != "x" ]; then \
578
d89a7b85528d [svn] buildsystem improvements
nenolod
parents: 570
diff changeset
41 for i in $(OBJECTIVE_DIRECTORIES); do \
d89a7b85528d [svn] buildsystem improvements
nenolod
parents: 570
diff changeset
42 printf "%10s %-20s\n" MKDIR $$i; \
d89a7b85528d [svn] buildsystem improvements
nenolod
parents: 570
diff changeset
43 $(INSTALL) -d -m 755 $(DESTDIR)/$$i; \
d89a7b85528d [svn] buildsystem improvements
nenolod
parents: 570
diff changeset
44 done; \
d89a7b85528d [svn] buildsystem improvements
nenolod
parents: 570
diff changeset
45 fi
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
46 @if [ "x$(HEADERS)" != "x" ]; then \
658
a019c0e28b28 [svn] If the makefile has a HEADERS variable, then install them to the
nenolod
parents: 626
diff changeset
47 for i in $(HEADERS); do \
a019c0e28b28 [svn] If the makefile has a HEADERS variable, then install them to the
nenolod
parents: 626
diff changeset
48 printf "%10s %-20s\n" INSTALL $$i; \
671
3e03da73a514 [svn] install HEADERS properly (oops)
nenolod
parents: 660
diff changeset
49 $(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
50 done; \
a019c0e28b28 [svn] If the makefile has a HEADERS variable, then install them to the
nenolod
parents: 626
diff changeset
51 fi
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
52 @if [ "x$(OBJECTIVE_LIBS)" != "x" ]; then \
578
d89a7b85528d [svn] buildsystem improvements
nenolod
parents: 570
diff changeset
53 for i in $(OBJECTIVE_LIBS); do \
d89a7b85528d [svn] buildsystem improvements
nenolod
parents: 570
diff changeset
54 printf "%10s %-20s\n" INSTALL $$i; \
d89a7b85528d [svn] buildsystem improvements
nenolod
parents: 570
diff changeset
55 $(INSTALL) $(INSTALL_OVERRIDE) $$i $(DESTDIR)/$(LIBDIR)/$$i; \
d89a7b85528d [svn] buildsystem improvements
nenolod
parents: 570
diff changeset
56 done; \
d89a7b85528d [svn] buildsystem improvements
nenolod
parents: 570
diff changeset
57 fi
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
58 @if [ "x$(OBJECTIVE_BINS)" != "x" ]; then \
578
d89a7b85528d [svn] buildsystem improvements
nenolod
parents: 570
diff changeset
59 for i in $(OBJECTIVE_BINS); do \
d89a7b85528d [svn] buildsystem improvements
nenolod
parents: 570
diff changeset
60 printf "%10s %-20s\n" INSTALL $$i; \
d89a7b85528d [svn] buildsystem improvements
nenolod
parents: 570
diff changeset
61 $(INSTALL) $(INSTALL_OVERRIDE) $$i $(DESTDIR)/$(BINDIR)/$$i; \
d89a7b85528d [svn] buildsystem improvements
nenolod
parents: 570
diff changeset
62 done; \
d89a7b85528d [svn] buildsystem improvements
nenolod
parents: 570
diff changeset
63 fi;
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
64 @if [ "x$(OBJECTIVE_DATA)" != "x" ]; then \
713
cf7b5a288564 [svn] rule for installing data
nenolod
parents: 712
diff changeset
65 for i in $(OBJECTIVE_DATA); do \
715
840c49684e2c [svn] - fix data rule (whitespace)
nenolod
parents: 713
diff changeset
66 source=`echo $$i | cut -d ":" -f1`; \
840c49684e2c [svn] - fix data rule (whitespace)
nenolod
parents: 713
diff changeset
67 destination=`echo $$i | cut -d ":" -f2`; \
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
68 if [ ! -d $(DESTDIR)/$$destination ]; then \
723
d108cc745b64 [svn] - create directories that aren't there in the install phase
nenolod
parents: 715
diff changeset
69 $(INSTALL) -d -m 755 $(DESTDIR)/$$destination; \
d108cc745b64 [svn] - create directories that aren't there in the install phase
nenolod
parents: 715
diff changeset
70 fi; \
713
cf7b5a288564 [svn] rule for installing data
nenolod
parents: 712
diff changeset
71 printf "%10s %-20s\n" INSTALL $$source; \
cf7b5a288564 [svn] rule for installing data
nenolod
parents: 712
diff changeset
72 $(INSTALL_DATA) $(INSTALL_OVERRIDE) $$source $(DESTDIR)/$$destination; \
cf7b5a288564 [svn] rule for installing data
nenolod
parents: 712
diff changeset
73 done; \
cf7b5a288564 [svn] rule for installing data
nenolod
parents: 712
diff changeset
74 fi
562
5cdadcf74ec3 [svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff changeset
75 $(MAKE) install-posthook
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
76 @if [ $(VERBOSITY) -gt 0 ]; then \
873
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
77 echo "[all objectives installed]"; \
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
78 fi
562
5cdadcf74ec3 [svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff changeset
79
563
0879e7ad85b1 [svn] some buildsystem changes... nothing notable yet
nenolod
parents: 562
diff changeset
80 clean:
0879e7ad85b1 [svn] some buildsystem changes... nothing notable yet
nenolod
parents: 562
diff changeset
81 $(MAKE) clean-prehook
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
82 @if [ "x$(SUBDIRS)" != "x" ]; then \
567
2ed2993cd920 [svn] fix make clean
nenolod
parents: 566
diff changeset
83 for i in $(SUBDIRS); do \
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
84 if [ $(VERBOSITY) -gt 0 ]; then \
873
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
85 echo "[cleaning subobjective: $$i]"; \
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
86 fi; \
870
c7dca48d8178 [svn] - properly recurse build errors
nenolod
parents: 829
diff changeset
87 (cd $$i; $(MAKE) clean || exit; cd ..); \
567
2ed2993cd920 [svn] fix make clean
nenolod
parents: 566
diff changeset
88 done; \
2ed2993cd920 [svn] fix make clean
nenolod
parents: 566
diff changeset
89 fi
563
0879e7ad85b1 [svn] some buildsystem changes... nothing notable yet
nenolod
parents: 562
diff changeset
90 $(MAKE) clean-posthook
1215
f22bd1fa1579 [svn] - improvements
nenolod
parents: 1214
diff changeset
91 rm -f *.o *.lo *.so *.a *.sl
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
92 @if [ "x$(OBJECTIVE_BINS)" != "x" ]; then \
912
1dd2afe391ec [svn] binaries (audacious,audacious-arts-helper) should be deleted on clean requests
giacomo
parents: 876
diff changeset
93 for i in $(OBJECTIVE_BINS); do \
1215
f22bd1fa1579 [svn] - improvements
nenolod
parents: 1214
diff changeset
94 rm -f $$i; \
912
1dd2afe391ec [svn] binaries (audacious,audacious-arts-helper) should be deleted on clean requests
giacomo
parents: 876
diff changeset
95 done; \
1dd2afe391ec [svn] binaries (audacious,audacious-arts-helper) should be deleted on clean requests
giacomo
parents: 876
diff changeset
96 fi
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
97 @if [ "x$(OBJECTIVE_LIBS)" != "x" ]; then \
1057
4dfe83e30bfa [svn] - link against 'libaudacious.so.2.0.0' instead of 'libaudacious.so'. This brings us in full compliance of debian
nenolod
parents: 973
diff changeset
98 for i in $(OBJECTIVE_LIBS); do \
1215
f22bd1fa1579 [svn] - improvements
nenolod
parents: 1214
diff changeset
99 rm -f $$i; \
1057
4dfe83e30bfa [svn] - link against 'libaudacious.so.2.0.0' instead of 'libaudacious.so'. This brings us in full compliance of debian
nenolod
parents: 973
diff changeset
100 done; \
4dfe83e30bfa [svn] - link against 'libaudacious.so.2.0.0' instead of 'libaudacious.so'. This brings us in full compliance of debian
nenolod
parents: 973
diff changeset
101 fi
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
102 @if [ "x$(OBJECTIVE_LIBS_NOINST)" != "x" ]; then \
1057
4dfe83e30bfa [svn] - link against 'libaudacious.so.2.0.0' instead of 'libaudacious.so'. This brings us in full compliance of debian
nenolod
parents: 973
diff changeset
103 for i in $(OBJECTIVE_LIBS_NOINST); do \
1215
f22bd1fa1579 [svn] - improvements
nenolod
parents: 1214
diff changeset
104 rm -f $$i; \
1057
4dfe83e30bfa [svn] - link against 'libaudacious.so.2.0.0' instead of 'libaudacious.so'. This brings us in full compliance of debian
nenolod
parents: 973
diff changeset
105 done; \
4dfe83e30bfa [svn] - link against 'libaudacious.so.2.0.0' instead of 'libaudacious.so'. This brings us in full compliance of debian
nenolod
parents: 973
diff changeset
106 fi
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
107 @if [ $(VERBOSITY) -gt 0 ]; then \
873
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
108 echo "[all objectives cleaned]"; \
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
109 fi
563
0879e7ad85b1 [svn] some buildsystem changes... nothing notable yet
nenolod
parents: 562
diff changeset
110
0879e7ad85b1 [svn] some buildsystem changes... nothing notable yet
nenolod
parents: 562
diff changeset
111 distclean: clean
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
112 @if [ "x$(SUBDIRS)" != "x" ]; then \
712
430419abf723 [svn] - distclean enhancements
nenolod
parents: 708
diff changeset
113 for i in $(SUBDIRS); do \
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
114 if [ $(VERBOSITY) -gt 0 ]; then \
873
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
115 echo "[distcleaning subobjective: $$i]"; \
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
116 fi; \
870
c7dca48d8178 [svn] - properly recurse build errors
nenolod
parents: 829
diff changeset
117 (cd $$i; $(MAKE) distclean || exit; cd ..); \
712
430419abf723 [svn] - distclean enhancements
nenolod
parents: 708
diff changeset
118 done; \
430419abf723 [svn] - distclean enhancements
nenolod
parents: 708
diff changeset
119 fi
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
120 @if [ -f Makefile.in ]; then \
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
121 rm -f Makefile; \
712
430419abf723 [svn] - distclean enhancements
nenolod
parents: 708
diff changeset
122 fi
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
123 @if [ -f mk/rules.mk ]; then \
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
124 rm -f mk/rules.mk; \
712
430419abf723 [svn] - distclean enhancements
nenolod
parents: 708
diff changeset
125 fi
563
0879e7ad85b1 [svn] some buildsystem changes... nothing notable yet
nenolod
parents: 562
diff changeset
126
562
5cdadcf74ec3 [svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff changeset
127 build:
1217
ce65f2a60bdd [svn] - tell users to use GNU make
nenolod
parents: 1215
diff changeset
128 # test for GNU make
1323
43547cd5e74e [svn] - smarter way to detect gmake
nenolod
parents: 1322
diff changeset
129 @if [ ! "$(MAKE_VERSION)" ]; then \
1217
ce65f2a60bdd [svn] - tell users to use GNU make
nenolod
parents: 1215
diff changeset
130 echo "[Your make is not properly supported, please use GNU make.]"; \
ce65f2a60bdd [svn] - tell users to use GNU make
nenolod
parents: 1215
diff changeset
131 exit 1; \
ce65f2a60bdd [svn] - tell users to use GNU make
nenolod
parents: 1215
diff changeset
132 fi;
562
5cdadcf74ec3 [svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff changeset
133 $(MAKE) build-prehook
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
134 @if [ "x$(SUBDIRS)" != "x" ]; 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
135 for i in $(SUBDIRS); do \
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
136 if [ $(VERBOSITY) -gt 0 ]; then \
873
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
137 echo "[building subobjective: $$i]"; \
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
138 fi; \
872
ad32bde7829e [svn] - mistake here, we forget to pop back
nenolod
parents: 871
diff changeset
139 cd $$i; $(MAKE) || exit; cd ..; \
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
140 if [ $(VERBOSITY) -gt 0 ]; then \
873
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
141 echo "[finished subobjective: $$i]"; \
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
142 fi; \
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
143 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
144 fi
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
145 @if [ "x$(OBJECTIVE_LIBS)" != "x" ]; then \
581
572cbb4c25ba [svn] more fixes
nenolod
parents: 580
diff changeset
146 for i in $(OBJECTIVE_LIBS); do \
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
147 if [ $(VERBOSITY) -gt 0 ]; then \
873
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
148 echo "[building library objective: $$i]"; \
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
149 fi; \
870
c7dca48d8178 [svn] - properly recurse build errors
nenolod
parents: 829
diff changeset
150 $(MAKE) $$i || exit; \
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
151 if [ $(VERBOSITY) -gt 0 ]; then \
873
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
152 echo "[finished library objective: $$i]"; \
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
153 fi; \
581
572cbb4c25ba [svn] more fixes
nenolod
parents: 580
diff changeset
154 done; \
572cbb4c25ba [svn] more fixes
nenolod
parents: 580
diff changeset
155 fi
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
156 @if [ "x$(OBJECTIVE_LIBS_NOINST)" != "x" ]; then \
581
572cbb4c25ba [svn] more fixes
nenolod
parents: 580
diff changeset
157 for i in $(OBJECTIVE_LIBS_NOINST); do \
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
158 if [ $(VERBOSITY) -gt 0 ]; then \
873
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
159 echo "[building library dependency: $$i]"; \
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
160 fi; \
870
c7dca48d8178 [svn] - properly recurse build errors
nenolod
parents: 829
diff changeset
161 $(MAKE) $$i || exit; \
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
162 if [ $(VERBOSITY) -gt 0 ]; then \
873
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
163 echo "[finished library dependency: $$i]"; \
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
164 fi; \
581
572cbb4c25ba [svn] more fixes
nenolod
parents: 580
diff changeset
165 done; \
572cbb4c25ba [svn] more fixes
nenolod
parents: 580
diff changeset
166 fi
1213
a4782cc65887 [svn] - no more "none"
nenolod
parents: 1209
diff changeset
167 @if test "x$(OBJECTIVE_BINS)" != "x"; then \
581
572cbb4c25ba [svn] more fixes
nenolod
parents: 580
diff changeset
168 for i in $(OBJECTIVE_BINS); do \
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
169 if [ $(VERBOSITY) -gt 0 ]; then \
873
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
170 echo "[building binary objective: $$i]"; \
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
171 fi; \
870
c7dca48d8178 [svn] - properly recurse build errors
nenolod
parents: 829
diff changeset
172 $(MAKE) $$i || exit; \
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
173 if [ $(VERBOSITY) -gt 0 ]; then \
873
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
174 echo "[finished binary objective: $$i]"; \
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
175 fi; \
581
572cbb4c25ba [svn] more fixes
nenolod
parents: 580
diff changeset
176 done; \
572cbb4c25ba [svn] more fixes
nenolod
parents: 580
diff changeset
177 fi
562
5cdadcf74ec3 [svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff changeset
178 $(MAKE) build-posthook
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
179 @if [ $(VERBOSITY) -gt 0 ]; then \
873
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
180 echo "[all objectives built]"; \
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
181 fi
562
5cdadcf74ec3 [svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff changeset
182
5cdadcf74ec3 [svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff changeset
183 .c.o:
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
184 @if [ $(SHOW_CFLAGS) -eq 1 ]; then \
876
fa0dd2f5cda5 [svn] - rule reduction
nenolod
parents: 873
diff changeset
185 printf "%10s %-20s (%s)\n" CC $< "${CFLAGS}"; \
fa0dd2f5cda5 [svn] - rule reduction
nenolod
parents: 873
diff changeset
186 else \
fa0dd2f5cda5 [svn] - rule reduction
nenolod
parents: 873
diff changeset
187 printf "%10s %-20s\n" CC $<; \
fa0dd2f5cda5 [svn] - rule reduction
nenolod
parents: 873
diff changeset
188 fi;
562
5cdadcf74ec3 [svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff changeset
189 $(CC) $(CFLAGS) -c $< -o $@
5cdadcf74ec3 [svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff changeset
190
876
fa0dd2f5cda5 [svn] - rule reduction
nenolod
parents: 873
diff changeset
191 .cc.o .cpp.o .cxx.o:
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
192 @if [ $(SHOW_CFLAGS) -eq 1 ]; then \
876
fa0dd2f5cda5 [svn] - rule reduction
nenolod
parents: 873
diff changeset
193 printf "%10s %-20s (%s)\n" CXX $< "${CXXFLAGS}"; \
fa0dd2f5cda5 [svn] - rule reduction
nenolod
parents: 873
diff changeset
194 else \
fa0dd2f5cda5 [svn] - rule reduction
nenolod
parents: 873
diff changeset
195 printf "%10s %-20s\n" CXX $<; \
fa0dd2f5cda5 [svn] - rule reduction
nenolod
parents: 873
diff changeset
196 fi;
562
5cdadcf74ec3 [svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff changeset
197 $(CXX) $(CXXFLAGS) -c $< -o $@
5cdadcf74ec3 [svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff changeset
198
1214
2de9d9fcdbcf [svn] s/$(RM)/rm/ (wtf)
nenolod
parents: 1213
diff changeset
199 %.so $(OBJECTIVE_LIBS): $(OBJECTS)
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
200 if [ "x$(OBJECTS)" != "x" ]; then \
870
c7dca48d8178 [svn] - properly recurse build errors
nenolod
parents: 829
diff changeset
201 $(MAKE) $(OBJECTS) || exit; \
626
eb0c533e7c48 [svn] do not forkbomb if we have a malformed makefile
nenolod
parents: 595
diff changeset
202 printf "%10s %-20s\n" LINK $@; \
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
203 (if [ "x$(OBJECTIVE_SONAME_SUFFIX)" != "x" ]; then \
1057
4dfe83e30bfa [svn] - link against 'libaudacious.so.2.0.0' instead of 'libaudacious.so'. This brings us in full compliance of debian
nenolod
parents: 973
diff changeset
204 $(CC) -fPIC -DPIC -shared -o $@ -Wl,-soname=$@.$(OBJECTIVE_SONAME_SUFFIX) $(OBJECTS) $(LDFLAGS) $(LIBADD); \
4dfe83e30bfa [svn] - link against 'libaudacious.so.2.0.0' instead of 'libaudacious.so'. This brings us in full compliance of debian
nenolod
parents: 973
diff changeset
205 else \
4dfe83e30bfa [svn] - link against 'libaudacious.so.2.0.0' instead of 'libaudacious.so'. This brings us in full compliance of debian
nenolod
parents: 973
diff changeset
206 $(CC) -fPIC -DPIC -shared -o $@ -Wl,-soname=$@ $(OBJECTS) $(LDFLAGS) $(LIBADD); \
4dfe83e30bfa [svn] - link against 'libaudacious.so.2.0.0' instead of 'libaudacious.so'. This brings us in full compliance of debian
nenolod
parents: 973
diff changeset
207 fi;) \
626
eb0c533e7c48 [svn] do not forkbomb if we have a malformed makefile
nenolod
parents: 595
diff changeset
208 fi
578
d89a7b85528d [svn] buildsystem improvements
nenolod
parents: 570
diff changeset
209
580
07e77b804697 [svn] ditto for static libraries
nenolod
parents: 579
diff changeset
210 %.a: $(OBJECTS)
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
211 if [ "x$(OBJECTS)" != "x" ]; then \
870
c7dca48d8178 [svn] - properly recurse build errors
nenolod
parents: 829
diff changeset
212 $(MAKE) $(OBJECTS) || exit; \
626
eb0c533e7c48 [svn] do not forkbomb if we have a malformed makefile
nenolod
parents: 595
diff changeset
213 printf "%10s %-20s\n" LINK $@; \
eb0c533e7c48 [svn] do not forkbomb if we have a malformed makefile
nenolod
parents: 595
diff changeset
214 $(AR) cq $@ $(OBJECTS); \
eb0c533e7c48 [svn] do not forkbomb if we have a malformed makefile
nenolod
parents: 595
diff changeset
215 fi
580
07e77b804697 [svn] ditto for static libraries
nenolod
parents: 579
diff changeset
216
579
785ec2ad4ea4 [svn] try to add a "default" make rule for $(OBJECTIVE_BINS)
nenolod
parents: 578
diff changeset
217 $(OBJECTIVE_BINS): $(OBJECTS)
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
218 if [ "x$(OBJECTS)" != "x" ]; then \
870
c7dca48d8178 [svn] - properly recurse build errors
nenolod
parents: 829
diff changeset
219 $(MAKE) $(OBJECTS) || exit; \
626
eb0c533e7c48 [svn] do not forkbomb if we have a malformed makefile
nenolod
parents: 595
diff changeset
220 printf "%10s %-20s\n" LINK $@; \
eb0c533e7c48 [svn] do not forkbomb if we have a malformed makefile
nenolod
parents: 595
diff changeset
221 $(CC) -o $@ $(OBJECTS) $(LDFLAGS) $(LIBADD); \
eb0c533e7c48 [svn] do not forkbomb if we have a malformed makefile
nenolod
parents: 595
diff changeset
222 fi
579
785ec2ad4ea4 [svn] try to add a "default" make rule for $(OBJECTIVE_BINS)
nenolod
parents: 578
diff changeset
223
563
0879e7ad85b1 [svn] some buildsystem changes... nothing notable yet
nenolod
parents: 562
diff changeset
224 clean-prehook:
0879e7ad85b1 [svn] some buildsystem changes... nothing notable yet
nenolod
parents: 562
diff changeset
225 clean-posthook:
0879e7ad85b1 [svn] some buildsystem changes... nothing notable yet
nenolod
parents: 562
diff changeset
226 build-prehook:
0879e7ad85b1 [svn] some buildsystem changes... nothing notable yet
nenolod
parents: 562
diff changeset
227 build-posthook:
0879e7ad85b1 [svn] some buildsystem changes... nothing notable yet
nenolod
parents: 562
diff changeset
228 install-prehook:
0879e7ad85b1 [svn] some buildsystem changes... nothing notable yet
nenolod
parents: 562
diff changeset
229 install-posthook:
0879e7ad85b1 [svn] some buildsystem changes... nothing notable yet
nenolod
parents: 562
diff changeset
230
0879e7ad85b1 [svn] some buildsystem changes... nothing notable yet
nenolod
parents: 562
diff changeset
231 # compatibility with automake follows
0879e7ad85b1 [svn] some buildsystem changes... nothing notable yet
nenolod
parents: 562
diff changeset
232 am--refresh:
1209
e67fad649f58 [svn] - make it prettier
nenolod
parents: 1161
diff changeset
233
e67fad649f58 [svn] - make it prettier
nenolod
parents: 1161
diff changeset
234 mk/rules.mk:
e67fad649f58 [svn] - make it prettier
nenolod
parents: 1161
diff changeset
235 @if [ -f "configure" ]; then \
e67fad649f58 [svn] - make it prettier
nenolod
parents: 1161
diff changeset
236 echo "[building rules.mk for posix target, run configure manually if you do not want this]"; \
1219
aa693b651fee [svn] make CONFIG_OPTS="<configure options>"
nenolod
parents: 1217
diff changeset
237 sh configure $(CONFIG_OPTS); \
1209
e67fad649f58 [svn] - make it prettier
nenolod
parents: 1161
diff changeset
238 echo "[complete]"; \
e67fad649f58 [svn] - make it prettier
nenolod
parents: 1161
diff changeset
239 fi
e67fad649f58 [svn] - make it prettier
nenolod
parents: 1161
diff changeset
240