summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorKevin Layer <layer@franz.com>2018-07-26 18:58:44 +0200
committerKevin Layer <layer@franz.com>2018-07-26 19:12:54 +0200
commit7f211fb4f43fa706632b5864ae7d7fed22f17b51 (patch)
tree0f2cb891d4153e0739c8daf4cc6f4f07469c3f6f /Makefile
parentUpdate README.md (diff)
downloadtiny-AES-c-7f211fb4f43fa706632b5864ae7d7fed22f17b51.tar
tiny-AES-c-7f211fb4f43fa706632b5864ae7d7fed22f17b51.tar.gz
tiny-AES-c-7f211fb4f43fa706632b5864ae7d7fed22f17b51.tar.bz2
tiny-AES-c-7f211fb4f43fa706632b5864ae7d7fed22f17b51.tar.lz
tiny-AES-c-7f211fb4f43fa706632b5864ae7d7fed22f17b51.tar.xz
tiny-AES-c-7f211fb4f43fa706632b5864ae7d7fed22f17b51.tar.zst
tiny-AES-c-7f211fb4f43fa706632b5864ae7d7fed22f17b51.zip
Diffstat (limited to 'Makefile')
-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)