diff options
| author | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-12-29 20:07:38 +0000 |
|---|---|---|
| committer | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-12-29 20:07:38 +0000 |
| commit | d6bb55476c9aa4771e2b7f24cee05325a1df4117 (patch) | |
| tree | ed830d3c2c748f4c1ed6de25922461d701a805de /src/Makefile | |
| parent | 0bb13ddf57c968db37a997851650d768641b3528 (diff) | |
Revived Autotools from the grave, although it'll need some tweaking to work alongside CMake now. (In other words, don't use this commit, I committed this so I don't have to re-add these files again if I screw something up.)
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1876 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/Makefile')
| -rw-r--r-- | src/Makefile | 139 |
1 files changed, 139 insertions, 0 deletions
diff --git a/src/Makefile b/src/Makefile new file mode 100644 index 000000000..bde534274 --- /dev/null +++ b/src/Makefile @@ -0,0 +1,139 @@ +OBJS = actions.o base64.o bots.o botserv.o channels.o chanserv.o commands.o compat.o \ + config.o datafiles.o encrypt.o events.o hashcomp.o helpserv.o hostserv.o init.o ircd.o language.o log.o mail.o main.o \ + memory.o memoserv.o messages.o misc.o modules.o news.o nickserv.o operserv.o \ + process.o send.o servers.o sessions.o slist.o sockutil.o timeout.o users.o module.o modulemanager.o configreader.o +SRCS = actions.c base64.c bots.cpp botserv.c channels.c chanserv.c commands.c compat.c \ + config.c datafiles.c encrypt.c events.c hashcomp.cpp helpserv.c hostserv.c init.c ircd.c language.c log.c mail.c main.c \ + memory.c memoserv.c messages.c misc.c modules.c news.c nickserv.c operserv.c \ + process.c send.c servers.c sessions.c s sockutil.c timeout.c users.c module.cpp modulemanager.cpp configreader.cpp + +INCLUDES = ../include/commands.h ../include/defs.h ../include/language.h \ + ../include/pseudo.h ../include/sysconf.h ../include/config.h \ + ../include/encrypt.h ../include/messages.h ../include/services.h \ + ../include/timeout.h ../include/datafiles.h ../include/extern.h \ + ../include/modules.h ../include/slist.h ../include/hashcomp.h + +MAKEARGS = 'CFLAGS=${CFLAGS}' 'CC=${CC}' 'ANOPELIBS=${ANOPELIBS}' \ + 'LDFLAGS=${LDFLAGS}' 'BINDEST=${BINDEST}' 'INSTALL=${INSTALL}' \ + 'INCLUDEDIR=${INCLUDEDIR}' 'RM=${RM}' 'CP=${CP}' \ + 'TOUCH=${TOUCH}' 'SHELL=${SHELL}' 'DATDEST=${DATDEST}' \ + 'RUNGROUP=${RUNGROUP}' 'MODULE_PATH=${MODULE_PATH}' \ + 'SHARED=${SHARED}' 'MODULEFLAGS=${MODULEFLAGS}' \ + 'MAKEBIN=${MAKEBIN}' + +.c.o: + @$(MAKEBIN) $(CC) $(CFLAGS) -I../include/ -c $< + +.cpp.o: + @$(MAKEBIN) $(CC) $(CFLAGS) -I../include/ -c $< + +all: services + +distclean: spotless +distclean_modules: clean_modules spotless + +services: $(OBJS) mod_version + @$(MAKEBIN) $(CC) $(CFLAGS) $(OBJS) $(ANOPELIBS) $(MLIBS) -o $@ $(LDFLAGS) + +$(OBJS): Makefile +actions.o: actions.c $(INCLUDES) +base64.o: base64.c $(INCLUDES) +bots.o: bots.cpp $(INCLUDES) +botserv.o: botserv.c $(INCLUDES) +channels.o: channels.c $(INCLUDES) +chanserv.o: chanserv.c $(INCLUDES) +commands.o: commands.c $(INCLUDES) +compat.o: compat.c $(INCLUDES) +config.o: config.c $(INCLUDES) +datafiles.o: datafiles.c $(INCLUDES) +encrypt.o: encrypt.c $(INCLUDES) +events.o: events.c $(INCLUDES) +init.o: init.c $(INCLUDES) +ircd.o: ircd.c $(INCLUDES) +helpserv.o: helpserv.c $(INCLUDES) +hostserv.o: hostserv.c $(INCLUDES) +language.o: language.c $(INCLUDES) +log.o: log.c $(INCLUDES) +mail.o: mail.c $(INCLUDES) +main.o: main.c $(INCLUDES) +memory.o: memory.c $(INCLUDES) +memoserv.o: memoserv.c $(INCLUDES) +messages.o: messages.c $(INCLUDES) +modules.o: modules.c $(INCLUDES) +module.o: module.cpp $(INCLUDES) +modulemanager.o: modulemanager.cpp $(INCLUDES) +misc.o: misc.c $(INCLUDES) +news.o: news.c $(INCLUDES) +nickserv.o: nickserv.c $(INCLUDES) +operserv.o: operserv.c $(INCLUDES) +process.o: process.c $(INCLUDES) +send.o: send.c $(INCLUDES) +servers.o: servers.c $(INCLUDES) +sessions.o: sessions.c $(INCLUDES) +slist.o: slist.c $(INCLUDES) +sockutil.o: sockutil.c $(INCLUDES) +timeout.o: timeout.c $(INCLUDES) +users.o: users.c $(INCLUDES) +vsnprintf.o: vsnprintf.c $(INCLUDES) + +mod_version: mod_version.c $(INCLUDES) + @$(MAKEBIN) $(CC) $(CDEFS) $(CFLAGS) $(MODULEFLAGS) -I../include/ -c mod_version.c + +modules: DUMMY + @modules/configure modules + @${MAKE} -C modules ${MAKEARGS} all + +protocols: DUMMY + @protocol/configure protocol + @${MAKE} -C protocol ${MAKEARGS} all + +core: DUMMY + @core/configure core + @${MAKE} -C core ${MAKEARGS} all + +clean: clean_modules clean_protocols clean_core + rm -f *.o services a.out + +clean_modules: + @touch modules/Makefile.inc # Horribly ugly... + @${MAKE} -C modules clean + +clean_protocols: + @touch protocol/Makefile.inc + @${MAKE} -C protocol clean + +clean_core: + @touch core/Makefile.inc + @${MAKE} -C core clean + +spotless: + @${MAKE} -C modules distclean + @${MAKE} -C protocol distclean + @${MAKE} -C core distclean + +install: services + test -d ${BINDEST} || mkdir ${BINDEST} + $(INSTALL) services $(BINDEST)/services + $(INSTALL) bin/anoperc $(BINDEST)/anoperc + (cd ../lang ; $(MAKE) install) + $(CP) ../data/* $(DATDEST) + $(INSTALL) bin/mydbgen $(DATDEST)/mydbgen + test -d $(DATDEST)/backups || mkdir $(DATDEST)/backups + test -d $(DATDEST)/logs || mkdir $(DATDEST)/logs + @if [ "$(MODULE_PATH)" ] ; then \ + test -d ${MODULE_PATH} || mkdir ${MODULE_PATH} ; \ + test -d ${MODULE_PATH}/runtime || mkdir ${MODULE_PATH}/runtime ; \ + (cd modules ; $(MAKE) install) ; \ + (cd protocol ; ${MAKE} install) ; \ + (cd core ; ${MAKE} install) ; \ + fi + @if [ "$(RUNGROUP)" ] ; then \ + echo chgrp -R $(RUNGROUP) $(DATDEST) ; \ + chgrp -R $(RUNGROUP) $(DATDEST) ; \ + echo chmod -R g+rw $(DATDEST) ; \ + chmod -R g+rw $(DATDEST) ; \ + echo find $(DATDEST) -type d -exec chmod g+xs \'\{\}\' \\\; ; \ + find $(DATDEST) -type d -exec chmod g+xs '{}' \; ; \ + fi + +DUMMY: |
