Fixed weird problems with "make clean" trying to compile stuff.
authorDavid Griffith <dave@661.org>
Tue, 27 Mar 2018 17:01:16 +0000 (10:01 -0700)
committerDavid Griffith <dave@661.org>
Tue, 27 Mar 2018 17:01:16 +0000 (10:01 -0700)
src/blorb/Makefile
src/dumb/Makefile
src/sdl/Makefile

index c8214a5a86d248014a6af8a6f0b7ba84590a681a..13e08c6f13e71f352035b26288ace3afd5b7edd4 100644 (file)
@@ -6,23 +6,19 @@ HEADERS = blorb.h blorblow.h
 
 OBJECTS = $(SOURCES:.c=.o)
 
-DEPS = $(SOURCES:.c=.d)
-
 TARGET = blorblib.a
 
 ARFLAGS = rc
 
 .PHONY: clean
-#.DELETE_ON_ERROR:
+.DELETE_ON_ERROR:
 
 $(TARGET): $(OBJECTS)
        $(AR) $(ARFLAGS) $@ $?
        ranlib $@
 
 clean:
-       -rm -f $(TARGET) $(OBJECTS) $(DEPS)
-
-%.d: %.c
-       $(CC) -MM $(CFLAGS) $< > $@
+       rm -f $(TARGET) $(OBJECTS)
 
-include $(DEPS)
+%.o: %.c
+       $(CC) $(CFLAGS) -fPIC -fpic -o $@ -c $<
index 2bee3bfd2a6e88eef5c780fa6ad96cc651af8c01..515b8c606267f4b88b2cdf0c81bd37570518465c 100644 (file)
@@ -4,23 +4,19 @@ SOURCES = dumb_blorb.c dumb_init.c dumb_input.c dumb_output.c dumb_pic.c
 
 OBJECTS = $(SOURCES:.c=.o)
 
-DEPS = $(SOURCES:.c=.d)
-
 TARGET = frotz_dumb.a
 
 ARFLAGS = rc
 
 .PHONY: clean
-#.DELETE_ON_ERROR:
+.DELETE_ON_ERROR:
 
 $(TARGET): $(OBJECTS)
        $(AR) $(ARFLAGS) $@ $?
        ranlib $@
 
 clean:
-       -rm -f $(TARGET) $(OBJECTS) $(DEPS)
-
-%.d: %.c
-       $(CC) -MM $(CFLAGS) $< > $@
+       rm -f $(TARGET) $(OBJECTS)
 
-include $(DEPS)
+%.o: %.c
+       $(CC) $(CFLAGS) -fPIC -fpic -o $@ -c $<
index 66a85fa4c906bd1479476da938142392f85c92ea..459a9ae377ee34943d57bebc52ae0e97dffc212d 100644 (file)
@@ -12,8 +12,6 @@ HEADERS = samplerate.h  sf_frotz.h
 
 OBJECTS = $(SOURCES:.c=.o)
 
-DEPS = $(SOURCES:.c=.d)
-
 TARGET = frotz_sdl.a
 
 .PHONY: clean distclean
@@ -24,9 +22,7 @@ $(TARGET): $(OBJECTS)
        ranlib $@
 
 clean:
-       -rm -f $(TARGET) $(OBJECTS) $(DEPS)
-
-%.d: %.c
-       gcc -MM $(CFLAGS) $< > $@
+       rm -f $(TARGET) $(OBJECTS)
 
-include $(DEPS)
+%.o: %.c
+       $(CC) $(CFLAGS) -fPIC -fpic -o $@ -c $<