2011-11-14 15:57:52 +01:00
|
|
|
SHELL = @SHELL@
|
|
|
|
|
|
|
|
prefix = @prefix@
|
|
|
|
exec_prefix = @exec_prefix@
|
|
|
|
bindir = @bindir@
|
|
|
|
sbindir = @sbindir@
|
|
|
|
includedir = @includedir@
|
|
|
|
libdir = @libdir@
|
|
|
|
libexecdir = @libexecdir@
|
|
|
|
srcdir = @srcdir@
|
|
|
|
sysconfdir = @sysconfdir@
|
|
|
|
mandir = @mandir@
|
|
|
|
datarootdir = @datarootdir@
|
|
|
|
localstatedir = @localstatedir@
|
|
|
|
|
|
|
|
CC = @CC@
|
|
|
|
CFLAGS = @CFLAGS@ @CPPFLAGS@
|
|
|
|
DEFS = @defs@
|
2013-05-16 22:13:46 +02:00
|
|
|
INCDIR = -I. -I.. @INCDIR@ @sql_includes@
|
2011-11-14 15:57:52 +01:00
|
|
|
LIBDIR = -L. @LIBDIR@ @LDFLAGS@
|
2013-05-16 22:13:46 +02:00
|
|
|
LIBS = @LIBS@ @sql_libs@
|
2011-11-14 15:57:52 +01:00
|
|
|
OBJS = @OBJS@
|
2013-05-16 22:13:46 +02:00
|
|
|
SQL_OBJS = @sql_obj@
|
2011-11-14 15:57:52 +01:00
|
|
|
RUNNING_USER = @RUNNING_USER@
|
|
|
|
RUNNING_GROUP = `@id_bin@ -gn $(RUNNING_USER)`
|
|
|
|
|
|
|
|
PILER_VERSION=0
|
|
|
|
PILER_REVISION=1
|
|
|
|
PILER_RELEASE=1
|
|
|
|
LIBPILER_VERSION=$(PILER_VERSION).$(PILER_REVISION).$(PILER_RELEASE)
|
|
|
|
|
|
|
|
MAKE = `which make`
|
|
|
|
|
|
|
|
INSTALL = @INSTALL@
|
|
|
|
|
2018-02-17 17:27:17 +01:00
|
|
|
all: libpiler.a piler pilerconf pilerget pileraget pilerimport pilerexport reindex test stats piler-smtp
|
2011-11-14 15:57:52 +01:00
|
|
|
install: install-piler
|
|
|
|
|
|
|
|
|
|
|
|
piler: piler.c libpiler.a
|
2012-07-24 21:28:55 +02:00
|
|
|
$(CC) $(CFLAGS) $(INCDIR) $(DEFS) -o $@ $< -lpiler $(LIBS) $(LIBDIR) @LDFLAGS@ @libclamav_extra_libs@
|
2011-11-14 15:57:52 +01:00
|
|
|
|
2013-05-16 22:13:46 +02:00
|
|
|
libpiler.a: $(OBJS) $(SQL_OBJS)
|
|
|
|
ar cr libpiler.a $(OBJS) $(SQL_OBJS)
|
2011-11-14 15:57:52 +01:00
|
|
|
ranlib libpiler.a
|
2018-06-13 15:07:19 +02:00
|
|
|
$(CC) -shared -Wl,-soname,libpiler.so.$(LIBPILER_VERSION) -o libpiler.so.$(LIBPILER_VERSION) $(OBJS) $(SQL_OBJS)
|
2011-11-14 15:57:52 +01:00
|
|
|
ln -sf libpiler.so.$(LIBPILER_VERSION) libpiler.so
|
|
|
|
ln -sf libpiler.so.$(LIBPILER_VERSION) libpiler.so.$(PILER_VERSION)
|
|
|
|
|
2016-10-23 22:04:55 +02:00
|
|
|
piler-smtp: piler-smtp.c libpiler.a
|
2020-12-27 23:40:39 +01:00
|
|
|
$(CC) $(CFLAGS) $(INCDIR) $(DEFS) -o $@ $< cfg.o misc.o tai.o smtp.o session.o dirs.o sig.o bdat.o screen.o $(LIBS) $(LIBDIR)
|
2011-11-14 15:57:52 +01:00
|
|
|
|
2012-01-07 16:40:06 +01:00
|
|
|
pilerget: pilerget.c libpiler.a
|
2012-07-24 21:28:55 +02:00
|
|
|
$(CC) $(CFLAGS) $(INCDIR) $(DEFS) -o $@ $< -lpiler $(LIBS) $(LIBDIR)
|
2011-11-22 12:31:54 +01:00
|
|
|
|
2012-10-03 23:27:33 +02:00
|
|
|
pileraget: pileraget.c libpiler.a
|
|
|
|
$(CC) $(CFLAGS) $(INCDIR) $(DEFS) -o $@ $< -lpiler $(LIBS) $(LIBDIR)
|
|
|
|
|
2011-12-30 15:52:59 +01:00
|
|
|
pilerimport: pilerimport.c libpiler.a
|
2012-07-24 21:28:55 +02:00
|
|
|
$(CC) $(CFLAGS) $(INCDIR) $(DEFS) -o $@ $< -lpiler $(LIBS) $(LIBDIR)
|
2011-12-30 15:52:59 +01:00
|
|
|
|
2012-01-07 23:26:47 +01:00
|
|
|
pilerexport: pilerexport.c libpiler.a
|
2012-07-24 21:28:55 +02:00
|
|
|
$(CC) $(CFLAGS) $(INCDIR) $(DEFS) -o $@ $< -lpiler $(LIBS) $(LIBDIR)
|
2012-01-07 23:26:47 +01:00
|
|
|
|
2012-08-10 13:04:54 +02:00
|
|
|
pilerconf: pilerconf.c libpiler.a
|
|
|
|
$(CC) $(CFLAGS) $(INCDIR) $(DEFS) -o $@ $< -lpiler $(LIBS) $(LIBDIR)
|
2011-11-14 15:57:52 +01:00
|
|
|
|
2012-06-01 14:25:49 +02:00
|
|
|
reindex: reindex.c libpiler.a
|
2012-07-24 21:28:55 +02:00
|
|
|
$(CC) $(CFLAGS) $(INCDIR) $(DEFS) -o $@ $< -lpiler $(LIBS) $(LIBDIR)
|
2012-06-01 14:25:49 +02:00
|
|
|
|
2012-01-08 16:16:00 +01:00
|
|
|
test: test.c libpiler.a
|
2012-07-24 21:28:55 +02:00
|
|
|
$(CC) $(CFLAGS) $(INCDIR) $(DEFS) -o pilertest $< -lpiler $(LIBS) $(LIBDIR) @LDFLAGS@
|
2011-11-14 15:57:52 +01:00
|
|
|
|
2018-02-17 17:27:17 +01:00
|
|
|
stats: stats.c libpiler.a
|
|
|
|
$(CC) $(CFLAGS) $(INCDIR) $(DEFS) -o pilerstats $< -lpiler $(LIBS) $(LIBDIR) @LDFLAGS@
|
|
|
|
|
2011-11-14 15:57:52 +01:00
|
|
|
%.o: $(srcdir)/%.c
|
2019-04-21 18:46:57 +02:00
|
|
|
$(CC) $(CFLAGS) $(INCDIR) $(DEFS) -c $< -o $@
|
2011-11-14 15:57:52 +01:00
|
|
|
|
|
|
|
|
|
|
|
install-piler:
|
|
|
|
$(INSTALL) -m 0644 libpiler.a $(DESTDIR)$(libdir)
|
|
|
|
$(INSTALL) -m 0755 libpiler.so.$(LIBPILER_VERSION) $(DESTDIR)$(libdir)
|
|
|
|
(cd $(DESTDIR)$(libdir) && ln -sf libpiler.so.$(LIBPILER_VERSION) libpiler.so)
|
|
|
|
(cd $(DESTDIR)$(libdir) && ln -sf libpiler.so.$(LIBPILER_VERSION) libpiler.so.$(PILER_VERSION))
|
|
|
|
|
|
|
|
$(INSTALL) -m 0755 piler $(DESTDIR)$(sbindir)
|
2016-10-23 22:04:55 +02:00
|
|
|
$(INSTALL) -m 0755 piler-smtp $(DESTDIR)$(sbindir)
|
2011-11-14 15:57:52 +01:00
|
|
|
$(INSTALL) -m 0755 pilerconf $(DESTDIR)$(sbindir)
|
2012-02-11 23:12:30 +01:00
|
|
|
$(INSTALL) -m 6755 -o $(RUNNING_USER) -g $(RUNNING_GROUP) pilerget $(DESTDIR)$(bindir)
|
2012-10-03 23:27:33 +02:00
|
|
|
$(INSTALL) -m 6755 -o $(RUNNING_USER) -g $(RUNNING_GROUP) pileraget $(DESTDIR)$(bindir)
|
2012-02-11 23:12:30 +01:00
|
|
|
$(INSTALL) -m 6755 -o $(RUNNING_USER) -g $(RUNNING_GROUP) pilerimport $(DESTDIR)$(bindir)
|
2012-03-20 10:35:22 +01:00
|
|
|
$(INSTALL) -m 6755 -o $(RUNNING_USER) -g $(RUNNING_GROUP) pilerexport $(DESTDIR)$(bindir)
|
2012-06-01 14:25:49 +02:00
|
|
|
$(INSTALL) -m 6755 -o $(RUNNING_USER) -g $(RUNNING_GROUP) reindex $(DESTDIR)$(bindir)
|
2013-11-11 11:34:00 +01:00
|
|
|
$(INSTALL) -m 6755 -o $(RUNNING_USER) -g $(RUNNING_GROUP) pilertest $(DESTDIR)$(bindir)
|
2018-02-17 17:27:17 +01:00
|
|
|
$(INSTALL) -m 6755 -o $(RUNNING_USER) -g $(RUNNING_GROUP) pilerstats $(DESTDIR)$(bindir)
|
2012-02-07 17:21:23 +01:00
|
|
|
|
2011-11-14 15:57:52 +01:00
|
|
|
clean:
|
2018-02-17 17:27:17 +01:00
|
|
|
rm -f *.o *.a libpiler.so* piler pilerconf pilerget pileraget pilerimport pilerexport pilertest pilerstats reindex piler-smtp
|
2011-11-14 15:57:52 +01:00
|
|
|
|
|
|
|
distclean: clean
|
|
|
|
rm -f Makefile
|
|
|
|
|