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 \ |
Jorge E. Moreira | 20a6b1a | 2018-01-25 17:15:26 -0800 | [diff] [blame] | 25 | vnc_server \ |
Andreas Huber | bd40658 | 2018-02-23 11:28:28 -0800 | [diff] [blame] | 26 | wifi_relay \ |
Andreas Huber | 5a6d7b7 | 2018-03-09 10:32:42 -0800 | [diff] [blame] | 27 | record_audio \ |
Ping-Hao Wu | 9e231ee | 2017-11-09 20:29:34 -0800 | [diff] [blame] | 28 | |
| 29 | cvd_host_tests := \ |
| 30 | auto_free_buffer_test \ |
| 31 | circqueue_test \ |
| 32 | cuttlefish_thread_test \ |
| 33 | hald_client_test \ |
| 34 | lock_test \ |
| 35 | monotonic_time_test \ |
| 36 | vsoc_graphics_test \ |
| 37 | |
| 38 | cvd_host_shared_libraries := \ |
Tomasz Wiszkowski | 0c8259e | 2017-12-06 09:47:02 -0800 | [diff] [blame] | 39 | libbase \ |
| 40 | vsoc_lib \ |
| 41 | libcuttlefish_fs \ |
| 42 | cuttlefish_auto_resources \ |
Greg Hartman | de0df45 | 2018-04-09 17:37:11 -0700 | [diff] [blame] | 43 | libcuttlefish_strings \ |
Jorge E. Moreira | cf8d988 | 2018-02-23 14:43:03 -0800 | [diff] [blame] | 44 | cuttlefish_tcp_socket \ |
Tomasz Wiszkowski | 0c8259e | 2017-12-06 09:47:02 -0800 | [diff] [blame] | 45 | liblog \ |
| 46 | libnl \ |
Ping-Hao Wu | 9e231ee | 2017-11-09 20:29:34 -0800 | [diff] [blame] | 47 | libc++ \ |
| 48 | libicuuc-host \ |
| 49 | |
| 50 | cvd_host_configs := \ |
Greg Hartman | af49e9b | 2018-02-02 16:40:53 -0800 | [diff] [blame] | 51 | vsoc_mem.json \ |
| 52 | cuttlefish.dtb |
Ping-Hao Wu | 9e231ee | 2017-11-09 20:29:34 -0800 | [diff] [blame] | 53 | |
| 54 | cvd_host_packages := \ |
| 55 | vsoc_mem_json \ |
Greg Hartman | af49e9b | 2018-02-02 16:40:53 -0800 | [diff] [blame] | 56 | cuttlefish_dtb \ |
Ping-Hao Wu | 9e231ee | 2017-11-09 20:29:34 -0800 | [diff] [blame] | 57 | $(cvd_host_executables) \ |
| 58 | $(cvd_host_tests) \ |
| 59 | |
| 60 | cvd_host_package_files := \ |
| 61 | $(addprefix config/,$(cvd_host_configs)) \ |
| 62 | $(addprefix $(bin_path)/,$(cvd_host_executables)) \ |
| 63 | $(addprefix $(lib_path)/,$(addsuffix .so,$(cvd_host_shared_libraries))) \ |
| 64 | $(foreach test,$(cvd_host_tests), ${tests_path}/$(test)/$(test)) \ |
| 65 | |
| 66 | $(cvd_host_package_tar): $(cvd_host_packages) |
| 67 | $(hide) rm -rf $@ && tar Scfz $@.tmp -C $(HOST_OUT) $(CVD_TAR_FORMAT) $(cvd_host_package_files) |
| 68 | $(hide) mv $@.tmp $@ |