summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorkokke <spam@rowdy.dk>2018-09-10 23:42:38 +0200
committerGitHub <noreply@github.com>2018-09-10 23:42:38 +0200
commitf56dbc05ab0d795d74f43436aac9da56a7cc8e11 (patch)
tree0f2cb891d4153e0739c8daf4cc6f4f07469c3f6f /Makefile
parentUpdate README.md (diff)
parentTesting improvements (diff)
downloadtiny-AES-c-f56dbc05ab0d795d74f43436aac9da56a7cc8e11.tar
tiny-AES-c-f56dbc05ab0d795d74f43436aac9da56a7cc8e11.tar.gz
tiny-AES-c-f56dbc05ab0d795d74f43436aac9da56a7cc8e11.tar.bz2
tiny-AES-c-f56dbc05ab0d795d74f43436aac9da56a7cc8e11.tar.lz
tiny-AES-c-f56dbc05ab0d795d74f43436aac9da56a7cc8e11.tar.xz
tiny-AES-c-f56dbc05ab0d795d74f43436aac9da56a7cc8e11.tar.zst
tiny-AES-c-f56dbc05ab0d795d74f43436aac9da56a7cc8e11.zip
Diffstat (limited to '')
-rw-r--r--Makefile15
1 files changed, 13 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 3b875af..f87a364 100644
--- a/Makefile
+++ b/Makefile
@@ -5,6 +5,12 @@ CC = gcc
LD = gcc
CFLAGS = -Wall -Os -c
LDFLAGS = -Wall -Os -Wl,-Map,test.map
+ifdef AES192
+CFLAGS += -DAES192=1
+endif
+ifdef AES256
+CFLAGS += -DAES256=1
+endif
OBJCOPYFLAFS = -j .text -O ihex
OBJCOPY = objcopy
@@ -24,11 +30,11 @@ test.hex : test.elf
$(OBJCOPY) ${OBJCOPYFLAFS} $< $@
test.o : test.c aes.h aes.o
- echo [CC] $@
+ echo [CC] $@ $(CFLAGS)
$(CC) $(CFLAGS) -o $@ $<
aes.o : aes.c aes.h
- echo [CC] $@
+ echo [CC] $@ $(CFLAGS)
$(CC) $(CFLAGS) -o $@ $<
test.elf : aes.o test.o
@@ -39,5 +45,10 @@ test.elf : aes.o test.o
clean:
rm -f *.OBJ *.LST *.o *.gch *.out *.hex *.map
+test:
+ make clean && make && ./test.elf
+ make clean && make AES192=1 && ./test.elf
+ make clean && make AES256=1 && ./test.elf
+
lint:
$(call SPLINT)