forked from sysml/clickos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.in
262 lines (238 loc) · 11.7 KB
/
Makefile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
# Warning: this file must be usable by regular make
# (unlike the Makefiles in subdirectories).
SHELL = @SHELL@
@SUBMAKE@
PACKAGE = click
VERSION = @CLICK_VERSION@
top_srcdir = @top_srcdir@
srcdir = @srcdir@
top_builddir = .
subdir = .
conf_auxdir = @conf_auxdir@
AUTOCONF = @AUTOCONF@
PERL = @PERL@
INSTALL = @INSTALL@
INSTALL_IF_CHANGED = @INSTALL_IF_CHANGED@
INSTALL_DATA = $(INSTALL) -m 644
INSTALL_DATA_IF_CHANGED = $(INSTALL_IF_CHANGED) -m 644
mkinstalldirs = $(conf_auxdir)/mkinstalldirs
EXTRA_PROVIDES =
PROVISIONS = @provisions@ $(EXTRA_PROVIDES)
prefix = @prefix@
exec_prefix = @exec_prefix@
includedir = @includedir@
clickincludedir = $(includedir)/click
netincludedir = $(includedir)/clicknet
toolincludedir = $(includedir)/clicktool
bindir = @bindir@
datarootdir = @datarootdir@
datadir = @datadir@
clickdatadir = $(datadir)/click
DRIVERS = @DRIVERS@
OTHER_TARGETS = @OTHER_TARGETS@
ALL_TARGETS = $(DRIVERS) $(OTHER_TARGETS)
INSTALL_TARGETS = @INSTALL_TARGETS@
CLEAN_TARGETS = @CLEAN_TARGETS@
all: $(ALL_TARGETS) Makefile
bsdmodule: Makefile click-buildtool stamp-h
@cd bsdmodule && $(MAKE) all
linuxmodule: Makefile click-buildtool stamp-h
@cd linuxmodule && $(MAKE) all
ns: Makefile click-buildtool stamp-h
@cd ns && $(MAKE) all
userlevel: Makefile click-buildtool click-compile stamp-h
@cd userlevel && $(MAKE) all
minios: Makefile click-buildtool click-compile stamp-h
@cd minios && $(MAKE) all
tools: Makefile stamp-h
@cd tools && $(MAKE) all
install-bsdmodule: Makefile click-buildtool stamp-h installch
@cd bsdmodule && $(MAKE) install
install-linuxmodule: Makefile click-buildtool stamp-h installch
@cd linuxmodule && $(MAKE) install
install-ns: Makefile click-buildtool stamp-h installch
@cd ns && $(MAKE) install
install-userlevel: Makefile click-buildtool stamp-h installch
@cd userlevel && $(MAKE) install
install-tools: Makefile click-buildtool stamp-h installch
@cd tools && $(MAKE) install
clean-bsdmodule:
@cd bsdmodule && $(MAKE) clean
clean-linuxmodule:
@cd linuxmodule && $(MAKE) clean
clean-ns:
@cd ns && $(MAKE) clean
clean-userlevel:
@cd userlevel && $(MAKE) clean
clean-minios:
@cd minios && $(MAKE) clean
clean-tools:
@cd tools && $(MAKE) clean
install: $(INSTALL_TARGETS) install-local install-doc install-local-include
install-local: elementmap.xml click-buildtool click-compile config.mk \
etc/pkg-config.mk installch
$(mkinstalldirs) $(DESTDIR)$(bindir)
$(INSTALL_IF_CHANGED) click-buildtool $(DESTDIR)$(bindir)/click-buildtool
$(INSTALL_IF_CHANGED) click-compile $(DESTDIR)$(bindir)/click-compile
$(INSTALL_IF_CHANGED) $(srcdir)/click-mkelemmap $(DESTDIR)$(bindir)/click-mkelemmap
$(INSTALL_IF_CHANGED) $(top_srcdir)/test/testie $(DESTDIR)$(bindir)/testie
$(mkinstalldirs) $(DESTDIR)$(clickdatadir)
$(INSTALL) $(mkinstalldirs) $(DESTDIR)$(clickdatadir)/mkinstalldirs
$(INSTALL_DATA) elementmap.xml $(DESTDIR)$(clickdatadir)/elementmap.xml
$(INSTALL_DATA_IF_CHANGED) config.mk $(DESTDIR)$(clickdatadir)/config.mk
$(INSTALL_DATA_IF_CHANGED) etc/pkg-config.mk $(DESTDIR)$(clickdatadir)/pkg-config.mk
$(INSTALL_DATA_IF_CHANGED) $(srcdir)/etc/pkg-Makefile $(DESTDIR)$(clickdatadir)/pkg-Makefile
$(INSTALL_DATA_IF_CHANGED) $(srcdir)/etc/pkg-userlevel.mk $(DESTDIR)$(clickdatadir)/pkg-userlevel.mk
$(INSTALL_DATA_IF_CHANGED) $(srcdir)/etc/pkg-linuxmodule.mk $(DESTDIR)$(clickdatadir)/pkg-linuxmodule.mk
$(INSTALL_DATA_IF_CHANGED) $(srcdir)/etc/pkg-linuxmodule-26.mk $(DESTDIR)$(clickdatadir)/pkg-linuxmodule-26.mk
$(INSTALL_DATA_IF_CHANGED) $(srcdir)/etc/pkg-bsdmodule.mk $(DESTDIR)$(clickdatadir)/pkg-bsdmodule.mk
(cd $(top_srcdir); pwd) > $(DESTDIR)$(clickdatadir)/srcdir
/bin/rm -rf $(DESTDIR)$(clickdatadir)/src
/bin/ln -s "`cd $(top_srcdir); pwd`" $(DESTDIR)$(clickdatadir)/src
install-doc: elementmap.xml
@cd doc && $(MAKE) install
install-man: elementmap.xml
@-for d in $(ALL_TARGETS) doc; do (cd $$d && $(MAKE) install-man); done
install-local-include: stamp-h installch
$(mkinstalldirs) $(DESTDIR)$(clickincludedir)
$(INSTALL_DATA_IF_CHANGED) $(srcdir)/include/click/*.h $(DESTDIR)$(clickincludedir)
$(INSTALL_DATA_IF_CHANGED) $(srcdir)/include/click/*.hh $(DESTDIR)$(clickincludedir)
$(INSTALL_DATA_IF_CHANGED) $(srcdir)/include/click/*.cc $(DESTDIR)$(clickincludedir)
$(INSTALL_DATA_IF_CHANGED) $(top_builddir)/include/click/*.h $(DESTDIR)$(clickincludedir)
$(mkinstalldirs) $(DESTDIR)$(clickincludedir)/standard
$(INSTALL_DATA_IF_CHANGED) $(srcdir)/include/click/standard/*.hh $(DESTDIR)$(clickincludedir)/standard
$(mkinstalldirs) $(DESTDIR)$(netincludedir)
$(INSTALL_DATA_IF_CHANGED) $(srcdir)/include/clicknet/*.h $(DESTDIR)$(netincludedir)
install-include: install-local-include
@for d in $(ALL_TARGETS); do (cd $$d && $(MAKE) install-include) || exit 1; done
install-lib:
@if echo $(ALL_TARGETS) | grep userlevel >/dev/null 2>&1; then cd userlevel && $(MAKE) install-lib; fi
@if echo $(ALL_TARGETS) | grep tools >/dev/null 2>&1; then cd tools && $(MAKE) install-lib; fi
uninstall: elementmap.xml
@for d in $(ALL_TARGETS) doc; do (cd $$d && $(MAKE) uninstall) || exit 1; done
@$(MAKE) uninstall-local uninstall-local-include
uninstall-local:
/bin/rm -f $(DESTDIR)$(bindir)/click-buildtool $(DESTDIR)$(bindir)/click-compile $(DESTDIR)$(bindir)/click-mkelemmap $(DESTDIR)$(bindir)/testie $(DESTDIR)$(clickdatadir)/elementmap.xml $(DESTDIR)$(clickdatadir)/srcdir $(DESTDIR)$(clickdatadir)/src $(DESTDIR)$(clickdatadir)/config.mk $(DESTDIR)$(clickdatadir)/mkinstalldirs
/bin/rm -f $(DESTDIR)$(clickdatadir)/pkg-config.mk $(DESTDIR)$(clickdatadir)/pkg-userlevel.mk $(DESTDIR)$(clickdatadir)/pkg-linuxmodule.mk $(DESTDIR)$(clickdatadir)/pkg-linuxmodule-26.mk $(DESTDIR)$(clickdatadir)/pkg-bsdmodule.mk $(DESTDIR)$(clickdatadir)/pkg-Makefile
uninstall-local-include:
cd $(srcdir)/include/click; for i in *.h *.hh *.cc; do /bin/rm -f $(DESTDIR)$(clickincludedir)/$$i; done
cd $(top_builddir)/include/click; for i in *.h; do /bin/rm -f $(DESTDIR)$(clickincludedir)/$$i; done
cd $(srcdir)/include/click/standard; for i in *.hh; do /bin/rm -f $(DESTDIR)$(clickincludedir)/standard/$$i; done
cd $(srcdir)/include/clicknet; for i in *.h; do /bin/rm -f $(DESTDIR)$(netincludedir)/$$i; done
for i in $(clickincludedir)/standard $(clickincludedir) $(netincludedir); do if test -d $(DESTDIR)$$i; then /bin/rmdir $(DESTDIR)$$i; fi; done
elemlist elemlists: click-buildtool
@for d in $(DRIVERS); do (cd $$d && $(MAKE) elemlist) || exit 1; done
MKELEMMAPFLAGS =
FINDELEMFLAGS = @FINDELEMFLAGS@
elementmap.xml: click-buildtool $(srcdir)/click-mkelemmap always
echo $(DRIVERS) @element_groups@ $(EXTRA_PROVIDES) | $(top_builddir)/click-buildtool findelem -r "$(PROVISIONS) $(DRIVERS)" -p $(top_srcdir) $(FINDELEMFLAGS) | $(PERL) $(top_srcdir)/click-mkelemmap -r "$(PROVISIONS)" -t "$(DRIVERS)" -p $(top_srcdir) -Iinclude -s "`cd $(top_srcdir) && pwd`" $(MKELEMMAPFLAGS) > elementmap.xml
always:
@:
click-buildtool: $(srcdir)/click-buildtool.in config.status
cd $(top_builddir) && \
CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
@chmod +x click-buildtool; touch click-buildtool
click-compile: $(srcdir)/click-compile.in config.status
cd $(top_builddir) && \
CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
@chmod +x click-compile; touch click-compile
config.mk: $(srcdir)/config.mk.in config.status
cd $(top_builddir) && \
CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
installch: $(srcdir)/installch.in config.status
cd $(top_builddir) && \
CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
@chmod +x installch; touch installch
etc/pkg-config.mk: $(srcdir)/etc/pkg-config.mk.in config.status
cd $(top_builddir) && \
CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
$(srcdir)/configure: $(srcdir)/configure.in $(srcdir)/m4/click.m4
cd $(srcdir) && $(AUTOCONF)
config.status: $(srcdir)/configure
$(SHELL) $(srcdir)/configure @ac_configure_args@
Makefile: config.status $(srcdir)/Makefile.in
cd $(top_builddir) && \
CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
config.h: stamp-h
stamp-h: $(srcdir)/config.h.in $(srcdir)/config-bsdmodule.h.in $(srcdir)/config-linuxmodule.h.in $(srcdir)/config-ns.h.in $(srcdir)/config-userlevel.h.in $(srcdir)/config-minios.h.in config.status
cd $(top_builddir) \
&& CONFIG_FILES= $(SHELL) ./config.status
echo > stamp-h
check-filenames:
@a=`find . \( -name \*.cc -or -name \*.c \) -print | sed 's/.*\/\(.*\)\.c*$$/\1.o/' | grep -v 'elements\.o' | sort | uniq -d`; \
if test -z $$a; then echo OK; else echo "*** warning: duplicate object file names:"; echo "$$a"; fi
clean: $(CLEAN_TARGETS) clean-doc clean-local
clean-doc:
@cd doc && $(MAKE) clean
clean-local:
-rm -f elementmap.xml conftest.*
distclean:
@-for d in @POSSIBLE_DRIVERS@ tools doc; do (cd $$d && $(MAKE) distclean); done
-rm -f Makefile config.status etc/libclick/Makefile
-rm -f include/click/config.h include/click/config-*.h include/click/pathvars.h
-rm -f config.cache config.log click-buildtool click-compile config.mk stamp-h
-rm -f etc/pkg-config.mk
-rm -f elementmap.xml conftest.* installch
check: $(ALL_TARGETS) Makefile elementmap.xml
$(top_srcdir)/test/testie -p $(top_builddir) -p $(top_builddir)/userlevel \
-p $(top_builddir)/tools/click-align \
-p $(top_builddir)/tools/click-fastclassifier \
-p $(top_builddir)/tools/click-flatten \
-p $(top_builddir)/tools/click-mkmindriver \
-p $(top_builddir)/tools/click-xform \
-p $(top_srcdir)/test \
CLICKPATH="`cd $(top_builddir); pwd`:" $(top_srcdir)/test
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
dist: distdir
tar czf $(distdir).tar.gz $(distdir)
-rm -rf $(distdir)
distdir: $(srcdir)/configure
-rm -rf doc/click.info* doc/testie.1 $(srcdir)/doc/click.info* $(srcdir)/doc/testie.1
cd doc && $(MAKE) testie.1
cd $(srcdir)/etc/samplepackage && $(AUTOCONF)
-rm -rf $(distdir)
mkdir $(distdir)
chmod 777 $(distdir)
@echo Copying library, documentation, configuration, and driver files...
[ "$(srcdir)" = . ] || cp doc/testie.1 $(srcdir)/doc
@for file in `cat $(srcdir)/DISTFILES | grep .`; do \
if expr "$$file" : '.*:$$' >/dev/null 2>&1; then \
d=`echo $$file | sed 's/:$$//;s/^\.\///'`; \
elif test -d "$(srcdir)/$$d/$$file"; then \
mkdir $(distdir)/$$d/$$file; \
chmod 777 $(distdir)/$$d/$$file; \
else \
for f in `cd $(srcdir)/$$d && echo $$file`; do \
test -f "$(distdir)/$$d/$$f" \
|| ln $(srcdir)/$$d/$$f $(distdir)/$$d/$$f 2> /dev/null \
|| cp -p $(srcdir)/$$d/$$f $(distdir)/$$d/$$f \
|| echo "Could not copy $$d/$$f!" 1>&2; \
done; fi; \
done
@echo Copying element files...
@d=$(srcdir); \
for dir in `cd $$d && find elements -type d -print | grep -v 'exopc\|CVS'`; do \
mkdir $(distdir)/$$dir 2>/dev/null; \
chmod 777 $(distdir)/$$dir; \
for cfile in `cd $$d && find $$dir -maxdepth 1 \( -type f -and \( -name \[^,.]\*.cc -or -name \[^,.]\*.c -or -name \[^,.]\*.hh -or -name \[^,.]\*.h -or -name README \) \) -print`; do \
ln $$d/$$cfile $(distdir)/$$cfile; \
done; \
done
@echo Removing files not meant for distribution...
@if test -r $(srcdir)/NODIST; then \
for i in `cat $(srcdir)/NODIST`; do \
rm -rf $(distdir)/$$i; \
done; fi
@if grep -q 'Id:.*benjie' `find $(srcdir)/etc -maxdepth 1 -type f -print`; then \
echo 'ERROR: Benjie must be punished!'; exit 1; \
fi
@if test `grep 'CLICK_VERSION=' $(srcdir)/configure.in` != `grep 'CLICK_VERSION=' $(srcdir)/etc/libclick/lc-configure.in`; then \
echo 'ERROR: Bad libclick CLICK_VERSION!'; exit 1; \
fi
.PHONY: all always elemlist elemlists \
bsdmodule linuxmodule ns userlevel minios tools \
install install-doc install-lib install-man install-local install-include install-local-include $(INSTALL_TARGETS) \
clean clean-doc clean-local $(CLEAN_TARGETS) distclean \
uninstall uninstall-local uninstall-local-include \
dist distdir check