-
Notifications
You must be signed in to change notification settings - Fork 5
/
netcat.mak
33 lines (29 loc) · 946 Bytes
/
netcat.mak
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
NAME := netcat
NETCAT_VERSION := 0.7.1
NETCAT_URL := https://downloads.sourceforge.net/project/netcat/netcat/$(NETCAT_VERSION)/netcat-$(NETCAT_VERSION).tar.gz
NETCAT_PROGRAMS := netcat
NETCAT_LIBRARIES :=
NETCAT_CONFIG =
$(eval $(call create_recipes, \
$(NAME), \
$(NETCAT_VERSION), \
$(NETCAT_URL), \
$(NETCAT_PROGRAMS), \
$(NETCAT_LIBRARIES), \
))
# NOTE: this is the "original" netcat, not the BSD version.
# The bundled configure script is so out of date that it's
# never heard of musl and thinks it's invalid.
# Because of this, forcing autoreconf to run is mandatory.
$(BUILD_FLAG):
$(eval $(call activate_toolchain,$@))
cd "$(SRC)" && autoreconf -if
cd "$(SRC)" && ./configure \
$(CONFIGURE_DEFAULTS) \
$(NETCAT_CONFIG) \
CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
$(MAKE) -C "$(SRC)" clean
$(MAKE) -C "$(SRC)"
$(MAKE) -C "$(SRC)" install-exec
ALL_PROGRAMS += $(NETCAT_PROGRAMS)
DEFAULT_PROGRAMS += $(NETCAT_PROGRAMS)