/
Makefile
42 lines (35 loc) · 938 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
42
SRC_NAME = socat-1.7.3.3
SRC_URL = http://www.dest-unreach.org/socat/download/socat-1.7.3.3.tar.bz2
THISDIR = $(shell pwd)
all: download_test extract_test config_test
$(MAKE) -j$(HOST_NCPU) -C $(SRC_NAME)
download_test:
( if [ ! -f $(SRC_NAME).tar.bz2 ]; then \
wget -t5 --timeout=20 --no-check-certificate -O $(SRC_NAME).tar.gz $(SRC_URL); \
fi )
extract_test:
( if [ ! -d $(SRC_NAME) ]; then \
tar xf $(SRC_NAME).tar.bz2; \
fi )
config_test:
( if [ -f ./config_done ]; then \
echo "the same configuration"; \
else \
make configure && touch config_done; \
fi )
configure:
( cd $(SRC_NAME) ; \
./configure \
--prefix=/usr \
--disable-openssl \
--disable-readline \
--host=$(HOST_TARGET) \
--build=$(HOST_BUILD) ; \
)
clean:
if [ -f $(SRC_NAME)/Makefile ] ; then \
$(MAKE) -C $(SRC_NAME) distclean ; \
fi ; \
rm -f config_done
romfs:
$(ROMFSINST) -p +x $(THISDIR)/$(SRC_NAME)/socat /usr/bin/socat