Skip to content

Commit

Permalink
Reduce changes needed for cross-compile build
Browse files Browse the repository at this point in the history
Signed-off-by: Saikrishna Arcot <[email protected]>
  • Loading branch information
saiarcot895 committed Aug 18, 2022
1 parent da5dfb6 commit 1206ca7
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions CLI/klish/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,18 @@ SHELL = /bin/bash
.SHELLFLAGS += -e

KLISH_VERSION = 2.1.4
PYTHONVER=3.7

KLISH_SRC = $(SONIC_CLI_ROOT)/klish-$(KLISH_VERSION)

ifeq ($(CROSS_BUILD_ENVIRON),y)
CROSS_CONFIGURE_OPTS = --host=$(CROSS_HOST_TYPE)
LIB_PATH = $(CROSS_PKGS_LIB_PATH)
else
LIB_PATH = /usr/lib/x86_64-linux-gnu
endif

SRC_REPLACEMENTS:=$(shell find patches -type f)
all : $(SRC_REPLACEMENTS)
tar xzvf klish-$(KLISH_VERSION).tgz -C $(SONIC_CLI_ROOT)
cd ${KLISH_SRC} && QUILT_PATCHES=${CURDIR}/patches quilt push -a

cd ${KLISH_SRC} && sh autogen.sh && ./configure --with-libxml2=/usr $(CROSS_CONFIGURE_OPTS) --enable-debug=no && make
ifeq ($(CROSS_BUILD_ENVIRON),y)
export PATH=/python_virtualenv/env3/bin/:${PATH}
endif
cd ${KLISH_SRC} && sh autogen.sh && ./configure --with-libxml2 --host=$(DEB_HOST_GNU_TYPE) --enable-debug=no CJSON_CFLAGS=-I/usr/include/cjson CJSON_LIBS=-lcjson && make

mkdir -p $(SONIC_CLI_ROOT)/target/.libs
cp $(CURDIR)/clish_start $(SONIC_CLI_ROOT)/target/.
Expand Down

0 comments on commit 1206ca7

Please sign in to comment.