update build env

This commit is contained in:
Conor Patrick 2018-05-06 20:14:52 -04:00
parent eb1d3f6267
commit aa77ccd8f9
2 changed files with 19 additions and 2 deletions

3
.gitignore vendored
View File

@ -52,3 +52,6 @@ Mkfile.old
dkms.conf
*.swp
*.pem
*.der
*.csr

View File

@ -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