diff options
author | Paul Selkirk <paul@psgd.org> | 2015-04-21 12:36:44 -0400 |
---|---|---|
committer | Paul Selkirk <paul@psgd.org> | 2015-04-21 12:36:44 -0400 |
commit | 2de0824f026172dafe9f83564c66df12d5f1da64 (patch) | |
tree | 24f2cf850c49f53542d6ff16e8d72acd4a143b58 /sw/Makefile.i2c | |
parent | aeaf94f4e83826fe56f38fc670973a60a5010ef1 (diff) |
Unify eim and i2c memory map, unify apps, build libraries.
Diffstat (limited to 'sw/Makefile.i2c')
-rwxr-xr-x | sw/Makefile.i2c | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/sw/Makefile.i2c b/sw/Makefile.i2c new file mode 100755 index 0000000..fa136a4 --- /dev/null +++ b/sw/Makefile.i2c @@ -0,0 +1,44 @@ +CC = gcc +CFLAGS = -Wall + +LIB = libcryptech_i2c.a +BIN = hash_i2c hash_tester_i2c trng_extractor_i2c trng_tester_i2c +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_i2c.a: tc_i2c.o + ar rcs $@ $^ + +hash_tester_i2c: hash_tester.o $(LIB) + $(CC) -o $@ $^ + +trng_tester_i2c: trng_tester.o $(LIB) + $(CC) -o $@ $^ + +hash_i2c: hash.o $(LIB) + $(CC) -o $@ $^ + +trng_extractor_i2c: 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) |