1### Installation paths and compiled-in defaults
2#
3PREFIX		?= /usr/local
4
5DIR_BIN		= $(PREFIX)/bin
6DIR_SBIN	= $(PREFIX)/sbin
7DIR_ETC		= $(PREFIX)/etc/openradius
8DIR_LIB		= $(PREFIX)/lib/openradius
9
10FILE_LOG	= /var/log/openradius/radiusd.log
11
12
13### Modules that will be built and installed
14#
15TGT_LIB		+= modules/ascfile/ascfile
16TGT_LIB		+= modules/unixpasswd/unixpasswd
17TGT_LIB		+= modules/radlogger/radlogger
18TGT_LIB		+= modules/delay/delay
19TGT_LIB		+= modules/radsql/radsql
20TGT_LIB		+= modules/memory/memory
21TGT_LIB		+= modules/debug/debug
22TGT_LIB 	+= modules/radldap/radldap
23
24
25### System compatibility flags, used in some targets' CF_TGT, LF_TGT or LL_TGT
26#
27S_CF_U_INT32_T	= -DU_INT32_T=u_int32_t
28S_CF_SYSLOG	= -DHAVE_SYSLOG
29S_CF_VSNPRINTF 	= -DHAVE_VSNPRINTF
30S_CF_SIGACTION 	= -DHAVE_SIGACTION
31S_CF_CRYPT	= -DHAVE_CRYPT
32
33S_LL_INET	=
34S_LL_CRYPT	= -lcrypt
35
36
37### Build flags for all targets
38#
39CF_ALL		= -O2 -Wall
40LF_ALL		= -s
41LL_ALL		=
42#CF_ALL		= -g -Wall
43#LF_ALL		=
44#LL_ALL		=
45
46
47### Module-specific build flags
48#
49#CF_RADLDAP	= -I/usr/local/include/openldap
50#LF_RADLDAP	= -L/usr/local/lib
51LL_RADLDAP	= -lldap -llber
52
53
54### Build tools
55#
56# The C compiler named here must output full (header) dependencies in $(@).d.
57# It may be necessary to create a script similar to ccd-gcc for your compiler.
58#
59CMPLR		= ./build/ccd-gcc
60DEFHDR		= ./build/hdr
61INST		= ./build/install
62ARCHIVE		= ar rc $@ $^
63#
64PREP		= $(CMPLR) $(CF_ALL) $(CF_TGT) -E -o $@ $<
65COMP		= $(CMPLR) $(CF_ALL) $(CF_TGT) -o $@ -c $<
66LINK		= $(CMPLR) $(LF_ALL) $(LF_TGT) -o $@ $^ $(LL_TGT) $(LL_ALL)
67COMPLINK	= $(CMPLR) $(CF_ALL) $(CF_TGT) $(LF_ALL) $(LF_TGT) -o $@ $< $(LL_TGT) $(LL_ALL)
68
69
70### Standard parts
71#
72include	Rules.mk
73
74