-
Notifications
You must be signed in to change notification settings - Fork 63
/
Copy pathMakefile
48 lines (39 loc) · 1.69 KB
/
Makefile
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
# apps/Makefile
#
# Part of the CCNx distribution.
#
# Copyright (C) 2011-2013 Palo Alto Research Center, Inc.
#
# This work is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License version 2 as published by the
# Free Software Foundation.
# This work is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE.
#
# SUBDIRS indicates the subdirectories to be built by this makefile.
# If a dir.mk file is present in the subdirectory, it will be used
# in conjunction with the machinery of the csrc subtree.
# Otherwise it just does a recursive make.
SUBDIRS = HttpProxy ccnChat ccnFileProxy `cat local.subdirs 2>/dev/null || :`
MAKEF = -f ../conf.mk -f dir.mk -f ../subr.mk -f depend.mk $(PASSTHRU)
PASSTHRU = DINST_INC=$(DINST_INC) DINST_LIB=$(DINST_LIB) DINST_BIN=$(DINST_BIN)
CSRCDIR = ../csrc
CFLAGS = $(COPT)
include $(CSRCDIR)/conf.mk
default all clean depend test check shared install uninstall: conf.mk subr.mk generic.mk _always
test -d include/ccn || (test -d $(CSRCDIR)/include/ccn && ln -s $(CSRCDIR)/include)
for i in $(SUBDIRS); do \
if [ -f "$$i/dir.mk" ]; then \
(cd "$$i" && pwd && $(MAKE) $(MAKEF) "COPT=$(CFLAGS)" CFLAGS='$$(REAL_CFLAGS)' SRCDIR=../$(SRCDIR)/$$i $@) || exit 1; \
else \
(cd "$$i" && pwd && $(MAKE) -f ../conf.mk -f Makefile $(PASSTHRU) $@) || exit 1; \
fi \
done
@rm -f _always
subr.mk generic.mk conf.mk:
test -f $(CSRCDIR)/$@ && ln -s $(CSRCDIR)/$@
test check: default
documentation dist-docs html: _always
_always:
.PHONY: _always