summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorkokke <spam@rowdy.dk>2018-09-24 15:35:10 +0200
committerGitHub <noreply@github.com>2018-09-24 15:35:10 +0200
commit3a28fc9a87a57a139caa9e827eb868c04db46848 (patch)
tree689edde0e5d75250970fca19ce091274f265d8f0 /Makefile
parentMerge pull request #109 from franzinc/master (diff)
downloadtiny-AES-c-3a28fc9a87a57a139caa9e827eb868c04db46848.tar
tiny-AES-c-3a28fc9a87a57a139caa9e827eb868c04db46848.tar.gz
tiny-AES-c-3a28fc9a87a57a139caa9e827eb868c04db46848.tar.bz2
tiny-AES-c-3a28fc9a87a57a139caa9e827eb868c04db46848.tar.lz
tiny-AES-c-3a28fc9a87a57a139caa9e827eb868c04db46848.tar.xz
tiny-AES-c-3a28fc9a87a57a139caa9e827eb868c04db46848.tar.zst
tiny-AES-c-3a28fc9a87a57a139caa9e827eb868c04db46848.zip
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 10 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index f87a364..5581093 100644
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,8 @@
#OBJCOPY = avr-objcopy
CC = gcc
LD = gcc
+AR = ar
+ARFLAGS = rcs
CFLAGS = -Wall -Os -c
LDFLAGS = -Wall -Os -Wl,-Map,test.map
ifdef AES192
@@ -12,7 +14,7 @@ ifdef AES256
CFLAGS += -DAES256=1
endif
-OBJCOPYFLAFS = -j .text -O ihex
+OBJCOPYFLAGS = -j .text -O ihex
OBJCOPY = objcopy
# include path to AVR library
@@ -27,7 +29,7 @@ default: test.elf
test.hex : test.elf
echo copy object-code to new image and format in hex
- $(OBJCOPY) ${OBJCOPYFLAFS} $< $@
+ $(OBJCOPY) ${OBJCOPYFLAGS} $< $@
test.o : test.c aes.h aes.o
echo [CC] $@ $(CFLAGS)
@@ -41,9 +43,14 @@ test.elf : aes.o test.o
echo [LD] $@
$(LD) $(LDFLAGS) -o $@ $^
+aes.a : aes.o
+ echo [AR] $@
+ $(AR) $(ARFLAGS) $@ $^
+
+lib : aes.a
clean:
- rm -f *.OBJ *.LST *.o *.gch *.out *.hex *.map
+ rm -f *.OBJ *.LST *.o *.gch *.out *.hex *.map *.elf *.a
test:
make clean && make && ./test.elf