piler/src/Makefile.in

99 lines
2.9 KiB
Makefile
Raw Normal View History

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@
INCDIR = -I. -I.. @INCDIR@ @mysql_includes@
LIBDIR = -L. @LIBDIR@ @LDFLAGS@
LIBS = @LIBS@ @mysql_libs@
OBJS = @OBJS@
MYSQL_OBJS = @mysql_obj@
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@
all: libpiler.a piler pilerconf pilerget pilerimport pilerexport test
2011-11-14 15:57:52 +01:00
install: install-piler
piler: piler.c libpiler.a
$(CC) $(CFLAGS) $(INCDIR) $(DEFS) -o $@ piler.c -lpiler $(LIBS) $(LIBDIR) @LDFLAGS@ @libclamav_extra_libs@
2011-11-14 15:57:52 +01:00
libpiler.a: $(OBJS) $(MYSQL_OBJS)
ar cr libpiler.a $(OBJS) $(MYSQL_OBJS)
ranlib libpiler.a
$(CC) -shared -Wl -o libpiler.so.$(LIBPILER_VERSION) $(OBJS) $(MYSQL_OBJS) $(LIBS) @LDFLAGS@
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)
2012-01-07 16:40:06 +01:00
pilerget: pilerget.c libpiler.a
$(CC) $(CFLAGS) $(INCDIR) $(DEFS) -o $@ $^ -lpiler $(LIBS) $(LIBDIR)
2011-11-22 12:31:54 +01:00
2011-12-30 15:52:59 +01:00
pilerimport: pilerimport.c libpiler.a
$(CC) $(CFLAGS) $(INCDIR) $(DEFS) -o $@ $^ -lpiler $(LIBS) $(LIBDIR)
pilerexport: pilerexport.c libpiler.a
$(CC) $(CFLAGS) $(INCDIR) $(DEFS) -o $@ $^ -lpiler $(LIBS) $(LIBDIR)
2011-11-14 15:57:52 +01:00
pilerconf: pilerconf.c cfg.o misc.o tai.o
2011-11-23 12:24:21 +01:00
$(CC) $(CFLAGS) $(INCDIR) $(DEFS) -o $@ $^ $(LIBDIR)
2011-11-14 15:57:52 +01:00
2012-01-08 16:16:00 +01:00
test: test.c libpiler.a
$(CC) $(CFLAGS) $(INCDIR) $(DEFS) -o pilertest $^ -lpiler $(LIBS) $(LIBDIR) @LDFLAGS@
2011-11-14 15:57:52 +01:00
%.o: $(srcdir)/%.c
$(CC) $(CFLAGS) -fPIC $(INCDIR) $(DEFS) -c $< -o $@
install-piler:
$(INSTALL) -d $(DESTDIR)$(bindir)
$(INSTALL) -d $(DESTDIR)$(sbindir)
$(INSTALL) -d $(DESTDIR)$(libdir)
$(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) -d $(DESTDIR)$(libexecdir)/piler
$(INSTALL) -d $(DESTDIR)$(datarootdir)/piler
$(INSTALL) -m 0755 piler $(DESTDIR)$(sbindir)
$(INSTALL) -m 0755 pilerconf $(DESTDIR)$(sbindir)
2011-12-27 20:51:56 +01:00
$(INSTALL) -m 0755 pilerget $(DESTDIR)$(bindir)
2012-01-07 00:00:36 +01:00
$(INSTALL) -m 0755 pilerimport $(DESTDIR)$(bindir)
2011-11-14 15:57:52 +01:00
chown $(RUNNING_USER):$(RUNNING_GROUP) $(DESTDIR)$(bindir)/pilerget
chown $(RUNNING_USER):$(RUNNING_GROUP) $(DESTDIR)$(bindir)/pilerimport
chmod +s $(DESTDIR)$(bindir)/pilerget
chmod +s $(DESTDIR)$(bindir)/pilerimport
2011-11-14 15:57:52 +01:00
clean:
2011-12-30 15:52:59 +01:00
rm -f *.o *.a libpiler.so* piler pilerconf pilerget pilerimport pilertest
2011-11-14 15:57:52 +01:00
distclean: clean
rm -f Makefile