From 338dcccc8d8532a446fa60dc65092b5510c06e3a Mon Sep 17 00:00:00 2001 From: root Date: Sat, 9 Apr 2022 11:57:42 +0100 Subject: various improvements --- Makefile | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index b55dec5..99f1d77 100644 --- a/Makefile +++ b/Makefile @@ -3,12 +3,15 @@ PKG_CONFIG=pkg-config CURSES_CFLAGS=$(shell ${PKG_CONNFIG} --cflags ncursesw) CURSES_LIBS=$(shell ${PKG_CONFIG} --libs ncursesw) -#OPENWRT_BASE=/root/projects/openwrt/gl-inet-mt300n-v2/master-d20f4fc -#TOOLCHAIN=${OPENWRT_BASE}/staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl -#CC=${TOOLCHAIN}/bin/mipsel-openwrt-linux-musl-gcc -#STAGING_DIR=${OPENWRT_BASE}/staging_dir/target-mipsel_24kc_musl -#export STAGING_DIR -#CFLAGS=-I${STAGING_DIR}/include -I${TOOLS_DIR}/include +ifeq (${STAGING_DIR},) + OPENWRT_BASE=/root/projects/openwrt/gl-inet-mt300n-v2/master-d20f4fc + TOOLCHAIN=${OPENWRT_BASE}/staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl + CC=${TOOLCHAIN}/bin/mipsel-openwrt-linux-musl-gcc + STAGING_DIR:=${OPENWRT_BASE}/staging_dir/target-mipsel_24kc_musl + export STAGING_DIR + CFLAGS=-I${STAGING_DIR}/include -I${TOOLS_DIR}/include + LDFLAGS= +endif PROGS=net_rx net_arm serial_rx serial_arm serial_keypad net_keypad #test_email @@ -20,9 +23,9 @@ install: ${PROGS} mkdir -p ${DESTDIR}/${PREFIX}/bin for i in ${PROGS}; do install -m 755 $$i ${DESTDIR}/${PREFIX}/bin/$$i; done -net_rx:util.o sia.o net_rx.o rx.o email.o -net_arm:util.o sia.o net_arm.o arm.o -serial_rx:util.o sia.o serial_rx.o rx.o email.o +net_rx:util.o sia.o net_rx.o rx.o email.o mqtt.o +net_arm:util.o sia.o net_arm.o arm.o +serial_rx:util.o sia.o serial_rx.o rx.o email.o mqtt.o serial_arm:util.o sia.o serial_arm.o arm.o test_email:test_email.o email.o @@ -37,3 +40,8 @@ tidy: clean: /bin/rm -f *.o + +deploy: + rsync net_rx galaxy:/usr/bin/net_rx + ssh galaxy killall net_rx + ssh galaxy killall sleep -- cgit v1.2.3