4 $(MAKE
) install-prehook
5 @for i in
$(BINDIR
) $(LIBDIR
) $(INCLUDEDIR
); do \
6 if
[ ! -d
$(DESTDIR
)$$i ]; then \
7 $(INSTALL
) -d
-m
755 $(DESTDIR
)$$i; \
10 @if
[ "x$(SUBDIRS)" != "x" ]; then \
11 for i in
$(SUBDIRS
); do \
12 if
[ $(VERBOSITY
) -gt
0 ]; then \
13 echo
"[installing subobjective: $$i]"; \
15 cd
$$i; OVERLAYS
="" $(MAKE
) install || exit
; cd ..
; \
18 @if
[ "x$(OBJECTIVE_DIRECTORIES)" != "x" ]; then \
19 for i in
$(OBJECTIVE_DIRECTORIES
); do \
20 printf
"%10s %-20s\n" MKDIR
$$i; \
21 $(INSTALL
) -d
-m
755 $(DESTDIR
)$$i; \
24 @if
[ "x$(OBJECTIVE_BINS)" != "x" ]; then \
25 for i in
$(OBJECTIVE_BINS
); do \
26 printf
"%10s %-20s (-> $(DESTDIR)$(BINDIR))\n" INSTALL
$$i; \
27 if
[ "x$(DRY)" = "x" ]; then \
28 $(INSTALL
) $(INSTALL_OVERRIDE
) $$i $(DESTDIR
)$(BINDIR
)/$$i; \
32 @if
[ "x$(OBJECTIVE_DATA)" != "x" ]; then \
33 if
[ "x$(SETEGID)" != "x" ]; then \
34 for i in
$(OBJECTIVE_DATA
); do \
35 source
=`echo $$i | cut -d ":" -f1`; \
36 destination
=`echo $$i | cut -d ":" -f2`; \
37 printf
"%10s %-20s (-> $(DESTDIR)$$destination)\n" INSTALL
$$source; \
38 if
[ "x$(DRY)" = "x" ]; then \
39 if
[ ! -d
$(DESTDIR
)$$destination ]; then \
40 $(INSTALL
) -d
-m
755 $(DESTDIR
)$$destination; \
42 $(INSTALL_DATA
) $(INSTALL_OVERRIDE
) $$source $(DESTDIR
)$$destination; \
47 $(MAKE
) install-posthook
48 @if
[ $(VERBOSITY
) -gt
0 ]; then \
49 echo
"[all objectives installed]"; \
54 @if
[ "x$(OVERLAYS)" != "x" ]; then \
55 for i in
`find $(OVERLAYS) -type d -maxdepth 1 -mindepth 1`; do \
56 if
[ $(VERBOSITY
) -gt
0 ]; then \
57 echo
"[cleaning overlay: $$i]"; \
59 cd
$$i; OVERLAYS
="" $(MAKE
) clean || exit
; cd ..
; \
62 @if
[ "x$(SUBDIRS)" != "x" ]; then \
63 for i in
$(SUBDIRS
); do \
64 if
[ $(VERBOSITY
) -gt
0 ]; then \
65 echo
"[cleaning subobjective: $$i]"; \
67 cd
$$i; OVERLAYS
="" $(MAKE
) clean || exit
; cd ..
; \
70 $(MAKE
) clean-posthook
71 rm -f
*.o
*.lo
*.so
*.a
*.sl .depend-done .depend
73 @if
[ "x$(OBJECTIVE_BINS)" != "x" ]; then \
74 for i in
$(OBJECTIVE_BINS
); do \
78 @if
[ "x$(OBJECTIVE_LIBS)" != "x" ]; then \
79 for i in
$(OBJECTIVE_LIBS
); do \
83 @if
[ "x$(OBJECTIVE_LIBS_NOINST)" != "x" ]; then \
84 for i in
$(OBJECTIVE_LIBS_NOINST
); do \
88 @if
[ $(VERBOSITY
) -gt
0 ]; then \
89 echo
"[all objectives cleaned]"; \
93 @if
[ "x$(OVERLAYS)" != "x" ]; then \
94 for i in
`find $(OVERLAYS) -type d -maxdepth 1 -mindepth 1`; do \
95 if
[ $(VERBOSITY
) -gt
0 ]; then \
96 echo
"[distcleaning overlay: $$i]"; \
98 cd
$$i; OVERLAYS
="" $(MAKE
) distclean || exit
; cd ..
; \
101 @if
[ "x$(SUBDIRS)" != "x" ]; then \
102 for i in
$(SUBDIRS
); do \
103 if
[ $(VERBOSITY
) -gt
0 ]; then \
104 echo
"[distcleaning subobjective: $$i]"; \
106 cd
$$i; OVERLAYS
="" $(MAKE
) distclean || exit
; cd ..
; \
109 @if
[ -f Makefile.in
]; then \
112 @if
[ -f mk
/rules.mk
]; then \
117 $(MAKE
) build-prehook
118 @if
[ "x$(OVERLAYS)" != "x" ]; then \
119 for i in
`find $(OVERLAYS) -type d -maxdepth 1 -mindepth 1`; do \
120 if
[ $(VERBOSITY
) -gt
0 ]; then \
121 echo
"[building overlay: $$i]"; \
123 cd
$$i; OVERLAYS
="" $(MAKE
) || exit
; cd ..
; \
124 if
[ $(VERBOSITY
) -gt
0 ]; then \
125 echo
"[finished overlay: $$i]"; \
129 @if
[ "x$(SUBDIRS)" != "x" ]; then \
130 for i in
$(SUBDIRS
); do \
131 if
[ $(VERBOSITY
) -gt
0 ]; then \
132 echo
"[building subobjective: $$i]"; \
134 cd
$$i; OVERLAYS
="" $(MAKE
) || exit
; cd ..
; \
135 if
[ $(VERBOSITY
) -gt
0 ]; then \
136 echo
"[finished subobjective: $$i]"; \
140 @if
[ "x$(OBJECTIVE_LIBS)" != "x" ]; then \
141 for i in
$(OBJECTIVE_LIBS
); do \
142 if
[ $(VERBOSITY
) -gt
0 ]; then \
143 echo
"[building library objective: $$i]"; \
145 $(MAKE
) $$i || exit
; \
146 if
[ $(VERBOSITY
) -gt
0 ]; then \
147 echo
"[finished library objective: $$i]"; \
151 @if
[ "x$(OBJECTIVE_LIBS_NOINST)" != "x" ]; then \
152 for i in
$(OBJECTIVE_LIBS_NOINST
); do \
153 if
[ $(VERBOSITY
) -gt
0 ]; then \
154 echo
"[building library dependency: $$i]"; \
156 $(MAKE
) $$i || exit
; \
157 if
[ $(VERBOSITY
) -gt
0 ]; then \
158 echo
"[finished library dependency: $$i]"; \
162 @if
test "x$(OBJECTIVE_BINS)" != "x"; then \
163 for i in
$(OBJECTIVE_BINS
); do \
164 if
[ $(VERBOSITY
) -gt
0 ]; then \
165 echo
"[building binary objective: $$i]"; \
167 $(MAKE
) $$i || exit
; \
168 if
[ $(VERBOSITY
) -gt
0 ]; then \
169 echo
"[finished binary objective: $$i]"; \
173 $(MAKE
) build-posthook
174 @if
[ $(VERBOSITY
) -gt
0 ]; then \
175 echo
"[all objectives built]"; \
179 @if
[ $(SHOW_CFLAGS
) -eq
1 ]; then \
180 printf
"%10s %-20s (%s)\n" CC
$< "${CFLAGS}"; \
182 printf
"%10s %-20s\n" CC
$<; \
184 $(CC
) $(CFLAGS
) -c
$< -o
$@
187 @if
[ $(SHOW_CFLAGS
) -eq
1 ]; then \
188 printf
"%10s %-20s (%s)\n" CXX
$< "${CXXFLAGS}"; \
190 printf
"%10s %-20s\n" CXX
$<; \
192 $(CXX
) $(CXXFLAGS
) -c
$< -o
$@
194 $(OBJECTIVE_LIBS
): $(OBJECTS
)
195 if
[ "x$(OBJECTS)" != "x" ]; then \
196 $(MAKE
) $(OBJECTS
) || exit
; \
197 printf
"%10s %-20s\n" LINK
$@
; \
198 (if
[ "x$(SHARED_SUFFIX)" = "x.so" ]; then \
199 (if
[ "x$(OBJECTIVE_SONAME_SUFFIX)" != "x" ]; then \
200 $(CC
) $(PICLDFLAGS
) -o
$@
-Wl
,-h
$@.
$(OBJECTIVE_SONAME_SUFFIX
) $(OBJECTS
) $(LDFLAGS
) $(LIBADD
); \
202 $(CC
) $(PICLDFLAGS
) -o
$@
-Wl
,-h
$@
$(OBJECTS
) $(LDFLAGS
) $(LIBADD
); \
205 $(CC
) $(PICLDFLAGS
) -o
$@
$(OBJECTS
) $(LDFLAGS
) $(LIBADD
); \
210 if
[ "x$(OBJECTS)" != "x" ]; then \
211 $(MAKE
) $(OBJECTS
) || exit
; \
212 printf
"%10s %-20s\n" LINK
$@
; \
213 $(AR
) cr
$@
$(OBJECTS
); \
216 $(OBJECTIVE_BINS
): $(OBJECTS
)
217 if
[ "x$(OBJECTS)" != "x" ]; then \
218 $(MAKE
) $(OBJECTS
) || exit
; \
219 printf
"%10s %-20s\n" LINK
$@
; \
220 $(CC
) -o
$@
$(OBJECTS
) $(LDFLAGS
) $(LIBADD
); \
231 @if
[ -f
"configure" ]; then \
232 echo
"[building rules.mk for posix target, run configure manually if you do not want this]"; \
233 sh configure
$(CONFIG_OPTS
); \
237 .PHONY
: .depend depend
clean distclean
240 # default depend rule. if something else is needed -- override depend target
242 @if
[ "x$(SUBDIRS)" != "x" ]; then \
243 for i in
$(SUBDIRS
); do \
244 if
[ $(VERBOSITY
) -gt
0 ]; then \
245 echo
"[building depend file for subobjective: $$i]"; \
247 cd
$$i; touch .depend
; $(MAKE
) -f Makefile depend || exit
; cd ..
; \
248 if
[ $(VERBOSITY
) -gt
0 ]; then \
249 echo
"[finished subobjective: $$i]"; \
253 if
[ ! -f .depend-done
]; then \
254 for i in
${SOURCES}; do \
255 echo
"[generating dependencies for objective: $$i]"; \
256 ${CC} -MM
${PICFLAGS} ${CPPFLAGS} ${CFLAGS} $$i >> .depend
; \
258 touch .depend-done
; \
261 # compatibility with automake follows