其中的 Makefile 特別寫成一個 source , 一個 executable。
readme 有說明 build 的方法:
cd system/extras/tests/bionic/libc mm BIONIC_TESTS=1特別寫的 script 是:
define device-test $(foreach file,$(1), \ $(eval include $(CLEAR_VARS)) \ $(eval LOCAL_SRC_FILES := $(file)) \ $(eval LOCAL_MODULE := $(notdir $(file:%.c=%))) \ $(eval LOCAL_MODULE := $(LOCAL_MODULE:%.cpp=%)) \ $(eval LOCAL_CFLAGS += $(EXTRA_CFLAGS)) \ $(eval LOCAL_MODULE_TAGS := tests) \ $(eval include $(BUILD_EXECUTABLE)) \ ) \ $(eval EXTRA_CFLAGS :=) endef使用的 command:
sources := \ common/test_getaddrinfo.c \ common/test_gethostbyname.c \ common/test_gethostname.c \ common/test_pthread_cleanup_push.c \ common/test_pthread_getcpuclockid.c \ common/test_pthread_join.c \ common/test_pthread_mutex.c \ common/test_pthread_once.c \ common/test_semaphore.c \ common/test_seteuid.c \ common/test_static_cpp_mutex.cpp \ common/test_strftime_2039.c \ common/test_tm_zone.c \ common/test_udp.c \ EXTRA_LDLIBS := -lpthread -lrt EXTRA_CFLAGS := -D_XOPEN_SOURCE=600 -DHOST $(call device-test, $(sources))
沒有留言:
張貼留言