From 1fab64ff066e0f747db9abc3eec7854e833b1f28 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 7 Nov 2014 14:35:43 +0100 Subject: add static library and dep list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index de06ae5..1955988 100644 --- a/Makefile +++ b/Makefile @@ -34,12 +34,19 @@ FLAGS = -std=gnu99 $(WARN) LIB_OBJ = digest files generalised-spec hex state +.PHONY: default +default: lib test + .PHONY: all all: lib test benchmark .PHONY: lib -lib: bin/libkeccak.so.$(LIB_VERSION) bin/libkeccak.so.$(LIB_MAJOR) bin/libkeccak.so +lib: so a + + +.PHONY: so +so: bin/libkeccak.so.$(LIB_VERSION) bin/libkeccak.so.$(LIB_MAJOR) bin/libkeccak.so obj/libkeccak/%.o: src/libkeccak/%.c src/libkeccak.h src/libkeccak/*.h @mkdir -p obj/libkeccak @@ -58,6 +65,14 @@ bin/libkeccak.so: ln -sf libkeccak.so.$(LIB_VERSION) $@ +.PHONY: a +a: bin/libkeccak.a + +bin/libkeccak.a: $(foreach O,$(LIB_OBJ),obj/libkeccak/$(O).o) + @mkdir -p bin + ar rcs $@ $^ + + .PHONY: test test: bin/test -- cgit v1.2.3-70-g09d2