1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
|
#$Id: Makefile,v 1.18 1998/05/12 21:09:14 srb Exp $
BASENAME= ${ROOT_DIR}/usr
GCC_WARNINGS = -O2 -pedantic -Wreturn-type -Wunused -Wformat \
-Wpointer-arith -Wconversion -Waggregate-return \
#-Wimplicit -Wshadow #-Wuninitialized
#
# Omit USE_DB if you don't have the -ldb2 library (Berkeley DB, v2.x)
# WARNING: bulletins are not remembered to have been deleted without USE_DB
CFLAGS = -g -O #-DUSE_DB #$(GCC_WARNINGS)
LDFLAGS = -lcrypt -lpam -lpam_misc -ldl #-ldb2
# If you change this, edit config.h as well
CUCIPOPLIB=${ROOT_DIR}/var/lib/cucipop
CUCIPOPBULLETINS=$(CUCIPOPLIB)/bulletins
O=o
BINDIR=$(BASENAME)/sbin
MANDIR=$(BASENAME)/man/man8
PAMDIR=$(ROOT_DIR)/etc/pam.d
RCDIR=$(ROOT_DIR)/etc/rc.d/init.d
INSTALL=install -o root -m
BINPERM=02755 -s -g mail
REGPERM=0644
PAMPERM=0644
RCPERM=0755
#
# When compiling without APOP support, the md5 library can be omitted.
MD5_OBJ=md5/md5c.$(O)
OBJS=cucipop.$(O) authenticate.$(O) atotime.$(O) locking.$(O) xcreat.$(O) \
dbops.$(O) hsort.$(O) simplecrypt.$(O) pam_authentication.${O} \
$(MD5_OBJ)
BINS=cucipop makevpopdb
MANS=cucipop.8 makevpopdb.8
PAMS=pam.d/cucipop
RCS=rc.d/cucipop
all: $(BINS)
cucipop: $(OBJS)
$(CC) $(CFLAGS) $(OBJS) -o $@ $(LDFLAGS) $(LIBS)
makevpopdb: makevpopdb.$(O) simplecrypt.$(O)
$(CC) $(CFLAGS) makevpopdb.$(O) simplecrypt.$(O) \
-o $@ $(LDFLAGS) $(LIBS)
cucipop.$(O): config.h patchlevel.h cucipop.h atotime.h authenticate.h \
pam_authentication.h
cucipop.$(O): cucipop.h hsort.h
authenticate.$(O): config.h cucipop.h authenticate.h sdb.h
locking.$(O): config.h cucipop.h locking.h
atotime.$(O): atotime.h
dbops.$(O): config.h dbops.h sdb.h
hsort.$(O): hsort.h
simplecrypt.$(O): simplecrypt.h sdb.h
makevpopdb.$(O): sdb.h
pam_authenticate.$(O): pam_authenticate.h
$(MD5_OBJ): md5/md5c.c md5/md5.h
cd md5; $(CC) $(CFLAGS) -c md5c.c
install: $(BINS) $(MANS) $(PAMS) $(RCS)
$(INSTALL) $(BINPERM) $(BINS) $(BINDIR)
$(INSTALL) $(REGPERM) $(MANS) $(MANDIR)
$(INSTALL) $(PAMPERM) $(PAMS) $(PAMDIR)
$(INSTALL) $(RCPERM) $(RCS) $(RCDIR)
deinstall:
cd $(BINDIR) && $(RM) $(BINS)
cd $(MANDIR) && $(RM) $(MANS)
cd $(PAMDIR) && $(RM) $(PAMS)
cd $(RCDIR) && $(RM) $(RCS)
clean:
rm -f *.$(O) md5/*.$(O) $(BINS) *core*
|