changeset 109:ec9db3bb6b0b

rogue4: don't include config.h if it wasn't created.
author John "Elwin" Edwards
date Mon, 09 Sep 2013 07:58:47 -0400
parents 2f41b9635c34
children 5f51f7d9805f
files rogue4/Makefile.in rogue4/rogue.h
diffstat 2 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/rogue4/Makefile.in	Sat Sep 07 09:43:06 2013 -0400
+++ b/rogue4/Makefile.in	Mon Sep 09 07:58:47 2013 -0400
@@ -51,6 +51,7 @@
 MISC=	Makefile LICENSE.TXT rogue.6 rogue.me
 
 CFLAGS= -O3
+CPPFLAGS=@DEFS@
 CRLIB = -lcurses
 RM    = rm -f
 TAR   = tar
@@ -67,8 +68,8 @@
 MACHDEP=
 
 .c.o:
-	@echo $(CC) -c $(CFLAGS) $*.c
-	@$(CC) -c $(CFLAGS) $*.c -o $*.o
+	@echo $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
+	@$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c -o $*.o
 #	@cpp -P $(CFLAGS) $*.c | ./xstr -v -c -
 #	@cc -c $(CFLAGS) x.c
 #	@mv x.o $*.o
@@ -79,13 +80,13 @@
 	$(CC) $(LDFLAGS) $(OBJS) $(LIBS) -o $@
 
 main.o: main.c $(HDRS)
-	$(CC) -c $(CFLAGS) -o $@ main.c
+	$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ main.c
 
 vers.o:
-	$(CC) -c $(CFLAGS) vers.c
+	$(CC) -c $(CPPFLAGS) $(CFLAGS) vers.c
 
 mach_dep.o: mach_dep.c
-	$(CC) -c $(CFLAGS) $(SF) $(NL) $(MACHDEP) mach_dep.c
+	$(CC) -c $(CPPFLAGS) $(CFLAGS) $(SF) $(NL) $(MACHDEP) mach_dep.c
 
 xs.o: strings
 	./xstr
--- a/rogue4/rogue.h	Sat Sep 07 09:43:06 2013 -0400
+++ b/rogue4/rogue.h	Mon Sep 09 07:58:47 2013 -0400
@@ -479,7 +479,9 @@
 
 struct room	*roomin();
 
+#ifdef HAVE_CONFIG_H
 #include "config.h"
+#endif
 #include "extern.h"
 
 #ifndef PATH_MAX