Ping-Hao Wu | 9e231ee | 2017-11-09 20:29:34 -0800 | [diff] [blame] | 1 | LOCAL_PATH := $(call my-dir) |
| 2 | |
| 3 | cvd_host_package_tar := $(HOST_OUT)/cvd-host_package.tar.gz |
| 4 | |
| 5 | ifeq ($(HOST_OS),linux) |
| 6 | CVD_TAR_FORMAT := --format=gnu |
| 7 | endif |
| 8 | |
| 9 | # Build and store them on the build server. |
| 10 | $(call dist-for-goals, dist_files, $(cvd_host_package_tar)) |
| 11 | |
| 12 | bin_path := $(notdir $(HOST_OUT_EXECUTABLES)) |
| 13 | lib_path := $(notdir $(HOST_OUT_SHARED_LIBRARIES)) |
| 14 | tests_path := $(notdir $(HOST_OUT_NATIVE_TESTS)) |
| 15 | |
| 16 | cvd_host_executables := \ |
Greg Hartman | 6e78bf5 | 2017-11-11 12:03:39 -0800 | [diff] [blame^] | 17 | launch_cvd \ |
Ping-Hao Wu | 9e231ee | 2017-11-09 20:29:34 -0800 | [diff] [blame] | 18 | |
| 19 | cvd_host_tests := \ |
| 20 | auto_free_buffer_test \ |
| 21 | circqueue_test \ |
| 22 | cuttlefish_thread_test \ |
| 23 | hald_client_test \ |
| 24 | lock_test \ |
| 25 | monotonic_time_test \ |
| 26 | vsoc_graphics_test \ |
| 27 | |
| 28 | cvd_host_shared_libraries := \ |
| 29 | libc++ \ |
| 30 | libicuuc-host \ |
| 31 | |
| 32 | cvd_host_configs := \ |
| 33 | vsoc_mem.json |
| 34 | |
| 35 | cvd_host_packages := \ |
| 36 | vsoc_mem_json \ |
| 37 | $(cvd_host_executables) \ |
| 38 | $(cvd_host_tests) \ |
| 39 | |
| 40 | cvd_host_package_files := \ |
| 41 | $(addprefix config/,$(cvd_host_configs)) \ |
| 42 | $(addprefix $(bin_path)/,$(cvd_host_executables)) \ |
| 43 | $(addprefix $(lib_path)/,$(addsuffix .so,$(cvd_host_shared_libraries))) \ |
| 44 | $(foreach test,$(cvd_host_tests), ${tests_path}/$(test)/$(test)) \ |
| 45 | |
| 46 | $(cvd_host_package_tar): $(cvd_host_packages) |
| 47 | $(hide) rm -rf $@ && tar Scfz $@.tmp -C $(HOST_OUT) $(CVD_TAR_FORMAT) $(cvd_host_package_files) |
| 48 | $(hide) mv $@.tmp $@ |