Lines Matching defs:sdk
1 # Makefile to build the SDK repository packages.
10 # $2=sdk zip (e.g. out/host/linux.../android-eng-sdk.zip)
13 define sdk-repo-pkg-zip
14 $(dir $(2))/sdk-repo-$(1)-$(3)-$(FILE_NAME_TAG).zip
17 # Defines the rule to build an SDK repository package by zipping all
19 # E.g. given a folder out/host/linux.../sdk/android-eng-sdk/tools
20 # this generates an sdk-repo-linux-tools that contains tools/*
23 # $2=sdk zip (e.g. out/host/linux.../android-eng-sdk.zip)
26 # The rule depends on the SDK zip file, which is defined by $2.
28 define mk-sdk-repo-pkg-1
29 $(call sdk-repo-pkg-zip,$(1),$(2),$(3)): $(2)
30 @echo "Building SDK repository package $(3) from $(notdir $(2))"
32 zip -9rq ../$(notdir $(call sdk-repo-pkg-zip,$(1),$(2),$(3))) $(3)/*
33 $(call dist-for-goals, sdk_repo, $(call sdk-repo-pkg-zip,$(1),$(2),$(3)))
35 $(call sdk-repo-pkg-zip,$(1),$(2),$(3)):$(notdir $(call sdk-repo-pkg-zip,$(1),$(2),$(3)))
38 # Defines the rule to build an SDK repository package when the
40 # E.g. given a folder out/host/linux.../sdk/android-eng-sdk/samples/android-N
41 # this generates an sdk-repo-linux-samples that contains android-N/*
44 # $2=sdk zip (e.g. out/host/linux.../android-eng-sdk.zip)
47 # The rule depends on the SDK zip file, which is defined by $2.
49 define mk-sdk-repo-pkg-2
50 $(call sdk-repo-pkg-zip,$(1),$(2),$(3)): $(2)
51 @echo "Building SDK repository package $(3) from $(notdir $(2))"
53 zip -9rq ../../$(notdir $(call sdk-repo-pkg-zip,$(1),$(2),$(3))) *
54 $(call dist-for-goals, sdk_repo, $(call sdk-repo-pkg-zip,$(1),$(2),$(3)))
56 $(call sdk-repo-pkg-zip,$(1),$(2),$(3)):$(notdir $(call sdk-repo-pkg-zip,$(1),$(2),$(3)))
59 # Defines the rule to build an SDK repository package when the
60 # package directory contains 3 levels from the sdk dir, for example
61 # to package SDK/extra/android/support or SDK/system-images/android-N/armeabi.
63 # if each directory contains a single sub-directory (e.g. sdk/$4/*/* must be
67 # $2=sdk zip (e.g. out/host/linux.../android-eng-sdk.zip)
69 # $4=the root of directory to package in the sdk (e.g. extra/android).
72 # The rule depends on the SDK zip file, which is defined by $2.
74 define mk-sdk-repo-pkg-3
75 $(call sdk-repo-pkg-zip,$(1),$(2),$(3)): $(2)
76 @echo "Building SDK repository package $(3) from $(notdir $(2))"
78 zip -9rq ../../../$(notdir $(call sdk-repo-pkg-zip,$(1),$(2),$(3))) *
79 $(call dist-for-goals, sdk_repo, $(call sdk-repo-pkg-zip,$(1),$(2),$(3)))
81 $(call sdk-repo-pkg-zip,$(1),$(2),$(3)):$(notdir $(call sdk-repo-pkg-zip,$(1),$(2),$(3)))
84 # Defines the rule to build an SDK sources package.
87 # $2=sdk zip (e.g. out/host/linux.../android-eng-sdk.zip)
90 define mk-sdk-repo-sources
91 $(call sdk-repo-pkg-zip,$(1),$(2),$(3)): $(2) $(TOPDIR)development/sdk/source_source.properties
92 @echo "Building SDK sources package"
94 $(TOPDIR)development/sdk/source_source.properties \
95 $(call sdk-repo-pkg-zip,$(1),$(2),$(3)) \
97 $(call dist-for-goals, sdk_repo, $(call sdk-repo-pkg-zip,$(1),$(2),$(3)))
99 $(call sdk-repo-pkg-zip,$(1),$(2),$(3)):$(notdir $(call sdk-repo-pkg-zip,$(1),$(2),$(3)))
108 $(eval $(call mk-sdk-repo-pkg-1,windows,$(WIN_SDK_ZIP),tools))
109 $(eval $(call mk-sdk-repo-pkg-1,windows,$(WIN_SDK_ZIP),platform-tools))
112 $(call sdk-repo-pkg-zip,windows,$(WIN_SDK_ZIP),tools) \
113 $(call sdk-repo-pkg-zip,windows,$(WIN_SDK_ZIP),platform-tools)
118 # Rules for main host sdk
120 ifneq ($(filter sdk win_sdk,$(MAKECMDGOALS)),)
122 $(eval $(call mk-sdk-repo-pkg-1,$(HOST_OS),$(MAIN_SDK_ZIP),tools))
123 $(eval $(call mk-sdk-repo-pkg-1,$(HOST_OS),$(MAIN_SDK_ZIP),platform-tools))
124 $(eval $(call mk-sdk-repo-pkg-1,$(HOST_OS),$(MAIN_SDK_ZIP),docs))
125 $(eval $(call mk-sdk-repo-pkg-2,$(HOST_OS),$(MAIN_SDK_ZIP),platforms))
126 $(eval $(call mk-sdk-repo-pkg-2,$(HOST_OS),$(MAIN_SDK_ZIP),samples))
127 $(eval $(call mk-sdk-repo-pkg-3,$(HOST_OS),$(MAIN_SDK_ZIP),system-images,system-images/*))
128 $(eval $(call mk-sdk-repo-pkg-3,$(HOST_OS),$(MAIN_SDK_ZIP),support,extras/android))
129 $(eval $(call mk-sdk-repo-sources,$(HOST_OS),$(MAIN_SDK_ZIP),sources))
132 $(call sdk-repo-pkg-zip,$(HOST_OS),$(MAIN_SDK_ZIP),tools) \
133 $(call sdk-repo-pkg-zip,$(HOST_OS),$(MAIN_SDK_ZIP),platform-tools) \
134 $(call sdk-repo-pkg-zip,$(HOST_OS),$(MAIN_SDK_ZIP),docs) \
135 $(call sdk-repo-pkg-zip,$(HOST_OS),$(MAIN_SDK_ZIP),platforms) \
136 $(call sdk-repo-pkg-zip,$(HOST_OS),$(MAIN_SDK_ZIP),samples) \
137 $(call sdk-repo-pkg-zip,$(HOST_OS),$(MAIN_SDK_ZIP),system-images) \
138 $(call sdk-repo-pkg-zip,$(HOST_OS),$(MAIN_SDK_ZIP),support) \
139 $(call sdk-repo-pkg-zip,$(HOST_OS),$(MAIN_SDK_ZIP),sources)
144 # Rules for sdk addon
148 # ADDON_SDK_ZIP is defined in build/core/tasks/sdk-addon.sh and is
152 RENAMED_ADDON_ZIP := $(ADDON_SDK_ZIP):$(notdir $(call sdk-repo-pkg-zip,$(HOST_OS),$(ADDON_SDK_ZIP),addon))
163 $(TOPDIR)sdk/sdkmanager/libs/sdklib/src/com/android/sdklib/repository/sdk-addon-*.xsd \
175 # Rules for the SDK Repository XML
177 SDK_REPO_XML := $(HOST_OUT)/sdk/repository.xml
185 $(TOPDIR)sdk/sdkmanager/libs/sdklib/src/com/android/sdklib/repository/sdk-repository-*.xsd \
203 @echo "Packing of SDK repository done"