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 | |
Greg Hartman | 257abd3 | 2017-12-20 22:16:24 -0800 | [diff] [blame] | 5 | .PHONY: hosttar |
| 6 | hosttar: $(cvd_host_package_tar) |
| 7 | |
| 8 | .PHONY: cf_local_image |
| 9 | cf_local_image: bootimage cacheimage hosttar systemimage userdataimage vendorimage |
| 10 | |
Ping-Hao Wu | 9e231ee | 2017-11-09 20:29:34 -0800 | [diff] [blame] | 11 | ifeq ($(HOST_OS),linux) |
| 12 | CVD_TAR_FORMAT := --format=gnu |
| 13 | endif |
| 14 | |
| 15 | # Build and store them on the build server. |
| 16 | $(call dist-for-goals, dist_files, $(cvd_host_package_tar)) |
| 17 | |
| 18 | bin_path := $(notdir $(HOST_OUT_EXECUTABLES)) |
| 19 | lib_path := $(notdir $(HOST_OUT_SHARED_LIBRARIES)) |
| 20 | tests_path := $(notdir $(HOST_OUT_NATIVE_TESTS)) |
| 21 | |
| 22 | cvd_host_executables := \ |
Greg Hartman | 6e78bf5 | 2017-11-11 12:03:39 -0800 | [diff] [blame] | 23 | launch_cvd \ |
Ryan Haining | b2cfce2 | 2018-02-05 08:58:19 -0800 | [diff] [blame] | 24 | socket_forward_proxy \ |
Tomasz Wiszkowski | 0c8259e | 2017-12-06 09:47:02 -0800 | [diff] [blame] | 25 | wificlient \ |
Jorge E. Moreira | 20a6b1a | 2018-01-25 17:15:26 -0800 | [diff] [blame] | 26 | vnc_server \ |
Ping-Hao Wu | 9e231ee | 2017-11-09 20:29:34 -0800 | [diff] [blame] | 27 | |
| 28 | cvd_host_tests := \ |
| 29 | auto_free_buffer_test \ |
| 30 | circqueue_test \ |
| 31 | cuttlefish_thread_test \ |
| 32 | hald_client_test \ |
| 33 | lock_test \ |
| 34 | monotonic_time_test \ |
| 35 | vsoc_graphics_test \ |
| 36 | |
| 37 | cvd_host_shared_libraries := \ |
Tomasz Wiszkowski | 0c8259e | 2017-12-06 09:47:02 -0800 | [diff] [blame] | 38 | libbase \ |
| 39 | vsoc_lib \ |
| 40 | libcuttlefish_fs \ |
| 41 | cuttlefish_auto_resources \ |
| 42 | liblog \ |
| 43 | libnl \ |
Ping-Hao Wu | 9e231ee | 2017-11-09 20:29:34 -0800 | [diff] [blame] | 44 | libc++ \ |
| 45 | libicuuc-host \ |
| 46 | |
| 47 | cvd_host_configs := \ |
Greg Hartman | af49e9b | 2018-02-02 16:40:53 -0800 | [diff] [blame] | 48 | vsoc_mem.json \ |
| 49 | cuttlefish.dtb |
Ping-Hao Wu | 9e231ee | 2017-11-09 20:29:34 -0800 | [diff] [blame] | 50 | |
| 51 | cvd_host_packages := \ |
| 52 | vsoc_mem_json \ |
Greg Hartman | af49e9b | 2018-02-02 16:40:53 -0800 | [diff] [blame] | 53 | cuttlefish_dtb \ |
Ping-Hao Wu | 9e231ee | 2017-11-09 20:29:34 -0800 | [diff] [blame] | 54 | $(cvd_host_executables) \ |
| 55 | $(cvd_host_tests) \ |
| 56 | |
| 57 | cvd_host_package_files := \ |
| 58 | $(addprefix config/,$(cvd_host_configs)) \ |
| 59 | $(addprefix $(bin_path)/,$(cvd_host_executables)) \ |
| 60 | $(addprefix $(lib_path)/,$(addsuffix .so,$(cvd_host_shared_libraries))) \ |
| 61 | $(foreach test,$(cvd_host_tests), ${tests_path}/$(test)/$(test)) \ |
| 62 | |
| 63 | $(cvd_host_package_tar): $(cvd_host_packages) |
| 64 | $(hide) rm -rf $@ && tar Scfz $@.tmp -C $(HOST_OUT) $(CVD_TAR_FORMAT) $(cvd_host_package_files) |
| 65 | $(hide) mv $@.tmp $@ |