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