xref: /freebsd/tools/bsdbox/Makefile (revision 2f02600abfddfc4e9f20dd384a2e729b451e16bd)
1#$FreeBSD$
2#	@(#)Makefile	8.1 (Berkeley) 6/2/93
3
4NO_MAN=
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
59CRUNCH_LIBS+= -lkvm -lmemstat -lnetgraph
60CRUNCH_LIBS+= -lcrypt -ledit -ll -ltermcap
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+= -lalias -lcam -lcurses -ldevstat -lipsec
74# Don't forget this - ifconfig, etc -adrian
75.if ${MK_IPX} != "no"
76CRUNCH_LIBS+= -lipx
77.endif
78CRUNCH_LIBS+= -lgeom -lbsdxml -ljail -lkiconv -lmd -lsbuf -lufs
79
80##################################################################
81# Programs from stock /usr/bin
82#
83CRUNCH_SRCDIRS+= usr.bin
84# grep
85CRUNCH_LIBS+=	-lbz2
86
87##################################################################
88# Programs from stock /usr/sbin
89#
90CRUNCH_SRCDIRS+= usr.sbin
91
92##################################################################
93
94CRUNCH_SRCDIRS+= libexec
95
96CRUNCH_LIBS+= -lm
97
98.include "Makefile.base"
99.include "Makefile.net"
100.include "Makefile.hostapd"
101#.include "Makefile.textproc"
102.include "Makefile.login"
103.include "Makefile.kld"
104# telnet/telnetd are too broken to include as a crunchgen'ed binary,
105# thanks to some of the horrible layering violations going on.
106# .include "Makefile.telnetd"
107.include "Makefile.fs"
108
109CRUNCH_LIBS+= -lcrypto -lssl -lz
110
111# the crunchgen build environment
112.include <bsd.crunchgen.mk>
113
114# and since it creates a program..
115.include <bsd.prog.mk>
116