xref: /freebsd/tools/bsdbox/Makefile (revision da232c04ab9eba3d3a7fc73881daff847071e9fd)
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
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# telnet/telnetd are too broken to include as a crunchgen'ed binary,
103# thanks to some of the horrible layering violations going on.
104# .include "Makefile.telnetd"
105.include "Makefile.fs"
106
107CRUNCH_LIBS+= -lcrypto -lssl -lz
108
109# the crunchgen build environment
110.include <bsd.crunchgen.mk>
111
112# and since it creates a program..
113.include <bsd.prog.mk>
114