From 802a6f374f7569598dea55b3992818b65985f8b6 Mon Sep 17 00:00:00 2001 From: Paul Selkirk Date: Wed, 18 May 2016 11:08:33 +0200 Subject: build libcli --- .gitmodules | 3 +++ Makefile | 7 +++++++ libraries/libcli | 1 + projects/cli-test/Makefile | 6 ------ 4 files changed, 11 insertions(+), 6 deletions(-) create mode 160000 libraries/libcli diff --git a/.gitmodules b/.gitmodules index 4bcc9e1..d3946e7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [submodule "thirdparty/libtfm"] path = libraries/thirdparty/libtfm url = git@git.cryptech.is:sw/thirdparty/libtfm.git +[submodule "libraries/libcli"] + path = libraries/libcli + url = git@git.cryptech.is:user/ft/libcli diff --git a/Makefile b/Makefile index 43cc10b..d2fc5ef 100644 --- a/Makefile +++ b/Makefile @@ -41,6 +41,7 @@ BOARD_DIR = $(CMSIS_DIR)/$(BOARD) RTOS_DIR = $(MBED_DIR)/rtos export LIBTFM_DIR = $(LIBS_DIR)/thirdparty/libtfm export LIBHAL_DIR = $(LIBS_DIR)/libhal +export LIBCLI_DIR = $(LIBS_DIR)/libcli export LIBS = $(MBED_DIR)/libstmf4.a $(RTOS_DIR)/librtos.a @@ -119,12 +120,18 @@ $(LIBHAL_DIR)/libhal.a: $(LIBTFM_DIR)/libtfm.a # $(MAKE) -C $(LIBHAL_DIR) RPC_CLIENT=local IO_BUS=fmc KS=volatile libhal.a $(MAKE) -C $(LIBHAL_DIR) IO_BUS=fmc RPC_SERVER=yes RPC_TRANSPORT=serial KS=volatile libhal.a +$(LIBCLI_DIR)/libcli.a: + $(MAKE) -C $(LIBCLI_DIR) + libhal-test: $(BOARD_OBJS) $(LIBS) $(LIBHAL_DIR)/libhal.a $(MAKE) -C projects/libhal-test hsm: $(BOARD_OBJS) $(LIBS) $(LIBHAL_DIR)/libhal.a $(MAKE) -C projects/hsm +cli-test: $(BOARD_OBJS) $(LIBS) $(LIBCLI_DIR)/libcli.a + $(MAKE) -C projects/cli-test + # don't automatically delete objects, to avoid a lot of unnecessary rebuilding .SECONDARY: $(BOARD_OBJS) diff --git a/libraries/libcli b/libraries/libcli new file mode 160000 index 0000000..1a5727c --- /dev/null +++ b/libraries/libcli @@ -0,0 +1 @@ +Subproject commit 1a5727c568e36b927ef2088b2b02bae4c84933f3 diff --git a/projects/cli-test/Makefile b/projects/cli-test/Makefile index d0fce70..8fde727 100644 --- a/projects/cli-test/Makefile +++ b/projects/cli-test/Makefile @@ -2,8 +2,6 @@ TEST = cli-test OBJS = crc32.o -LIBCLI_DIR=/home/ft/work/others/libcli.arm - CFLAGS += -I$(LIBCLI_DIR) LIBS += $(LIBCLI_DIR)/libcli.a @@ -11,15 +9,11 @@ all: $(TEST:=.elf) %.elf: %.o $(BOARD_OBJS) $(OBJS) $(LIBS) $(CC) $(CFLAGS) $^ -o $@ -T$(LDSCRIPT) -g -Wl,-Map=$*.map - $(OBJCOPY) -O ihex $*.elf $*.hex $(OBJCOPY) -O binary $*.elf $*.bin - $(OBJDUMP) -St $*.elf >$*.lst $(SIZE) $*.elf clean: rm -f *.o rm -f *.elf - rm -f *.hex rm -f *.bin rm -f *.map - rm -f *.lst -- cgit v1.2.3