From 2de0824f026172dafe9f83564c66df12d5f1da64 Mon Sep 17 00:00:00 2001 From: Paul Selkirk Date: Tue, 21 Apr 2015 12:36:44 -0400 Subject: Unify eim and i2c memory map, unify apps, build libraries. --- sw/Makefile | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100755 sw/Makefile (limited to 'sw/Makefile') diff --git a/sw/Makefile b/sw/Makefile new file mode 100755 index 0000000..93976d7 --- /dev/null +++ b/sw/Makefile @@ -0,0 +1,44 @@ +CC = gcc +CFLAGS = -Wall + +LIB = libcryptech.a +BIN = hash hash_tester trng_extractor trng_tester +INC = cryptech.h + +PREFIX = /usr/local +LIB_DIR = $(PREFIX)/lib +BIN_DIR = $(PREFIX)/bin +INC_DIR = $(PREFIX)/include + +all: $(LIB) $(BIN) + +%.o: %.c $(INC) + $(CC) $(CFLAGS) -c -o $@ $< + +libcryptech.a: tc_eim.o novena-eim.o + ar rcs $@ $^ + +hash_tester: hash_tester.o $(LIB) + $(CC) -o $@ $^ + +trng_tester: trng_tester.o $(LIB) + $(CC) -o $@ $^ + +hash: hash.o $(LIB) + $(CC) -o $@ $^ + +trng_extractor: trng_extractor.o $(LIB) + $(CC) -o $@ $^ + +install: $(LIB) $(BIN) $(INC) + install $(LIB) $(LIB_DIR) + install $(BIN) $(BIN_DIR) + install $(INC) $(INC_DIR) + +uninstall: + rm -f $(LIB_DIR)/$(LIB) + rm -f $(foreach bin,$(BIN),$(BIN_DIR)/$(bin)) + rm -f $(INC_DIR)/$(INC) + +clean: + rm -f *.o $(LIB) $(BIN) -- cgit v1.2.3 From d07c710e9a82c46e20bc8262308117edf7a0ca11 Mon Sep 17 00:00:00 2001 From: Paul Selkirk Date: Wed, 22 Apr 2015 01:39:12 -0400 Subject: Make position-independent libraries for cryptlib. --- sw/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/Makefile') diff --git a/sw/Makefile b/sw/Makefile index 93976d7..0dbd61a 100755 --- a/sw/Makefile +++ b/sw/Makefile @@ -1,5 +1,5 @@ CC = gcc -CFLAGS = -Wall +CFLAGS = -Wall -fPIC LIB = libcryptech.a BIN = hash hash_tester trng_extractor trng_tester -- cgit v1.2.3