xref: /freebsd/tools/bsdbox/Makefile (revision 7937bfbc0ca53fe7cdd0d54414f9296e273a518e)
1MAN=
2
3.include <bsd.own.mk>
4MK_SSP=	no
5
6PROG=	bsdbox
7BINDIR?=/sbin
8
9#################################################################
10#
11# General notes:
12#
13# A number of Make variables are used to generate the crunchgen config file.
14#
15#  CRUNCH_SRCDIRS: lists directories to search for included programs
16#  CRUNCH_PROGS:  lists programs to be included
17#  CRUNCH_LIBS:  libraries to statically link with
18#  CRUNCH_SHLIBS:  libraries to dynamically link with
19#  CRUNCH_BUILDOPTS: generic build options to be added to every program
20#  CRUNCH_BUILDTOOLS: lists programs that need build tools built in the
21#	local architecture.
22#
23# Special options can be specified for individual programs
24#  CRUNCH_SRCDIR_$(P): base source directory for program $(P)
25#  CRUNCH_BUILDOPTS_$(P): additional build options for $(P)
26#  CRUNCH_ALIAS_$(P): additional names to be used for $(P)
27#
28# By default, any name appearing in CRUNCH_PROGS or CRUNCH_ALIAS_${P}
29# will be used to generate a hard link to the resulting binary.
30# Specific links can be suppressed by setting
31# CRUNCH_SUPPRESS_LINK_$(NAME) to 1.
32#
33
34# Define Makefile variable RESCUE
35CRUNCH_BUILDOPTS+= -DRESCUE
36
37# Don't do symlinks as part of the install
38CRUNCH_GENERATE_LINKS= no
39
40# Which sources have local-arch build tools?
41# Define as blank; othrs need to override
42CRUNCH_BUILDTOOLS=
43
44###################################################################
45# Programs from stock /bin
46#
47# WARNING: Changing this list may require adjusting
48# /usr/include/paths.h as well!  You were warned!
49#
50CRUNCH_SRCDIRS+= bin
51# These are required to be shared so login and su can run as
52# setuid binaries - they use these libraries. PAM needs to be
53# built dynamically or it tries to build _all_ of the modules
54# statically - and that ends very badly.
55CRUNCH_SHLIBS+=	-lc -lutil -lcrypt -lxo -lgpio
56CRUNCH_LIBS+= -lkvm -lmemstat -lnetgraph
57CRUNCH_LIBS+= -lcrypt -ledit -ltermcapw
58
59###################################################################
60# Programs from standard /sbin
61#
62# WARNING: Changing this list may require adjusting
63# /usr/include/paths.h as well!  You were warned!
64#
65# Note that mdmfs have their own private 'pathnames.h'
66# headers in addition to the standard 'paths.h' header.
67#
68CRUNCH_SRCDIRS+= sbin
69
70CRUNCH_LIBS+= -l80211 -lalias -lcam -lcursesw -ldevstat -lipsec
71# Don't forget this - ifconfig, etc -adrian
72CRUNCH_LIBS+= ${LDADD_ifconfig}
73CRUNCH_LIBS+= -lgeom -lbsdxml -ljail -lkiconv -lmd -lsbuf -lufs
74CRUNCH_BUILDOPTS+= CRUNCH_CFLAGS+=-I${OBJTOP}/lib/libifconfig
75
76##################################################################
77# Programs from stock /usr/bin
78#
79CRUNCH_SRCDIRS+= usr.bin
80# grep
81CRUNCH_LIBS+=	-lbz2
82
83##################################################################
84# Programs from stock /usr/sbin
85#
86CRUNCH_SRCDIRS+= usr.sbin
87
88##################################################################
89
90CRUNCH_SRCDIRS+= libexec
91
92CRUNCH_LIBS+= -lm
93
94.include "Makefile.base"
95.include "Makefile.net"
96.include "Makefile.hostapd"
97#.include "Makefile.textproc"
98.include "Makefile.login"
99.include "Makefile.kld"
100.include "Makefile.fs"
101
102CRUNCH_LIBS+= -lcrypto -lssl -lz
103
104# the crunchgen build environment
105.include <bsd.crunchgen.mk>
106
107# and since it creates a program..
108.include <bsd.prog.mk>
109