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