lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | #include ../net_team.mk |
| 2 | include $(COMMON_BASE_MK) |
| 3 | CFLAGS := |
| 4 | |
| 5 | TMPOBJS += $(patsubst %,./src/%.o,$(foreach T,acountry adig ahost,$(T)-$(T) $(T)-ares_getopt $(T)-ares_nowarn $(T)-ares_strcasecmp)) |
| 6 | TMPMOBJS = $(patsubst ./src/%.c,%.o,$(filter-out $(foreach T,acountry adig ahost ares_getopt ares_nowarn ares_strcasecmp,./src/$(T).c),$(wildcard ./src/*.c))) |
| 7 | MOBJS = $(patsubst %.o,./src/libcares_la-%.o,$(TMPMOBJS)) |
| 8 | #$(error ====>$(TMPMOBJS)) |
| 9 | all: 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 | |
| 17 | src/Makefile: |
| 18 | #cd ./src && ./configure --prefix=$(PWD) --host=arm-linux $(CONFIGURE_OPTS) $(CONFOPTS) |
| 19 | cd ./src && ./configure --prefix=$(PWD) --host=arm-linux |
| 20 | |
| 21 | clean: |
| 22 | if [ -f src/Makefile ]; then \ |
| 23 | cd ./src && $(MAKE) clean; \ |
| 24 | fi; |
| 25 | rm -fr src/Makefile |
| 26 | |
| 27 | romfs: |
| 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 |