b5af4b62c2becd521795e735ee673243fca65286
[tac_plus.git] / Makefile.in
1 # Please NOTE:  None of the TACACS code available here comes with any
2 # warranty or support.
3 # Copyright (c) 1995-1998 by Cisco systems, Inc.
4
5 # Permission to use, copy, modify, and distribute this software for any
6 # purpose and without fee is hereby granted, provided that this
7 # copyright and permission notice appear on all copies of the software and
8 # supporting documentation, the name of Cisco Systems, Inc. not be used
9 # in advertising or publicity pertaining to distribution of the
10 # program without specific prior permission, and notice be given
11 # in supporting documentation that modification, copying and distribution is by
12 # permission of Cisco Systems, Inc.   
13
14 # Cisco Systems, Inc. makes no representations about the suitability of this
15 # software for any purpose.  THIS SOFTWARE IS PROVIDED ``AS IS''
16 # AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
17 # LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
18 # FOR A PARTICULAR PURPOSE. 
19
20 SHELL = /bin/sh
21 VPATH = @srcdir@
22
23 top_srcdir = @top_srcdir@
24 srcdir = @srcdir@
25 prefix = @prefix@
26 exec_prefix = @exec_prefix@
27 bindir = $(exec_prefix)/bin
28 sbindir = $(exec_prefix)/sbin
29 infodir = $(prefix)/info
30 libdir = $(prefix)/lib/gnudl
31 mandir = $(prefix)/man/man1
32
33 CC = @CC@
34 CPPFLAGS = @CPPFLAGS@ 
35 FLAGS = $(CPPFLAGS) @CFLAGS@
36 LDFLAGS = @LDFLAGS@
37 OSLIBS = @LIBS@
38 DEFINES = @DEFINES@
39 OS = @OS@
40 PIDFILE = @PIDFILE@
41 DB = @DB@
42
43 # For AIX
44 # See /usr/lpp/bos/bsdport on your system for details of how to define bsdcc
45 # CC=bsdcc
46 # OS=-DAIX
47
48 # For HP/UX uncomment the following line
49 # OS=-DHPUX
50
51 # For MIPS, uncomment the following line
52 # OS=-DMIPS
53
54 # For Solaris (SUNOS 5.3, 5.4, 5.5, 5.6) uncomment the following two lines
55 #OS=-DSOLARIS
56 #OSLIBS=-lsocket -lnsl
57
58 # For FreeBSD
59 # OS=-DFREEBSD
60 # You may also need to add:
61 # OSLIBS=-lcrypt
62 # NOTE: If you want your password encryption to be compatible with
63 # e.g. SunOS, you may need to instead use:
64 # OSLIBS=-ldescrypt
65
66 # For LINUX
67 # OS=-DLINUX
68 #
69 # On REDHAT 5.0 systems, or systems that use the new glibc,
70 # you might instead need the following:
71 #OS=-DLINUX -DGLIBC
72 #OSLIBS=-lcrypt
73
74 # Athough invoked as root, most of the time you don't want tac_plus to
75 # be running as root. If USERID and GROUPID are set, tac_plus will
76 # attempt change to run as that user & group after reading the
77 # configuration file and obtaining a privileged socket. If you always
78 # want tac_plus to run as root, then just comment out the FLAGS line.
79
80 # USERID  = 1500
81 # GROUPID = 25
82 # FLAGS   = -DTAC_PLUS_USERID=$(USERID) -DTAC_PLUS_GROUPID=$(GROUPID)
83
84 # Definitions for SKEY functionality
85 # DEFINES = -DSKEY
86 # LIBS = ../crimelab/skey/src/libskey.a
87 # INCLUDES = -I../crimelab/skey/src
88
89 # Debugging flags
90 DEBUG = 
91
92 # Opt flags
93 OPT_FLAGS = 
94
95 # Enforce a limit on maximum sessions per user. See the user's guide
96 # for more information.
97 #MAXSESS = -DMAXSESS
98
99 # Microsoft CHAP extension support. See the user's guide for more
100 # information.
101 # MSCHAP = -DMSCHAP
102 # MSCHAP_DES = -DMSCHAP_DES
103 # MSCHAP_MD4_SRC = md4.c
104
105 # On startup, tac_plus creates the file /etc/tac_plus.pid (if
106 # possible), containing its process id. Uncomment and modify the
107 # following line to change this filename
108
109 #PIDFILE = -DTAC_PLUS_PIDFILE=\"/var/run/tac_plus.pid\" 
110
111 #
112 # End of customisable section of Makefile
113 #
114
115 CFLAGS = $(DEBUG) $(OPT_FLAGS) $(DEFINES) $(INCLUDES) $(FLAGS) $(OS) $(PIDFILE) $(LDFLAGS) $(DB) 
116
117 HFILES = expire.h parse.h regmagic.h md5.h regexp.h tac_plus.h 
118
119 SRCS =  acct.c authen.c author.c choose_authen.c config.c do_acct.c \
120         do_author.c dump.c encrypt.c expire.c $(MSCHAP_MD4_SRC) md5.c \
121         packet.c report.c sendauth.c tac_plus.c utils.c pw.c hash.c \
122         parse.c regexp.c programs.c enable.c pwlib.c default_fn.c \
123         skey_fn.c default_v0_fn.c sendpass.c maxsess.c tac_pam.c \
124         db.c db_null.c db_mysql.c db_pgsql.c tcpwrap.c ldap.c time_limit.c
125
126 OBJS = $(SRCS:.c=.o)
127
128 all:
129         @echo "Please edit the Makefile and then make tac_plus"
130
131 tac_plus: $(OBJS) $(LIBS) generate_passwd
132         $(CC) -o tac_plus $(CFLAGS) $(OBJS) $(LIBS) $(OSLIBS) 
133         strip tac_plus
134
135 purecov: $(OBJS) $(LIBS)
136         purecov -follow-child-processes -handle-signals=SIGTERM \
137             -append-logfile -log-file=purecov.log \
138             -cache-dir=`pwd` \
139             $(CC) -o tac_plus $(CFLAGS) $(OBJS) $(LIBS) $(OSLIBS)
140
141 purify: $(OBJS) $(LIBS)
142         purify -follow-child-processes=yes -log-file=./tac_plus_purify.log \
143             -handle-signals=SIGTERM -cache-dir=. \
144             $(CC) -o tac_plus $(CFLAGS) $(OBJS) $(LIBS) $(OSLIBS)
145
146 generate_passwd:
147         $(CC) $(CFLAGS) -o generate_passwd generate_passwd.c $(OSLIBS)
148
149 clean:
150         -rm -f *.o *~ *.BAK core tac_plus generate_passwd
151
152 distclean: clean
153         -rm -f Makefile config.h config.status config.cache config.log
154
155 clean_obj:
156         -rm -f *.o *~ *.BAK
157
158 make_dir:
159         mkdir -p  $(bindir)
160         mkdir -p  $(sbindir)
161         mkdir -p  $(mandir)
162  
163 install: make_dir
164         cp tac_plus $(sbindir)/
165         cp generate_passwd $(bindir)/
166         cp tac_plus.1 $(mandir)/
167
168 rpm_install: make_dir
169         install -c -m 0755 tac_plus $(sbindir)/
170         install -c -m 0755 generate_passwd $(sbindir)/
171         install -c -m 0644 tac_plus.1 $(mandir)/
172
173 depend:
174         makedepend $(CFLAGS) $(SRCS)
175
176 # DO NOT DELETE THIS LINE -- make depend depends on it.
177