blob: 5995e614ef40e20363c2edc16b973f6fe1a574a4 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001#include ../net_team.mk
2include $(COMMON_BASE_MK)
3CFLAGS :=
4
5TMPOBJS += $(patsubst %,./src/%.o,$(foreach T,acountry adig ahost,$(T)-$(T) $(T)-ares_getopt $(T)-ares_nowarn $(T)-ares_strcasecmp))
6TMPMOBJS = $(patsubst ./src/%.c,%.o,$(filter-out $(foreach T,acountry adig ahost ares_getopt ares_nowarn ares_strcasecmp,./src/$(T).c),$(wildcard ./src/*.c)))
7MOBJS = $(patsubst %.o,./src/libcares_la-%.o,$(TMPMOBJS))
8#$(error ====>$(TMPMOBJS))
9all: src/Makefile
10 echo "+++++++cares+++++++++"
11 rm -fv ./src/adig-adig.o ./src/acountry-acountry.o ./src/ahost-ahost.o
12 $(MAKE) -C src
13 $(STRIPTOOL) --strip-symbol=main ./src/adig-adig.o ./src/acountry-acountry.o ./src/ahost-ahost.o
14 $(AR) crv libc-ares.a $(MOBJS) $(TMPOBJS)
15 #$(MAKE) -C src install
16
17src/Makefile:
18 #cd ./src && ./configure --prefix=$(PWD) --host=arm-linux $(CONFIGURE_OPTS) $(CONFOPTS)
19 cd ./src && ./configure --prefix=$(PWD) --host=arm-linux
20
21clean:
22 if [ -f src/Makefile ]; then \
23 cd ./src && $(MAKE) clean; \
24 fi;
25 rm -fr src/Makefile
26
27romfs:
28 #$(ROMFSINST) src/.libs/ahost /sbin/ahost
29 #$(ROMFSINST) src/.libs/adig /sbin/adig
30 cp -v src/ahost $(APP_DIR)/test_tools/
31 cp -v src/adig $(APP_DIR)/test_tools/
32 $(ROMFSINST) src/.libs/libcares.so.2 /lib/libcares.so.2