2018-05-07 00:14:52 +00:00
|
|
|
#define uECC_arch_other 0
|
|
|
|
#define uECC_x86 1
|
|
|
|
#define uECC_x86_64 2
|
|
|
|
#define uECC_arm 3
|
|
|
|
#define uECC_arm_thumb 4
|
|
|
|
#define uECC_arm_thumb2 5
|
|
|
|
#define uECC_arm64 6
|
|
|
|
#define uECC_avr 7
|
|
|
|
|
|
|
|
platform=2
|
|
|
|
|
2018-05-18 03:11:00 +00:00
|
|
|
src = $(wildcard *.c) $(wildcard crypto/*.c) crypto/tiny-AES-c/aes.c
|
2018-05-07 00:14:52 +00:00
|
|
|
obj = $(src:.c=.o) uECC.o
|
2018-04-28 17:40:28 +00:00
|
|
|
|
|
|
|
LDFLAGS = -Wl,--gc-sections ./tinycbor/lib/libtinycbor.a
|
2018-05-18 03:11:00 +00:00
|
|
|
CFLAGS = -O2 -fdata-sections -ffunction-sections -I./tinycbor/src -I./crypto -I./crypto/micro-ecc/ -Icrypto/tiny-AES-c/
|
2018-04-28 17:40:28 +00:00
|
|
|
|
|
|
|
name = main
|
|
|
|
|
|
|
|
$(name): $(obj)
|
|
|
|
$(CC) $(LDFLAGS) -o $@ $(obj) $(LDFLAGS)
|
2018-05-03 02:52:41 +00:00
|
|
|
|
2018-05-07 00:14:52 +00:00
|
|
|
uECC.o: ./crypto/micro-ecc/uECC.c
|
|
|
|
$(CC) -c -o $@ $^ -O2 -fdata-sections -ffunction-sections -DuECC_PLATFORM=$(platform) -I./crypto/micro-ecc/
|
|
|
|
|
2018-05-03 02:52:41 +00:00
|
|
|
clean:
|
|
|
|
rm -f *.o main.exe main
|