From: David Griffith Date: Tue, 27 Mar 2018 17:01:16 +0000 (-0700) Subject: Fixed weird problems with "make clean" trying to compile stuff. X-Git-Url: https://scope-eye.net/git/?a=commitdiff_plain;h=41cd51004d56babfb8ee62d0efd6ab5650301f1f;p=liskon_frotz.git Fixed weird problems with "make clean" trying to compile stuff. --- diff --git a/src/blorb/Makefile b/src/blorb/Makefile index c8214a5..13e08c6 100644 --- a/src/blorb/Makefile +++ b/src/blorb/Makefile @@ -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 $< diff --git a/src/dumb/Makefile b/src/dumb/Makefile index 2bee3bf..515b8c6 100644 --- a/src/dumb/Makefile +++ b/src/dumb/Makefile @@ -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 $< diff --git a/src/sdl/Makefile b/src/sdl/Makefile index 66a85fa..459a9ae 100644 --- a/src/sdl/Makefile +++ b/src/sdl/Makefile @@ -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 $<