]> jfr.im git - irc/gameservirc.git/blobdiff - gameserv/Makefile.in
Added a couple new directives to the config file
[irc/gameservirc.git] / gameserv / Makefile.in
index 41f60a4e408e386cef2f6dd91a2c1641fc40b3a3..629c30360ad00bfce806429a77a028409176b99a 100644 (file)
@@ -12,13 +12,24 @@ 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
+SRCS = aClient.cpp \
+       config.cpp \
+       c_forest.cpp \
+       gameserv.cpp \
+       log.cpp \
+       player.cpp \
+       sockhelp.cpp \
+       tcpclient.cpp
+
+OBJS = ${SRCS:.cpp=.o}
+
+all:   gameserv
 
 clean:
        /bin/rm -f *.o
@@ -27,60 +38,19 @@ 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 player.o sockhelp.o tcpclient.o
-       $(CC) -o gameserv aClient.o config.o c_forest.o gameserv.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 pouch.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
-
-sockhelp.o:    sockhelp.cpp aClient.h extern.h list.h listnode.h \
-               player.h pouch.h sockhelp.h
-       $(CC) $(CFLAGS) -c sockhelp.cpp
+gameserv: $(OBJS)
+       $(CC) -o $@ $(OBJS) $(LIBS)
 
-aClient.o:     aClient.cpp aClient.h extern.h  list.h listnode.h \
-               player.h pouch.h sockhelp.h
-       $(CC) $(CFLAGS) -c aClient.cpp
+.cpp.o:
+       $(CC) $(CFLAGS) -c $<
 
-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
+depend:
+       $(CC) -MM $(CFLAGS) $(SRCS) > .depend
 
-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
-
-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
-
-stamp-h: config.h.in config.status
-       ./config.status
+configscript: configscript.o
+       $(CC) -o .config configscript.o
 
-Makefile: Makefile.in config.status
-       ./config.status
+# Catch any changes in the Makefile, everything depends on it.
+$(OBJS): Makefile
 
-config.status: configure
-       ./config.status --recheck
+include .depend