blob: 257bffcbf5938bc86f2ec0f9e7b45c4c08304783 [file] [log] [blame]
Ping-Hao Wu9e231ee2017-11-09 20:29:34 -08001LOCAL_PATH := $(call my-dir)
2
3cvd_host_package_tar := $(HOST_OUT)/cvd-host_package.tar.gz
4
Greg Hartman257abd32017-12-20 22:16:24 -08005.PHONY: hosttar
6hosttar: $(cvd_host_package_tar)
7
8.PHONY: cf_local_image
9cf_local_image: bootimage cacheimage hosttar systemimage userdataimage vendorimage
10
Ping-Hao Wu9e231ee2017-11-09 20:29:34 -080011ifeq ($(HOST_OS),linux)
12CVD_TAR_FORMAT := --format=gnu
13endif
14
15# Build and store them on the build server.
16$(call dist-for-goals, dist_files, $(cvd_host_package_tar))
17
18bin_path := $(notdir $(HOST_OUT_EXECUTABLES))
19lib_path := $(notdir $(HOST_OUT_SHARED_LIBRARIES))
20tests_path := $(notdir $(HOST_OUT_NATIVE_TESTS))
21
22cvd_host_executables := \
Greg Hartman004fb182018-05-02 18:48:53 -070023 host_region_e2e_test \
Greg Hartman6e78bf52017-11-11 12:03:39 -080024 launch_cvd \
Ryan Hainingb2cfce22018-02-05 08:58:19 -080025 socket_forward_proxy \
Jorge E. Moreira0aa61402018-04-25 18:18:43 -070026 stop_cvd \
Jorge E. Moreira20a6b1a2018-01-25 17:15:26 -080027 vnc_server \
Andreas Huberbd406582018-02-23 11:28:28 -080028 wifi_relay \
Andreas Huber5a6d7b72018-03-09 10:32:42 -080029 record_audio \
Ping-Hao Wu9e231ee2017-11-09 20:29:34 -080030
31cvd_host_tests := \
32 auto_free_buffer_test \
33 circqueue_test \
34 cuttlefish_thread_test \
35 hald_client_test \
36 lock_test \
37 monotonic_time_test \
38 vsoc_graphics_test \
39
40cvd_host_shared_libraries := \
Tomasz Wiszkowski0c8259e2017-12-06 09:47:02 -080041 libbase \
42 vsoc_lib \
43 libcuttlefish_fs \
44 cuttlefish_auto_resources \
Greg Hartmande0df452018-04-09 17:37:11 -070045 libcuttlefish_strings \
Jorge E. Moreiracf8d9882018-02-23 14:43:03 -080046 cuttlefish_tcp_socket \
Tomasz Wiszkowski0c8259e2017-12-06 09:47:02 -080047 liblog \
48 libnl \
Ping-Hao Wu9e231ee2017-11-09 20:29:34 -080049 libc++ \
50 libicuuc-host \
51
52cvd_host_configs := \
Greg Hartmanaf49e9b2018-02-02 16:40:53 -080053 cuttlefish.dtb
Ping-Hao Wu9e231ee2017-11-09 20:29:34 -080054
55cvd_host_packages := \
Greg Hartmanaf49e9b2018-02-02 16:40:53 -080056 cuttlefish_dtb \
Ping-Hao Wu9e231ee2017-11-09 20:29:34 -080057 $(cvd_host_executables) \
58 $(cvd_host_tests) \
59
60cvd_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 $@