blob: 5995e614ef40e20363c2edc16b973f6fe1a574a4 [file] [log] [blame]
#include ../net_team.mk
include $(COMMON_BASE_MK)
CFLAGS :=
TMPOBJS += $(patsubst %,./src/%.o,$(foreach T,acountry adig ahost,$(T)-$(T) $(T)-ares_getopt $(T)-ares_nowarn $(T)-ares_strcasecmp))
TMPMOBJS = $(patsubst ./src/%.c,%.o,$(filter-out $(foreach T,acountry adig ahost ares_getopt ares_nowarn ares_strcasecmp,./src/$(T).c),$(wildcard ./src/*.c)))
MOBJS = $(patsubst %.o,./src/libcares_la-%.o,$(TMPMOBJS))
#$(error ====>$(TMPMOBJS))
all: src/Makefile
echo "+++++++cares+++++++++"
rm -fv ./src/adig-adig.o ./src/acountry-acountry.o ./src/ahost-ahost.o
$(MAKE) -C src
$(STRIPTOOL) --strip-symbol=main ./src/adig-adig.o ./src/acountry-acountry.o ./src/ahost-ahost.o
$(AR) crv libc-ares.a $(MOBJS) $(TMPOBJS)
#$(MAKE) -C src install
src/Makefile:
#cd ./src && ./configure --prefix=$(PWD) --host=arm-linux $(CONFIGURE_OPTS) $(CONFOPTS)
cd ./src && ./configure --prefix=$(PWD) --host=arm-linux
clean:
if [ -f src/Makefile ]; then \
cd ./src && $(MAKE) clean; \
fi;
rm -fr src/Makefile
romfs:
#$(ROMFSINST) src/.libs/ahost /sbin/ahost
#$(ROMFSINST) src/.libs/adig /sbin/adig
cp -v src/ahost $(APP_DIR)/test_tools/
cp -v src/adig $(APP_DIR)/test_tools/
$(ROMFSINST) src/.libs/libcares.so.2 /lib/libcares.so.2