-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile.sample
More file actions
95 lines (81 loc) · 3.1 KB
/
Makefile.sample
File metadata and controls
95 lines (81 loc) · 3.1 KB
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
#===========================================================================
#
# This is a sample Makefile
#
# Makefiles in binpatch describe the way each patch is built for a specific
# release. The instructions for building patches should be taken from the
# patches themselves (they are written at the top of each patch).
#
# bsd.binpatch.mk provides shortcuts to common instructions like make obj or
# make depend in the form of variables like ${_obj} or ${_depend} that saves
# you time and effort, setting the ${MAKE_ENV} variable for you, needed by
# binpatch.
#
# A _kernel target is provided too for convenience. It's kind of a Makefile
# macro that defines the instructions needed to build a kernel so you don't
# have to write them every time.
#
# Don't forget to include bsd.binpatch.mk at the end of the file.
#
# Gerardo Santana <gerardo.santana@gmail.com>
#
#===========================================================================
# PATCH_* variables hold the list of patch file names without the extension
# as they appear in the FTP site. There's one variable for architecture
# specific patches: PATCH_I386, PATCH_SPARC, etc. The architecture name is
# the uppercase of the output of uname -m. PATCH_COMMON must be used for
# patches that apply to all architectures.
# List of patches for all architectures
PATCH_COMMON=001_cvs 002_getsockopt 003_sudo 004_libz 005_libz 006_nat-t
# List of patches for i386 only
PATCH_I386=
# bin, sbin and libc are not patches, and not always needed. They are here
# to serve as a source for a patch target if its instructions includes, for
# example: "And then rebuild and install libc"
bin:
cd ${WRKSRC}/bin && (${_obj}; ${_cleandir}; ${_depend} && ${_build})
sbin:
cd ${WRKSRC}/sbin && (${_obj}; ${_cleandir}; ${_depend} && ${_build})
libc:
cd ${WRKSRC}/lib/libc && \
(${_obj}; ${_cleandir}; ${_depend} && ${_build})
#===========================================================================
# The patch targets start here.
#
# Care should be taken for writing valid rules for make.
# The instructions must be taken from the top of each patch file, with some
# rewrites:
#
# - Paths relative to src/ must be made relative to ${WRKSRC}/
# - make targets must be changed for their counterparts provided by binpatch:
# make obj: ${_obj}
# make cleandir: ${_cleandir}
# make depend: ${_depend}
# make install: ${_install}
# make && make install: ${_build}
#
# make -f Makefile.bsd-wrapper obj: ${_obj_wrp}
# make -f Makefile.bsd-wrapper cleandir: ${_cleandir_wrp}
# make -f Makefile.bsd-wrapper depend: ${_depend_wrp}
# make -f Makefile.bsd-wrapper &&
# make -f Makefile.bsd-wrapper install: ${_build_wrp}
# make -f Makefile.bsd-wrapper install: ${_install_wrp}
#
#
002_getsockopt: _kernel
001_cvs:
cd ${WRKSRC}/gnu/usr.bin/cvs && \
(${_obj_wrp}; ${_build_wrp})
003_sudo:
cd ${WRKSRC}/usr.bin/sudo && \
(${_obj}; ${_depend}; ${_build})
004_libz:
cd ${WRKSRC}/lib/libz && \
(${_obj}; ${_depend}; ${_build})
005_libz:
cd ${WRKSRC}/lib/libz && \
(${_obj}; ${_depend}; ${_build})
006_nat-t:
cd ${WRKSRC}/sbin/isakmpd && \
(${_obj}; ${_depend}; ${_build})
.include "bsd.binpatch.mk"