X-Git-Url: https://jfr.im/git/irc/gameservirc.git/blobdiff_plain/c62d75be7b442b76e9aaecbb6150ab0c91b5a645..1e7678e9262962f78ff7b15636bf0a817e47d97a:/gameserv/Makefile.in diff --git a/gameserv/Makefile.in b/gameserv/Makefile.in index 5e1ec89..9327e19 100644 --- a/gameserv/Makefile.in +++ b/gameserv/Makefile.in @@ -12,13 +12,37 @@ libdir = $(prefix)/lib/gnudl mandir = $(prefix)/man/man1 CC = @CXX@ -CPPFLAGS = -Wno-deprecated -Wall @CPPFLAGS@ +CPPFLAGS = -Wall @CPPFLAGS@ CFLAGS = $(CPPFLAGS) @CFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ INSTALL = @INSTALL@ -all: tcpclient +DRIVER = tcpclient.cpp +CONSOLEDRIVER = devel.cpp + +TSRCS = aClient.cpp \ + config.cpp \ + c_forest.cpp \ + do_attack.cpp \ + gameserv.cpp \ + hash.cpp \ + item.cpp \ + level.cpp \ + log.cpp \ + news.cpp \ + pouch.cpp \ + player.cpp \ + sockhelp.cpp + +CONSOLESRCS = $(TSRCS) $(CONSOLEDRIVER) +SRCS = $(TSRCS) $(DRIVER) +ALLSRCS = $(TSRCS) $(DRIVER) $(CONSOLEDRIVER) + +OBJS = ${SRCS:.cpp=.o} +CONSOLEOBJS = $(CONSOLESRCS:.cpp=.o) + +all: gameserv clean: /bin/rm -f *.o @@ -27,63 +51,23 @@ distclean: clean /bin/rm -f Makefile config.h config.status config.cache config.log \ options.h gameserv .config .gstimestamp -tcpclient: aClient.o config.o c_forest.o gameserv.o log.o player.o sockhelp.o tcpclient.o - $(CC) -o gameserv aClient.o config.o c_forest.o gameserv.o log.o player.o sockhelp.o\ - tcpclient.o $(LIBS) - -configscript: configscript.o - $(CC) -o .config configscript.o - -configscript.o: configscript.cpp - $(CC) $(CFLAGS) -c configscript.cpp - -tcpclient.o: tcpclient.cpp aClient.h player.h extern.h list.h \ - listnode.h options.h sockhelp.h - $(CC) $(CFLAGS) -c tcpclient.cpp - -tcpserver.o: tcpserver.cpp sockhelp.cpp - $(CC) $(CFLAGS) -c tcpserver.cpp +gameserv: $(OBJS) + $(CC) -o $@ $(OBJS) $(LIBS) -sockhelp.o: sockhelp.cpp aClient.h extern.h list.h listnode.h \ - player.h sockhelp.h - $(CC) $(CFLAGS) -c sockhelp.cpp +.cpp.o: + $(CC) $(CFLAGS) -c $< -aClient.o: aClient.cpp aClient.h extern.h list.h listnode.h \ - player.h sockhelp.h - $(CC) $(CFLAGS) -c aClient.cpp +depend: + $(CC) -MM $(CFLAGS) $(ALLSRCS) > .depend -gameserv.o: gameserv.cpp aClient.h extern.h flags.h list.h\ - listnode.h player.h pouch.h sockhelp.h - $(CC) $(CFLAGS) -c gameserv.cpp - -c_forest.o: c_forest.cpp aClient.h extern.h list.h\ - listnode.h player.h pouch.h sockhelp.h - $(CC) $(CFLAGS) -c c_forest.cpp - -log.o: config.cpp log.cpp extern.h - $(CC) $(CFLAGS) -c log.cpp - -player.o: player.cpp aClient.h extern.h list.h listnode.h player.h \ - pouch.h sockhelp.h - $(CC) $(CFLAGS) -c player.cpp - -config.o: config.cpp extern.h - $(CC) $(CFLAGS) -c config.cpp - -# autoheader might not change config.h.in, so touch a stamp file -${srcdir}/config.h.in: stamp-h.in - -${srcdir}/stamp-h.in: - cd ${srcdir} && autoheader - echo timestamp > ${srcdir}/stamp-h.in - -config.h: stamp-h +configscript: configscript.o + $(CC) -o .config configscript.o -stamp-h: config.h.in config.status - ./config.status +console: $(CONSOLEOBJS) + $(CC) -o $@ $(CONSOLEOBJS) $(LIBS) -Makefile: Makefile.in config.status - ./config.status +# Catch any changes in the Makefile, everything depends on it. +$(OBJS): Makefile +$(CONSOLEOBJS): Makefile -config.status: configure - ./config.status --recheck +include .depend