blob: bcb6e64f793aeb9ecdf6aa2d58b16278ddae5174 [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 Hartman6e78bf52017-11-11 12:03:39 -080023 launch_cvd \
Tomasz Wiszkowski0c8259e2017-12-06 09:47:02 -080024 wificlient \
Ping-Hao Wu9e231ee2017-11-09 20:29:34 -080025
26cvd_host_tests := \
27 auto_free_buffer_test \
28 circqueue_test \
29 cuttlefish_thread_test \
30 hald_client_test \
31 lock_test \
32 monotonic_time_test \
33 vsoc_graphics_test \
34
35cvd_host_shared_libraries := \
Tomasz Wiszkowski0c8259e2017-12-06 09:47:02 -080036 libbase \
37 vsoc_lib \
38 libcuttlefish_fs \
39 cuttlefish_auto_resources \
40 liblog \
41 libnl \
Ping-Hao Wu9e231ee2017-11-09 20:29:34 -080042 libc++ \
43 libicuuc-host \
44
45cvd_host_configs := \
46 vsoc_mem.json
47
48cvd_host_packages := \
49 vsoc_mem_json \
50 $(cvd_host_executables) \
51 $(cvd_host_tests) \
52
53cvd_host_package_files := \
54 $(addprefix config/,$(cvd_host_configs)) \
55 $(addprefix $(bin_path)/,$(cvd_host_executables)) \
56 $(addprefix $(lib_path)/,$(addsuffix .so,$(cvd_host_shared_libraries))) \
57 $(foreach test,$(cvd_host_tests), ${tests_path}/$(test)/$(test)) \
58
59$(cvd_host_package_tar): $(cvd_host_packages)
60 $(hide) rm -rf $@ && tar Scfz $@.tmp -C $(HOST_OUT) $(CVD_TAR_FORMAT) $(cvd_host_package_files)
61 $(hide) mv $@.tmp $@