From 6dd36f9acd3ebc4421c48d0dcc7ab3c6b1b82070 Mon Sep 17 00:00:00 2001 From: Dan Hirsch <thequux@thequux.com> Date: Mon, 30 Apr 2012 02:20:49 +0100 Subject: [PATCH] That should fix the build on Ubuntu; also, it should add a clean target --- common.mk | 5 ++++- lib/Makefile | 3 +++ src/Makefile | 6 +++++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/common.mk b/common.mk index c048330d..cc36712a 100644 --- a/common.mk +++ b/common.mk @@ -11,4 +11,7 @@ CFLAGS += -DINCLUDE_TESTS ar crv $@ $^ %.o: %.c - $(CC) $(CFLAGS) -c -o $@ $< \ No newline at end of file + $(CC) $(CFLAGS) -c -o $@ $< + +clean: + -rm -f $(OUTPUTS) diff --git a/lib/Makefile b/lib/Makefile index e8c0b513..d95ec6b4 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -1,4 +1,7 @@ include ../common.mk +OUTPUTS := \ + allocator.o + all: allocator.o diff --git a/src/Makefile b/src/Makefile index 319cc722..fcfda828 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,9 +1,13 @@ -include ../common.mk +OUTPUTS := bitreader.o \ + libhammer.a \ + test_suite + all: libhammer.a test_suite test_suite: test_suite.o libhammer.a - $(CC) $(LDFLAGS) -o $@ $^ + $(CC) -o $@ $^ $(LDFLAGS) libhammer.a: bitreader.o -- GitLab