From 316ce7f8bee2529fb3bb023104e44bb56dc3ee94 Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Tue, 1 Nov 2011 22:05:27 -0400 Subject: [PATCH] cleaning up makefile stuff for ex22 --- Makefile | 9 +++------ ex22.mk | 10 ++++++++++ 2 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 ex22.mk diff --git a/Makefile b/Makefile index e690e0e..1ddb5c8 100644 --- a/Makefile +++ b/Makefile @@ -3,13 +3,9 @@ CFLAGS=-Wall -g -DNDEBUG EXERCISES = $(patsubst %.c,%,$(shell ls ex*.c | egrep -v "ex(19|22)")) -all: $(EXERCISES) ex22_main +all: $(EXERCISES) $(MAKE) -f ex19.mk - - -ex22_main: ex22.c ex22_main.c ex22.h - $(CC) $(CFLAGS) -c -o ex22.o ex22.c - $(CC) $(CFLAGS) ex22_main.c ex22.o -o $@ + $(MAKE) -f ex22.mk test: all @@ -19,6 +15,7 @@ test: all clean: rm -f $(EXERCISES) $(MAKE) -f ex19.mk clean + $(MAKE) -f ex22.mk clean .PHONY: all test clean diff --git a/ex22.mk b/ex22.mk new file mode 100644 index 0000000..4f22c3b --- /dev/null +++ b/ex22.mk @@ -0,0 +1,10 @@ +all: ex22_main + + +ex22_main: ex22_main.o ex22.o + + +clean: + rm -f ex22_main ex22.o ex22_main.o + +.PHONY: all clean