aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-11-05 22:13:44 +0100
committerMattias Andrée <maandree@operamail.com>2014-11-05 22:13:44 +0100
commitcac72615414065276da6c8f08860a41fa16b5a92 (patch)
tree0df565ca3f8f1645d19065c1591a19d8e3510200 /Makefile
parentisolate optimisation to the library (diff)
downloadlibkeccak-cac72615414065276da6c8f08860a41fa16b5a92.tar.gz
libkeccak-cac72615414065276da6c8f08860a41fa16b5a92.tar.bz2
libkeccak-cac72615414065276da6c8f08860a41fa16b5a92.tar.xz
test.c does not need its own directory
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 4 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index c4b2d49..cb7ab19 100644
--- a/Makefile
+++ b/Makefile
@@ -83,7 +83,6 @@ FLAGS = -std=gnu99 $(WARN)
LIB_OBJ = digest files generalised-spec hex state
-TEST_OBJ = test
.PHONY: all
@@ -113,11 +112,11 @@ bin/libkeccak.so:
.PHONY: test
test: bin/test
-bin/test: bin/libkeccak.so $(foreach O,$(TEST_OBJ),obj/test/$(O).o)
- $(CC) $(FLAGS) $(LDFLAGS) -Lbin -lkeccak -o $@ $(foreach O,$(TEST_OBJ),obj/test/$(O).o)
+bin/test: obj/test.o bin/libkeccak.so
+ $(CC) $(FLAGS) $(LDFLAGS) -Lbin -lkeccak -o $@ $<
-obj/test/%.o: src/test/%.c src/libkeccak/*.h src/libkeccak.h
- @mkdir -p obj/test
+obj/test.o: src/test.c src/libkeccak/*.h src/libkeccak.h
+ @mkdir -p obj
$(CC) $(FLAGS) $(CFLAGS) $(CPPFLAGS) -Isrc -O3 -c -o $@ $<