home directory of the petidomo user. Now, Petidomo expects its master config file in ETCDIR, which is '/etc' per default. All other paths will be set there at run-time.
94 lines
2.2 KiB
Makefile
94 lines
2.2 KiB
Makefile
#
|
|
# Petidomo Makefile
|
|
#
|
|
|
|
prefix = @prefix@
|
|
exec_prefix = @exec_prefix@
|
|
bindir = @bindir@
|
|
sbindir = @sbindir@
|
|
libexecdir = @libexecdir@
|
|
datadir = @datadir@
|
|
sysconfdir = @sysconfdir@
|
|
sharedstatedir = @sharedstatedir@
|
|
localstatedir = @localstatedir@
|
|
libdir = @libdir@/petidomo
|
|
infodir = @infodir@
|
|
mandir = @mandir@
|
|
includedir = @includedir@
|
|
ETCDIR = @ETCDIR@
|
|
|
|
CC = @CC@
|
|
AR = ar
|
|
RANLIB = @RANLIB@
|
|
LEX = @LEX@
|
|
YACC = @YACC@
|
|
INSTALL = ../etc/install-sh
|
|
|
|
CFLAGS = @CFLAGS@
|
|
CPPFLAGS = @CPPFLAGS@ @DEFS@ -DETCDIR=\"$(ETCDIR)\"
|
|
LDFLAGS = @LDFLAGS@
|
|
|
|
OBJS = acl.o archive.o authen.o config.o \
|
|
filter.o handleacl.o help.o hermes.o index.o io.o listserv.o \
|
|
mailer.o members.o parsearray.o password.o rfcparse.o \
|
|
subscribe.o tool.o unsubscribe.o main.o
|
|
LIBS = librfc822/librfc822.a libmpools/libmpools.a liblists/liblists.a libargv/libargv.a \
|
|
libconfigfile/libconfigfile.a libtext/libtext.a
|
|
|
|
FLAGS_TO_PASS = CC="$(CC)" AR="$(AR)" RANLIB="$(RANLIB)" LEX="$(LEX)" \
|
|
YACC="$(YACC)" CFLAGS="$(CFLAGS)" \
|
|
CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)"
|
|
|
|
.SUFFIXES:
|
|
.SUFFIXES: .c .o
|
|
|
|
.c.o:
|
|
$(CC) $(CFLAGS) $(CPPFLAGS) -c $<
|
|
|
|
petidomo: $(OBJS) $(LIBS)
|
|
$(CC) $(OBJS) -o $@ $(LDFLAGS) $(LIBS)
|
|
|
|
acl.c acl_scan.h: acl.y
|
|
$(YACC) -d -p acl acl.y
|
|
mv y.tab.c acl.c
|
|
mv y.tab.h acl_scan.h
|
|
|
|
acl_scan.c: acl_scan.l acl_scan.h
|
|
$(LEX) -i -Pacl acl_scan.l
|
|
mv lex.acl.c acl_scan.c
|
|
|
|
acl.c: acl_scan.c
|
|
|
|
$(LIBS):
|
|
(cd `echo $@ | sed -e 's@/.*@@'` && $(MAKE) $(FLAGS_TO_PASS))
|
|
|
|
|
|
|
|
install: petidomo
|
|
if [ ! -d $(bindir) ]; then $(INSTALL) -d $(bindir); fi
|
|
$(INSTALL) -c -s -m 555 petidomo $(bindir)
|
|
#
|
|
if [ ! -d $(libdir) ]; then $(INSTALL) -d $(libdir); fi
|
|
$(INSTALL) -c -m 444 ../etc/help $(libdir)/help
|
|
#
|
|
#if [ ! -d $(sysconfdir) ]; then $(INSTALL) -d $(sysconfdir); fi
|
|
#$(INSTALL) -c -m 640 ../etc/master-config $(sysconfdir)/petidomo.conf
|
|
#$(INSTALL) -c -m 640 ../etc/master-acl $(sysconfdir)/acl
|
|
|
|
clean distclean realclean::
|
|
@for n in lib*; do (cd $$n && $(MAKE) $@); done
|
|
|
|
clean::
|
|
rm -f petidomo
|
|
rm -f $(OBJS)
|
|
rm -f acl_scan.c acl_scan.h acl.c
|
|
|
|
distclean:: clean
|
|
rm -f config.log config.cache config.status Makefile
|
|
|
|
realclean:: distclean
|
|
rm -f configure
|
|
|
|
# Dependencies
|
|
|