diff --git a/Makefile b/Makefile index 68145e0..00e6c20 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,19 @@ all: clean done \ done +android: clean + @mkdir -p "$(TGT)"; \ + for dir in $(DIRS); do \ + find "$$dir" -type f \( -name "*.c" -o -name "*.h" -o -name "*akefile" \) -exec chmod -x {} \; ; \ + $(MAKE) -C "$$dir" android || exit; \ + for exe in "$$dir/"*; do \ + if [ -f "$$exe" ] && [ -x "$$exe" ]; then \ + mv -f "$$exe" "${TGT}" ; \ + ln -fs "../${TGT}/$$(basename "$$exe")" "$$exe" ; \ + fi \ + done \ + done + bsd: clean @mkdir -p "$(TGT)"; \ for dir in $(DIRS); do \ diff --git a/ip2net/Makefile b/ip2net/Makefile index dedffbe..b144893 100644 --- a/ip2net/Makefile +++ b/ip2net/Makefile @@ -11,6 +11,8 @@ all: ip2net ip2net: $(SRC_FILES) $(CC) -s $(CFLAGS) -o ip2net $(SRC_FILES) $(LDFLAGS) $(LIBS) +android: ip2net + bsd: $(SRC_FILES) $(CC) -s $(CFLAGS) $(CFLAGS_BSD) -o ip2net $(SRC_FILES) $(LDFLAGS) $(LIBS) diff --git a/mdig/Makefile b/mdig/Makefile index 972195d..ae2137a 100644 --- a/mdig/Makefile +++ b/mdig/Makefile @@ -3,6 +3,7 @@ CFLAGS += -std=gnu99 -Os CFLAGS_BSD = -Wno-address-of-packed-member CFLAGS_WIN = -static LIBS = -lpthread +LIBS_ANDROID = LIBS_WIN = -lws2_32 SRC_FILES = *.c @@ -11,6 +12,9 @@ all: mdig mdig: $(SRC_FILES) $(CC) -s $(CFLAGS) -o mdig $(SRC_FILES) $(LDFLAGS) $(LIBS) +android: $(SRC_FILES) + $(CC) -s $(CFLAGS) -o mdig $(SRC_FILES) $(LDFLAGS) $(LIBS_ANDROID) + bsd: $(SRC_FILES) $(CC) -s $(CFLAGS) $(CFLAGS_BSD) -o mdig $(SRC_FILES) $(LDFLAGS) $(LIBS) diff --git a/nfq/Makefile b/nfq/Makefile index 3bdfd25..92adf99 100644 --- a/nfq/Makefile +++ b/nfq/Makefile @@ -17,6 +17,8 @@ all: nfqws nfqws: $(SRC_FILES) $(CC) -s $(CFLAGS) -o nfqws $(SRC_FILES) $(LDFLAGS) $(LIBS_LINUX) +android: nfqws + bsd: $(SRC_FILES) $(CC) -s $(CFLAGS) $(CFLAGS_BSD) -o dvtws $(SRC_FILES) $(LDFLAGS) $(LIBS_BSD)