add .gitognores for kconfig and lxdialog
[buildroot.git] / package / netcat / netcat.mk
blob37e66ce645cf6aa50d0bcd50dc8b74ff7d521ab3
1 #############################################################
3 # netcat
5 #############################################################
7 NETCAT_VERSION=0.7.1
8 NETCAT_SOURCE=netcat-$(NETCAT_VERSION).tar.gz
9 NETCAT_CAT:=$(ZCAT)
10 NETCAT_SITE=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/netcat
11 NETCAT_DIR:=$(BUILD_DIR)/netcat-$(NETCAT_VERSION)
12 NETCAT_BINARY:=src/netcat
13 NETCAT_TARGET_BINARY:=sbin/netcat
15 $(DL_DIR)/$(NETCAT_SOURCE):
16 $(WGET) -P $(DL_DIR) $(NETCAT_SITE)/$(NETCAT_SOURCE)
18 netcat-source: $(DL_DIR)/$(NETCAT_SOURCE)
20 $(NETCAT_DIR)/.unpacked: $(DL_DIR)/$(NETCAT_SOURCE)
21 $(NETCAT_CAT) $(DL_DIR)/$(NETCAT_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
22 touch $@
24 $(NETCAT_DIR)/.configured: $(NETCAT_DIR)/.unpacked
25 (cd $(NETCAT_DIR); rm -rf config.cache; \
26 $(TARGET_CONFIGURE_OPTS) \
27 $(TARGET_CONFIGURE_ARGS) \
28 ./configure \
29 --target=$(GNU_TARGET_NAME) \
30 --host=$(GNU_TARGET_NAME) \
31 --build=$(GNU_HOST_NAME) \
32 --prefix=/ \
34 touch $@
37 $(NETCAT_DIR)/$(NETCAT_BINARY): $(NETCAT_DIR)/.configured
38 $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(NETCAT_DIR)
40 $(TARGET_DIR)/$(NETCAT_TARGET_BINARY): $(NETCAT_DIR)/$(NETCAT_BINARY)
41 install -D $(NETCAT_DIR)/$(NETCAT_BINARY) $(TARGET_DIR)/$(NETCAT_TARGET_BINARY)
42 $(STRIPCMD) $(STRIP_STRIP_ALL) $@
44 netcat: uclibc $(TARGET_DIR)/$(NETCAT_TARGET_BINARY)
46 netcat-clean:
47 rm -f $(TARGET_DIR)/$(NETCAT_TARGET_BINARY)
48 -$(MAKE) -C $(NETCAT_DIR) clean
49 netcat-dirclean:
50 rm -rf $(NETCAT_DIR)
51 #############################################################
53 # Toplevel Makefile options
55 #############################################################
56 ifeq ($(strip $(BR2_PACKAGE_NETCAT)),y)
57 TARGETS+=netcat
58 endif