update build env
This commit is contained in:
parent
eb1d3f6267
commit
aa77ccd8f9
3
.gitignore
vendored
3
.gitignore
vendored
@ -52,3 +52,6 @@ Mkfile.old
|
|||||||
dkms.conf
|
dkms.conf
|
||||||
|
|
||||||
*.swp
|
*.swp
|
||||||
|
*.pem
|
||||||
|
*.der
|
||||||
|
*.csr
|
||||||
|
18
Makefile
18
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)
|
src = $(wildcard *.c) $(wildcard crypto/*.c)
|
||||||
obj = $(src:.c=.o)
|
obj = $(src:.c=.o) uECC.o
|
||||||
|
|
||||||
LDFLAGS = -Wl,--gc-sections ./tinycbor/lib/libtinycbor.a
|
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 = main
|
||||||
|
|
||||||
$(name): $(obj)
|
$(name): $(obj)
|
||||||
$(CC) $(LDFLAGS) -o $@ $(obj) $(LDFLAGS)
|
$(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:
|
clean:
|
||||||
rm -f *.o main.exe main
|
rm -f *.o main.exe main
|
||||||
|
Loading…
x
Reference in New Issue
Block a user