diff --git a/src/Makefile b/src/Makefile index 5161c19..90f5709 100644 --- a/src/Makefile +++ b/src/Makefile @@ -5,7 +5,7 @@ PROJECT = gnuk CHOPSTX = ../chopstx -CSRC = main.c call-rsa.c mcu-stm32f103.c \ +CSRC = main.c call-rsa.c \ usb_desc.c usb_ctrl.c \ usb-ccid.c openpgp.c ac.c openpgp-do.c flash.c \ bn.c mod.c \ @@ -43,6 +43,10 @@ ifeq ($(ENABLE_PINPAD),dnd) CSRC += usb-msc.c endif +ifeq ($(CHIP),stm32f103) +CSRC += mcu-stm32f103.c +endif + ################################### CC = $(CROSS)gcc LD = $(CROSS)gcc diff --git a/src/stdlib.h b/src/stdlib.h index 7dcaf03..bc2d05b 100644 --- a/src/stdlib.h +++ b/src/stdlib.h @@ -7,9 +7,7 @@ * For GNU/Linux emulation, we can use C library. */ -typedef unsigned long int size_t; - -#include /* NULL */ +#include /* NULL and size_t */ #define malloc(size) gnuk_malloc (size) #define free(p) gnuk_free (p)