Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 97 lines (85 sloc) 2.631 kB
1f8d743 make default TARGET to "bogus" to raise errors on all platforms.
itojun authored
1 TARGET?= bogus
81d9443 make autobuild
itojun authored
2 ARCH?= i386
3 .if ${TARGET} == "freebsd4" || ${TARGET} == "openbsd"
4 KERNCONF?= GENERIC.KAME
5 .else
6 KERNCONF?= GENERIC.v6
7 .endif
8714844 support .prepare file.
itojun authored
8
c0a2c52 non-developer should use anoncvs.kame.net (need more work for migrati…
itojun authored
9 DEVELOPER= NO
10 .if ${DEVELOPER} == "YES"
11 CVSHOST= cvs.kame.net
12 .else
13 CVSHOST= anoncvs.kame.net
14 .endif
15
5bd5efb warn if the user simply typed in "make".
itojun authored
16 all:
17 @(echo '**** WARNING: Read through INSTALL and platform/INSTALL, '; \
18 echo ' and follow the steps documented'.; \
19 exit 1)
20
8714844 support .prepare file.
itojun authored
21 prepare::
d536b60 add "cd .CURDIR" to all cvs operations-what a mess!
itojun authored
22 (cd ${.CURDIR}; perl prepare.pl kame ${TARGET})
c8c621c add targets: bsdi3 and bsdi4
itojun authored
23
8806318 add clean target, which nukes symlinks.
itojun authored
24 clean::
d536b60 add "cd .CURDIR" to all cvs operations-what a mess!
itojun authored
25 (cd ${.CURDIR}; find ${TARGET} -type l -print | perl -nle unlink)
8806318 add clean target, which nukes symlinks.
itojun authored
26
c8c621c add targets: bsdi3 and bsdi4
itojun authored
27 # only for developers
28 bsdi3:
7f18c74 fix typo (in bsdi3/bsdi4 rule)
itojun authored
29 (cd ${.CURDIR}; set CVSROOT=cvs.kame.net:/cvsroot/kame-local; export CVSROOT; cvs -d cvs.kame.net:/cvsroot/kame-local co -d bsdi3 -P kame/bsdi3)
c8c621c add targets: bsdi3 and bsdi4
itojun authored
30
31 bsdi4:
7f18c74 fix typo (in bsdi3/bsdi4 rule)
itojun authored
32 (cd ${.CURDIR}; set CVSROOT=cvs.kame.net:/cvsroot/kame-local; export CVSROOT; cvs -d cvs.kame.net:/cvsroot/kame-local co -d bsdi4 -P kame/bsdi4)
273f315 "update", "update-doc" and "update-plat" targets.
itojun authored
33
7138d85 add freeebsd4 on PLAT.
sumikawa authored
34 PLAT= freebsd2 freebsd3 freebsd4 kame netbsd openbsd bsdi3 bsdi4
b418f57 share definition of DOCS between top-level Makefile and platform/Make…
itojun authored
35 # DOCS is defined in Makefile.inc
36 TOOLS= Makefile Makefile.inc prepare.pl
273f315 "update", "update-doc" and "update-plat" targets.
itojun authored
37
38 update: update-doc update-plat
39 update-doc:
b418f57 share definition of DOCS between top-level Makefile and platform/Make…
itojun authored
40 (cd ${.CURDIR}; cvs update -d -P ${DOCS} ${TOOLS})
273f315 "update", "update-doc" and "update-plat" targets.
itojun authored
41 update-plat:
d536b60 add "cd .CURDIR" to all cvs operations-what a mess!
itojun authored
42 (cd ${.CURDIR}; \
8806318 add clean target, which nukes symlinks.
itojun authored
43 for i in kame ${TARGET}; do \
659f88f "make update-plat" will update kame/kame and kame/TARGET.
itojun authored
44 if test -d $$i; then \
45 (cd $$i; cvs update -d -P); \
46 fi \
d536b60 add "cd .CURDIR" to all cvs operations-what a mess!
itojun authored
47 done)
659f88f "make update-plat" will update kame/kame and kame/TARGET.
itojun authored
48 update-all: update-doc
d536b60 add "cd .CURDIR" to all cvs operations-what a mess!
itojun authored
49 (cd ${.CURDIR}; \
8806318 add clean target, which nukes symlinks.
itojun authored
50 for i in ${PLAT}; do \
273f315 "update", "update-doc" and "update-plat" targets.
itojun authored
51 if test -d $$i; then \
52 (cd $$i; cvs update -d -P); \
53 fi \
d536b60 add "cd .CURDIR" to all cvs operations-what a mess!
itojun authored
54 done)
a5f1873 "make tree" which ease the checkout process (as well as tar.gz genera…
itojun authored
55
aee47dc top-level "Makefile.inc" is required to be checked out.
itojun authored
56 # % cvs co kame/Makefile kame/Makefile.inc
a5f1873 "make tree" which ease the checkout process (as well as tar.gz genera…
itojun authored
57 # % cd kame
58 # % make TARGET=foo tree
59 tree:
d536b60 add "cd .CURDIR" to all cvs operations-what a mess!
itojun authored
60 (cd ${.CURDIR}; \
61 $(MAKE) update-doc; \
a5f1873 "make tree" which ease the checkout process (as well as tar.gz genera…
itojun authored
62 if test $(TARGET) = bsdi3 -o $(TARGET) = bsdi4; then \
63 $(MAKE) $(TARGET); \
64 else \
65 cvs update -d -P $(TARGET); \
d536b60 add "cd .CURDIR" to all cvs operations-what a mess!
itojun authored
66 fi; \
67 cvs update -d -P kame)
b418f57 share definition of DOCS between top-level Makefile and platform/Make…
itojun authored
68
81d9443 make autobuild
itojun authored
69 # use it with caution - must be root for "make includes"
70 autobuild:
71 (cd ${.CURDIR}; ${MAKE} clean update prepare)
72 (cd ${.CURDIR}/${TARGET}; ${MAKE} clean)
73 case ${TARGET} in \
74 bsdi*|freebsd*) \
75 (cd ${.CURDIR}/${TARGET}; ${MAKE} includes); \
76 (cd ${.CURDIR}/${TARGET}; ${MAKE} install-includes); \
77 ;; \
78 netbsd*|openbsd*) \
79 (cd ${.CURDIR}/${TARGET}; ${MAKE} includes); \
80 ;; \
81 esac
82 (cd ${.CURDIR}/${TARGET}; ${MAKE})
83 case ${TARGET} in \
84 bsdi*|freebsd*) \
1e594e6 on autobuild, nuke kernel build tree before doing anything
itojun authored
85 (cd ${.CURDIR}/${TARGET}/sys/compile; /bin/rm -fr ${KERNCONF}); \
81d9443 make autobuild
itojun authored
86 (cd ${.CURDIR}/${TARGET}/sys/${ARCH}/conf; config ${KERNCONF}); \
1e594e6 on autobuild, nuke kernel build tree before doing anything
itojun authored
87 (cd ${.CURDIR}/${TARGET}/sys/compile/${KERNCONF}; ${MAKE} depend; ${MAKE}); \
81d9443 make autobuild
itojun authored
88 ;; \
89 netbsd*|openbsd*) \
1e594e6 on autobuild, nuke kernel build tree before doing anything
itojun authored
90 (cd ${.CURDIR}/${TARGET}/sys/arch/${ARCH}/compile; /bin/rm -fr ${KERNCONF}); \
81d9443 make autobuild
itojun authored
91 (cd ${.CURDIR}/${TARGET}/sys/arch/${ARCH}/conf; config ${KERNCONF}); \
1e594e6 on autobuild, nuke kernel build tree before doing anything
itojun authored
92 (cd ${.CURDIR}/${TARGET}/sys/arch/${ARCH}/compile/${KERNCONF}; ${MAKE} depend; ${MAKE}); \
81d9443 make autobuild
itojun authored
93 ;; \
94 esac
95
b418f57 share definition of DOCS between top-level Makefile and platform/Make…
itojun authored
96 .include "Makefile.inc"
Something went wrong with that request. Please try again.