blob: b8bcff775ba915917ea10c6433dfb9f1a0218ec3 [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
Dan Willemsen0a4f58a2018-06-18 21:55:38 -070011$(cvd_host_package_tar): PRIVATE_TAR_FORMAT :=
Ping-Hao Wu9e231ee2017-11-09 20:29:34 -080012ifeq ($(HOST_OS),linux)
Dan Willemsen0a4f58a2018-06-18 21:55:38 -070013$(cvd_host_package_tar): PRIVATE_TAR_FORMAT := --format=gnu
Ping-Hao Wu9e231ee2017-11-09 20:29:34 -080014endif
15
16# Build and store them on the build server.
17$(call dist-for-goals, dist_files, $(cvd_host_package_tar))
18
19bin_path := $(notdir $(HOST_OUT_EXECUTABLES))
20lib_path := $(notdir $(HOST_OUT_SHARED_LIBRARIES))
21tests_path := $(notdir $(HOST_OUT_NATIVE_TESTS))
22
23cvd_host_executables := \
Ryan Hainingb411f042018-07-13 14:05:49 -070024 adbshell \
Greg Hartman004fb182018-05-02 18:48:53 -070025 host_region_e2e_test \
Greg Hartman6e78bf52017-11-11 12:03:39 -080026 launch_cvd \
Ryan Hainingb2cfce22018-02-05 08:58:19 -080027 socket_forward_proxy \
Ryan Haining8ffc0802018-06-29 19:02:49 -070028 adb_connector \
Jorge E. Moreira0aa61402018-04-25 18:18:43 -070029 stop_cvd \
Jorge E. Moreira20a6b1a2018-01-25 17:15:26 -080030 vnc_server \
Andreas Huber5a6d7b72018-03-09 10:32:42 -080031 record_audio \
Jorge E. Moreiraa635a262018-06-13 14:51:10 -070032 cf_qemu.sh \
Jorge E. Moreira31d7bc02018-06-22 18:17:34 -070033 ivserver \
Jorge E. Moreira26a633e2018-07-22 23:04:04 -070034 virtual_usb_manager \
Ping-Hao Wu9e231ee2017-11-09 20:29:34 -080035
36cvd_host_tests := \
37 auto_free_buffer_test \
38 circqueue_test \
39 cuttlefish_thread_test \
40 hald_client_test \
41 lock_test \
42 monotonic_time_test \
43 vsoc_graphics_test \
Cody Schuffelenb5f655d2018-07-27 19:10:04 -070044 cuttlefish_net_tests \
Ping-Hao Wu9e231ee2017-11-09 20:29:34 -080045
46cvd_host_shared_libraries := \
Tomasz Wiszkowski0c8259e2017-12-06 09:47:02 -080047 libbase \
48 vsoc_lib \
49 libcuttlefish_fs \
50 cuttlefish_auto_resources \
Greg Hartmande0df452018-04-09 17:37:11 -070051 libcuttlefish_strings \
Jorge E. Moreira10910de2018-06-11 14:37:03 -070052 libcuttlefish_utils \
Jorge E. Moreiracf8d9882018-02-23 14:43:03 -080053 cuttlefish_tcp_socket \
Tomasz Wiszkowski0c8259e2017-12-06 09:47:02 -080054 liblog \
55 libnl \
Ping-Hao Wu9e231ee2017-11-09 20:29:34 -080056 libc++ \
57 libicuuc-host \
58
59cvd_host_configs := \
Greg Hartman512dad92018-06-21 23:52:56 -070060 system-root.dtb \
61 initrd-root.dtb
Ping-Hao Wu9e231ee2017-11-09 20:29:34 -080062
Ping-Hao Wu9e231ee2017-11-09 20:29:34 -080063cvd_host_package_files := \
64 $(addprefix config/,$(cvd_host_configs)) \
65 $(addprefix $(bin_path)/,$(cvd_host_executables)) \
66 $(addprefix $(lib_path)/,$(addsuffix .so,$(cvd_host_shared_libraries))) \
67 $(foreach test,$(cvd_host_tests), ${tests_path}/$(test)/$(test)) \
68
Dan Willemsen0a4f58a2018-06-18 21:55:38 -070069$(cvd_host_package_tar): PRIVATE_FILES := $(cvd_host_package_files)
70$(cvd_host_package_tar): $(addprefix $(HOST_OUT)/,$(cvd_host_package_files))
71 $(hide) rm -rf $@ && tar Scfz $@.tmp -C $(HOST_OUT) $(PRIVATE_TAR_FORMAT) $(PRIVATE_FILES)
Ping-Hao Wu9e231ee2017-11-09 20:29:34 -080072 $(hide) mv $@.tmp $@