forked from TurBoTse/padavan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (32 loc) · 998 Bytes
/
Makefile
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
SRC_NAME=ttyd-1.7.7
SRC_URL=https://github.com/tsl0922/ttyd/archive/1.7.7.tar.gz
THISDIR = $(shell pwd)
CFLAGS += -fno-unwind-tables -fno-asynchronous-unwind-tables
all: download_test extract_test config_test
$(MAKE) -j$(HOST_NCPU) -C $(SRC_NAME)/build
download_test:
( if [ ! -f $(THISDIR)/$(SRC_NAME).tar.gz ]; then \
wget -t5 --timeout=20 --no-check-certificate -O $(SRC_NAME).tar.gz $(SRC_URL); \
fi )
extract_test:
( if [ ! -d $(THISDIR)/$(SRC_NAME) ]; then \
tar zxf $(SRC_NAME).tar.gz; \
fi )
config_test:
( if [ -f ./config_done ]; then \
echo "the same configuration"; \
else \
make configure && touch config_done; \
fi )
configure:
( mkdir -p $(SRC_NAME)/build && cd $(SRC_NAME)/build ; \
cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE=$(CONFIG_CMAKE_TOOLCHAIN_FILE) \
.. \
)
clean:
rm -rf $(SRC_NAME)/build
rm -f config_done
romfs:
$(ROMFSINST) $(THISDIR)/$(SRC_NAME)/build/ttyd /usr/bin/ttyd
$(ROMFSINST) $(THISDIR)/ttyd.sh /usr/bin/ttyd.sh