changeset 232:bac2c81fec78

Makefiles: don't rely on built-in implicit rules. Not all make implementations will use CPPFLAGS when compiling C files.
author John "Elwin" Edwards
date Tue, 08 Mar 2016 19:45:41 -0500
parents 455464db5800
children 837044d2c362
files arogue5/Makefile.in arogue7/Makefile.in rogue3/Makefile.in rogue4/Makefile.in rogue5/Makefile.in srogue/Makefile.in xrogue/Makefile.in
diffstat 7 files changed, 24 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/arogue5/Makefile.in	Sun Mar 06 17:09:17 2016 -0500
+++ b/arogue5/Makefile.in	Tue Mar 08 19:45:41 2016 -0500
@@ -58,11 +58,14 @@
 RM    = rm -f
 TAR   = tar
 INSTALL=@INSTALL@
-.SUFFIXES: .obj
+.SUFFIXES: .obj .o .c
 
 .c.obj:
 	$(CC) $(CFLAGS) /c $*.c
 
+.c.o:
+	$(CC) $(CPPFLAGS) $(CFLAGS) -c $*.c
+
 $(PROGRAM): $(OBJS)
 	$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(CRLIB) -o $@
 
--- a/arogue7/Makefile.in	Sun Mar 06 17:09:17 2016 -0500
+++ b/arogue7/Makefile.in	Tue Mar 08 19:45:41 2016 -0500
@@ -74,11 +74,14 @@
 COLCRT=@COLCRT@
 TBL=@TBL@
 
-.SUFFIXES: .obj
+.SUFFIXES: .obj .o .c
 
 .c.obj:
 	$(CC) $(CFLAGS) /c $*.c
     
+.c.o:
+	$(CC) $(CPPFLAGS) $(CFLAGS) -c $*.c
+
 all: $(PROGRAM) docs
 
 $(PROGRAM): $(HDRS) $(OBJS)
--- a/rogue3/Makefile.in	Sun Mar 06 17:09:17 2016 -0500
+++ b/rogue3/Makefile.in	Tue Mar 08 19:45:41 2016 -0500
@@ -68,11 +68,14 @@
 COLCRT=@COLCRT@
 TBL=@TBL@
 
-.SUFFIXES: .obj
+.SUFFIXES: .obj .o .c
 
 .c.obj:
 	$(CC) $(CFLAGS) /c $*.c
 
+.c.o:
+	$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $*.o $*.c
+
 all: $(PROGRAM)$(EXE) docs
 
 $(PROGRAM)$(EXE): $(HDRS) $(OBJS)
--- a/rogue4/Makefile.in	Sun Mar 06 17:09:17 2016 -0500
+++ b/rogue4/Makefile.in	Tue Mar 08 19:45:41 2016 -0500
@@ -68,6 +68,8 @@
 #MACHDEP=	-DMAXLOAD=40 -DLOADAV -DCHECKTIME=4
 MACHDEP=
 
+.SUFFIXES: .c .o
+
 .c.o:
 	@echo $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
 	@$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c -o $*.o
--- a/rogue5/Makefile.in	Sun Mar 06 17:09:17 2016 -0500
+++ b/rogue5/Makefile.in	Tue Mar 08 19:45:41 2016 -0500
@@ -123,7 +123,7 @@
 MISC     = Makefile.std LICENSE.TXT rogue54.sln rogue54.vcproj rogue.spec \
            rogue.png rogue.desktop
 
-.SUFFIXES: .obj
+.SUFFIXES: .obj .o .c
 
 .c.obj:
 	$(CC) $(CFLAGS) $(CPPFLAGS) /c $*.c
--- a/srogue/Makefile.in	Sun Mar 06 17:09:17 2016 -0500
+++ b/srogue/Makefile.in	Tue Mar 08 19:45:41 2016 -0500
@@ -59,6 +59,11 @@
 $(PROGRAM): $(HDRS) $(OBJS)
 	$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(CRLIB) -o $@
 
+.SUFFIXES: .c .o
+
+.c.o:
+	$(CC) $(CPPFLAGS) $(CFLAGS) -c $*.c
+
 tags: $(HDRS) $(CFILES)
 	ctags -u $?
 	ed - tags < :ctfix
--- a/xrogue/Makefile.in	Sun Mar 06 17:09:17 2016 -0500
+++ b/xrogue/Makefile.in	Tue Mar 08 19:45:41 2016 -0500
@@ -57,11 +57,14 @@
 RM    = rm -f
 TAR   = tar 
 INSTALL=@INSTALL@
-.SUFFIXES: .obj
+.SUFFIXES: .obj .o .c
 
 .c.obj:
 	$(CC) $(CFLAGS) /c $*.c
 
+.c.o:
+	$(CC) $(CPPFLAGS) $(CFLAGS) -c $*.c
+
 $(PROGRAM): $(HDRS) $(OBJS)
 	$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS) -o $@