summaryrefslogtreecommitdiffstats
path: root/make/ttcp.mk
blob: 519f7bc4b557a105eeaf0ff63b4d41b5458d9151 (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
#############################################################
#
# ttcp
#
#############################################################
#
TTCP_SOURCE_URL=http://ftp.sunet.se/ftp/pub/network/monitoring/ttcp
TTCP_SOURCE=ttcp.c
TTCP_BUILD_DIR=$(BUILD_DIR)/ttcp

$(DL_DIR)/$(TTCP_SOURCE):
	 $(WGET) -P $(DL_DIR) $(TTCP_SOURCE_URL)/$(TTCP_SOURCE) 

$(TTCP_BUILD_DIR)/.unpacked: $(DL_DIR)/$(TTCP_SOURCE)
	-mkdir $(TTCP_BUILD_DIR)
	cp -af $(DL_DIR)/$(TTCP_SOURCE) $(TTCP_BUILD_DIR)
	touch $(TTCP_BUILD_DIR)/.unpacked

$(TTCP_BUILD_DIR)/.configured: $(TTCP_BUILD_DIR)/.unpacked
	touch  $(TTCP_BUILD_DIR)/.configured

$(TTCP_BUILD_DIR)/ttcp: $(TTCP_BUILD_DIR)/.configured
	$(TARGET_CC) -O2 -o $(TTCP_BUILD_DIR)/ttcp $(TTCP_BUILD_DIR)/$(TTCP_SOURCE) 

$(TARGET_DIR)/usr/bin/ttcp: $(TTCP_BUILD_DIR)/ttcp
	cp -af $(TTCP_BUILD_DIR)/ttcp $(TARGET_DIR)/usr/bin/

ttcp: $(TARGET_DIR)/usr/bin/ttcp 

ttcp-clean:
	rm -f $(TTCP_BUILD_DIR)/*.o $(TTCP_BUILD_DIR)/ttcp	

ttcp-dirclean:
	rm -rf $(TTCP_BUILD_DIR)