From 73100bf2aaa8a1bfc4b92f42a7461b99c587ef3d Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Wed, 17 Jul 2019 17:03:37 -0400 Subject: add hmac-sha2 and update files --- Makefile | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 9558fc9..faa1541 100644 --- a/Makefile +++ b/Makefile @@ -1,20 +1,32 @@ CFLAGS=-std=c11 -W -Wall -Wextra -pedantic -O3 -march=native -OBJS=sha2.o main.o tests.o -APP=sha256 +TEST_OBJS=sha2.o run-tests.o tests.o hmac-sha2.o +TEST_APP=run-tests +HASH_OBJS=sha2.o hash-main.o tests.o hmac-sha2.o +HASH_APP=hash-sha256 +HMAC_OBJS=sha2.o hmac-sha2.o hmac-main.o +HMAC_APP=hmac-sha256 .PHONY=all clean -all: $(APP) +all: $(TEST_APP) $(HMAC_APP) $(HASH_APP) -$(APP): $(OBJS) - $(CC) $(CFLAGS) -o $(APP) $(OBJS) +$(TEST_APP): $(TEST_OBJS) + $(CC) $(CFLAGS) -o $(TEST_APP) $(TEST_OBJS) + +$(HASH_APP): $(HASH_OBJS) + $(CC) $(CFLAGS) -o $(HASH_APP) $(HASH_OBJS) + +$(HMAC_APP): $(HMAC_OBJS) + $(CC) $(CFLAGS) -o $(HMAC_APP) $(HMAC_OBJS) %.o: %.c $(CC) $(CFLAGS) -c $< clean: - $(RM) $(OBJS) $(APP) + $(RM) $(TEST_OBJS) $(TEST_APP) \ + $(HASH_OBJS) $(HASH_APP) \ + $(HMAC_OBJS) $(HMAC_APP) -test: $(APP) - @# ./$(APP) '' 'foobar' - @./$(APP) +test: $(TEST_APP) + @# ./$(TEST_APP) '' 'foobar' + @./$(TEST_APP) -- cgit v1.2.3