diff --git a/.gitignore b/.gitignore index cf6b7c4..0c51ebc 100644 --- a/.gitignore +++ b/.gitignore @@ -52,3 +52,6 @@ Mkfile.old dkms.conf *.swp +*.pem +*.der +*.csr diff --git a/Makefile b/Makefile index 5352685..a48f8de 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,27 @@ +#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 + src = $(wildcard *.c) $(wildcard crypto/*.c) -obj = $(src:.c=.o) +obj = $(src:.c=.o) uECC.o LDFLAGS = -Wl,--gc-sections ./tinycbor/lib/libtinycbor.a -CFLAGS = -O2 -fdata-sections -ffunction-sections -I./tinycbor/src -I./crypto +CFLAGS = -O2 -fdata-sections -ffunction-sections -I./tinycbor/src -I./crypto -I./crypto/micro-ecc/ name = main $(name): $(obj) $(CC) $(LDFLAGS) -o $@ $(obj) $(LDFLAGS) +uECC.o: ./crypto/micro-ecc/uECC.c + $(CC) -c -o $@ $^ -O2 -fdata-sections -ffunction-sections -DuECC_PLATFORM=$(platform) -I./crypto/micro-ecc/ + clean: rm -f *.o main.exe main