diff options
author | Paul Duncan <pabs@pablotron.org> | 2019-07-17 17:03:37 -0400 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2019-07-17 17:03:37 -0400 |
commit | 73100bf2aaa8a1bfc4b92f42a7461b99c587ef3d (patch) | |
tree | 4d1d988f6714e22e2b991e2f074a15e03667ac7f /Makefile | |
parent | 2c9390c10b2f31c87830e0816ca207974ebfc590 (diff) | |
download | sha2-73100bf2aaa8a1bfc4b92f42a7461b99c587ef3d.tar.bz2 sha2-73100bf2aaa8a1bfc4b92f42a7461b99c587ef3d.zip |
add hmac-sha2 and update files
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 30 |
1 files changed, 21 insertions, 9 deletions
@@ -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) |