aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2023-09-01 16:45:37 -0400
committerPaul Duncan <pabs@pablotron.org>2023-09-01 16:45:37 -0400
commitc7f630ed23144939a540219787c7be3ffe14b24c (patch)
treed8952a4b64c61e92fe552c54ea26e0d5b6d99a34 /Makefile
downloadsha3-c7f630ed23144939a540219787c7be3ffe14b24c.tar.bz2
sha3-c7f630ed23144939a540219787c7be3ffe14b24c.zip
initial commit
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile20
1 files changed, 20 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..11f844c
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,20 @@
+CFLAGS=-W -Wall -Wextra -Werror -pedantic -std=c11 -O3 -march=native -mtune=native
+TEST_APP=./test-sha3
+EXAMPLE_APP=./sha3
+OBJS=sha3.o main.o
+
+.PHONY=test all
+
+all: $(EXAMPLE_APP)
+
+$(EXAMPLE_APP): $(OBJS)
+ $(CC) -o $(EXAMPLE_APP) $(CFLAGS) $(OBJS)
+
+%.o: %.c
+ $(CC) -c $(CFLAGS) $<
+
+test:
+ $(CC) -o $(TEST_APP) -DSHA3_TEST sha3.c && $(TEST_APP)
+
+clean:
+ $(RM) -f $(TEST_APP) $(EXAMPLE_APP) $(OBJS)