blob: aa4c00f6bb04602dba7a06f4d732920b84cf23d4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
CFLAGS=-Wall ${CURSES_CFLAGS}
PKG_CONFIG=pkg-config
CURSES_CFLAGS=$(shell ${PKG_CONNFIG} --cflags ncursesw)
CURSES_LIBS=$(shell ${PKG_CONFIG} --libs ncursesw)
#export STAGING_DIR
#TOOLS_DIR=/root/projects/openwrt/tpl-wdr3600/trunk-50149/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.16
#STAGING_DIR=/root/projects/openwrt/tpl-wdr3600/trunk-50149/staging_dir/target-mips_34kc_musl-1.1.16/
#TOOLS_DIR=/root/projects/openwrt/tpl-wdr3600/trunk-47381/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_musl-1.1.11
#STAGING_DIR=/root/projects/openwrt/tpl-wdr3600/trunk-47381/staging_dir/target-mips_34kc_musl-1.1.11
#CC=${TOOLS_DIR}/bin/mips-openwrt-linux-gcc
CFLAGS=-I${STAGING_DIR}/include -I${TOOLS_DIR}/include
PROGS=net_rx net_arm serial_rx serial_arm serial_keypad net_keypad
PREFIX=/usr/local
all: ${PROGS}
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
net_arm:util.o sia.o net_arm.o arm.o
serial_rx:util.o sia.o serial_rx.o rx.o
serial_arm:util.o sia.o serial_arm.o arm.o
serial_keypad:util.o keypad.o serial_keypad.o
${CC} ${CFLAGS} ${LDFLAGS} -o $@ $^ ${CURSES_LIBS} ${LIBS}
net_keypad:util.o keypad.o net_keypad.o
${CC} ${CFLAGS} ${LDFLAGS} -o $@ $^ ${CURSES_LIBS} ${LIBS}
tidy:
astyle -A3 -s2 --attach-extern-c -L -c -w -Y -m0 -f -p -H -U -k3 -xj -xd sia.c sia.h util.c util.h serial_rx.c net_rx.c serial_arm.c net_arm.c arm.c keypad.c net_keypad.c serial_keypad.c rx.c
clean:
/bin/rm -f *.o
|