c74836dc4a
Add two mechanism for avoiding name-collisions in a system-wide installation of charybdis. The ssld and bandb daemons, intended to be directly used by ircd and not the user, install into libexec when --enable-fhs-paths is set. For binaries which are meant to be in PATH (bindir), such as ircd and viconf, there is now an option --with-program-prefix=progprefix inspired by automake. If the user specifies --with-program-prefix=charybdis, the ircd binary is named charybdisircd when installed. Add support for saving the pidfile to a rundir and storing the ban database in localstatedir instead of in sysconfdir. This is, again, conditional on --enable-fhs-paths. Fix(?) genssl.sh to always write created SSL key/certificate/dh parameters to the sysconfdir specified during ./configure. The previous behavior was to assume that the user ran genssl.sh after ensuring that his current working directory was either sysconfdir or a sibling directory of sysconfdir.
108 lines
2.9 KiB
Makefile
108 lines
2.9 KiB
Makefile
#
|
|
# Makefile.in for bandb/src
|
|
#
|
|
# $Id: Makefile.in 1285 2006-05-05 15:03:53Z nenolod $
|
|
#
|
|
|
|
CC = @CC@
|
|
INSTALL = @INSTALL@
|
|
INSTALL_BIN = @INSTALL_PROGRAM@
|
|
INSTALL_DATA = @INSTALL_DATA@
|
|
INSTALL_SUID = @INSTALL_PROGRAM@ -o root -m 4755
|
|
RM = @RM@
|
|
LEX = @LEX@
|
|
LEXLIB = @LEXLIB@
|
|
CFLAGS = @IRC_CFLAGS@ -DIRCD_PREFIX=\"@prefix@\"
|
|
LDFLAGS = @LDFLAGS@
|
|
MKDEP = @MKDEP@ -DIRCD_PREFIX=\"@prefix@\"
|
|
MV = @MV@
|
|
RM = @RM@
|
|
prefix = @prefix@
|
|
exec_prefix = @exec_prefix@
|
|
bindir = @bindir@
|
|
libdir = @libdir@
|
|
libexecdir = @libexecdir@
|
|
pkglibexecdir = @pkglibexecdir@
|
|
confdir = @confdir@
|
|
localstatedir = @localstatedir@
|
|
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
|
|
|
PROGRAM_PREFIX = @PROGRAM_PREFIX@
|
|
|
|
ZIP_LIB = @ZLIB_LD@
|
|
|
|
IRCDLIBS = @MODULES_LIBS@ -L../libratbox/src/.libs -lratbox @LIBS@ $(SSL_LIBS) $(ZIP_LIB)
|
|
|
|
INCLUDES = -I. -I../include -I../libratbox/include $(SSL_INCLUDES)
|
|
CPPFLAGS = ${INCLUDES} @CPPFLAGS@
|
|
|
|
CFLAGS += -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION=1
|
|
|
|
pkglibexec_PROGS = bandb
|
|
bin_PROGS = bantool
|
|
PROGS = $(pkglibexec_PROGS) $(bin_PROGS)
|
|
|
|
BANDB_SOURCES = \
|
|
bandb.c \
|
|
rsdb_snprintf.c \
|
|
rsdb_sqlite3.c \
|
|
sqlite3.c
|
|
|
|
BANDB_OBJECTS = ${BANDB_SOURCES:.c=.o}
|
|
|
|
BANTOOL_SOURCES = \
|
|
bantool.c \
|
|
rsdb_snprintf.c \
|
|
rsdb_sqlite3.c \
|
|
sqlite3.c
|
|
|
|
BANTOOL_OBJECTS = ${BANTOOL_SOURCES:.c=.o}
|
|
|
|
all: bandb bantool
|
|
|
|
build: all
|
|
|
|
bandb: ${BANDB_OBJECTS}
|
|
${CC} ${CFLAGS} ${LDFLAGS} -o $@ ${BANDB_OBJECTS} ${IRCDLIBS}
|
|
|
|
bantool: ${BANTOOL_OBJECTS}
|
|
${CC} ${CFLAGS} ${LDFLAGS} -o $@ ${BANTOOL_OBJECTS} ${IRCDLIBS}
|
|
|
|
install: build
|
|
@echo "ircd: installing bandb ($(PROGS))"
|
|
@for i in $(bin_PROGS); do \
|
|
if test -f $(DESTDIR)$(bindir)/$(PROGRAM_PREFIX)$$i; then \
|
|
$(MV) $(DESTDIR)$(bindir)/$(PROGRAM_PREFIX)$$i $(DESTDIR)$(bindir)/$(PROGRAM_PREFIX)$$i.old; \
|
|
fi; \
|
|
$(INSTALL_BIN) $$i $(DESTDIR)$(bindir)/$(PROGRAM_PREFIX)$$i; \
|
|
done
|
|
@for i in $(pkglibexec_PROGS); do \
|
|
if test -f '$(DESTDIR)$(pkglibexecdir)/'$$i; then \
|
|
$(MV) '$(DESTDIR)$(pkglibexecdir)/'$$i '$(DESTDIR)$(pkglibexecdir)/'$$i.old; \
|
|
fi; \
|
|
$(INSTALL_BIN) $$i '$(DESTDIR)$(pkglibexecdir)/'$$i; \
|
|
done
|
|
|
|
.c.o:
|
|
${CC} ${CPPFLAGS} ${CFLAGS} -c $<
|
|
|
|
.PHONY: depend clean distclean
|
|
depend:
|
|
@${MKDEP} ${CPPFLAGS} ${SOURCES} > .depend.tmp
|
|
@sed -e '/^# DO NOT DELETE THIS LINE/,$$d' <Makefile >Makefile.depend
|
|
@echo '# DO NOT DELETE THIS LINE!!!' >>Makefile.depend
|
|
@echo '# make depend needs it.' >>Makefile.depend
|
|
@cat .depend.tmp >>Makefile.depend
|
|
@mv Makefile.depend Makefile
|
|
@rm -f .depend.tmp
|
|
|
|
clean:
|
|
${RM} -f *.o *~ *.core core bandb bantool
|
|
|
|
lint:
|
|
lint -aacgprxhH $(CPPFLAGS) -DIRCD_PREFIX=\"@prefix@\" $(SOURCES) >>../lint.out
|
|
|
|
distclean: clean
|
|
${RM} -f Makefile
|
|
|
|
# End of Makefile
|