From 7640bf76a6ac1e5b615d4a867ff422a2f396c697 Mon Sep 17 00:00:00 2001 From: Edouard Merle Date: Wed, 29 Jul 2020 16:30:38 +0200 Subject: [PATCH] updating local Makefile.rules file --- Makefile | 9 +++++++-- Makefile.rules | 6 +++--- src/gpg_ram.c | 6 +----- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 032c093..0850c26 100644 --- a/Makefile +++ b/Makefile @@ -114,6 +114,11 @@ DEFINES += APPVERSION=\"$(APPVERSION)\" DEFINES += HAVE_USB_CLASS_CCID +ifeq ($(NO_CXNG),) +INCLUDES_PATH += $(BOLOS_SDK)/lib_cxng/include +SOURCE_PATH += $(BOLOS_SDK)/lib_cxng/src +endif + # RSA addition. DEFINES += HAVE_RSA INCLUDES_PATH += $(BOLOS_SDK)/lib_cxng/src @@ -222,8 +227,8 @@ delete: # import generic rules from the user and SDK -#-include Makefile.rules -include $(BOLOS_SDK)/Makefile.rules +-include Makefile.rules +#include $(BOLOS_SDK)/Makefile.rules #add dependency on custom makefile filename dep/%.d: %.c Makefile diff --git a/Makefile.rules b/Makefile.rules index 51cf279..a20937f 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -24,9 +24,9 @@ endif #Make the SDK modified SDK sources prioritar to the original ones -SOURCE_PATH += $(dir $(foreach libdir, $(APP_SOURCE_PATH), $(dir $(shell find $(libdir) | grep "\.c$$")))) $(BOLOS_SDK)/src $(foreach libdir, $(SDK_SOURCE_PATH), $(dir $(shell find $(BOLOS_SDK)/$(libdir) | grep "\.c$$"))) -SOURCE_FILES := $(foreach path, $(SOURCE_PATH),$(shell find $(path) | grep "\.c$$") ) $(GLYPH_DESTC) -INCLUDES_PATH := $(dir $(foreach libdir, $(APP_SOURCE_PATH), $(dir $(shell find $(libdir) | grep "\.h$$")))) $(dir $(foreach libdir, $(SDK_SOURCE_PATH), $(dir $(shell find $(BOLOS_SDK)/$(libdir) | grep "\.h$$")))) include $(BOLOS_SDK)/include $(BOLOS_SDK)/include/arm +SOURCE_PATH += $(dir $(foreach libdir, $(APP_SOURCE_PATH), $(dir $(shell find $(libdir) -name '*.c' -or -name '*.s')))) $(BOLOS_SDK)/src $(foreach libdir, $(SDK_SOURCE_PATH), $(dir $(shell find $(BOLOS_SDK)/$(libdir) -name '*.c' -or -name '*.s'))) +SOURCE_FILES := $(foreach path, $(SOURCE_PATH),$(shell find $(path) -name '*.c' -or -name '*.s') ) $(GLYPH_DESTC) +INCLUDES_PATH += $(dir $(foreach libdir, $(APP_SOURCE_PATH), $(dir $(shell find $(libdir) | grep "\.h$$")))) $(dir $(foreach libdir, $(SDK_SOURCE_PATH), $(dir $(shell find $(BOLOS_SDK)/$(libdir) | grep "\.h$$")))) include $(BOLOS_SDK)/include $(BOLOS_SDK)/include/arm VPATH := $(dir $(SOURCE_FILES)) OBJECT_FILES := $(sort $(addprefix obj/, $(addsuffix .o, $(basename $(notdir $(SOURCE_FILES)))))) diff --git a/src/gpg_ram.c b/src/gpg_ram.c index 24f0bfc..05d0c1c 100644 --- a/src/gpg_ram.c +++ b/src/gpg_ram.c @@ -35,8 +35,4 @@ extern unsigned char G_io_seproxyhal_spi_buffer[IO_SEPROXYHAL_BUFFER_SIZE_B]; int apdu_n; #endif -gpg_v_state_t G_gpg_vstate; - -#ifdef HAVE_RSA -union cx_u G_cx; -#endif // HAVE_RSA +gpg_v_state_t G_gpg_vstate; \ No newline at end of file