Android.mk revision 427a51ab735e2075b2a783fcf073c9db56727104
1#
2# Copyright (C) 2008 The Android Open Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#      http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16LOCAL_PATH := $(call my-dir)
17
18# We have a special case here where we build the library's resources
19# independently from its code, so we need to find where the resource
20# class source got placed in the course of building the resources.
21# Thus, the magic here.
22# Also, this module cannot depend directly on the R.java file; if it
23# did, the PRIVATE_* vars for R.java wouldn't be guaranteed to be correct.
24# Instead, it depends on the R.stamp file, which lists the corresponding
25# R.java file as a prerequisite.
26# TODO: find a more appropriate way to do this.
27framework_res_source_path := APPS/framework-res_intermediates/src
28
29# the library
30# ============================================================
31include $(CLEAR_VARS)
32
33# FRAMEWORKS_BASE_SUBDIRS comes from build/core/pathmap.mk
34LOCAL_SRC_FILES := $(call find-other-java-files,$(FRAMEWORKS_BASE_SUBDIRS))
35
36# EventLogTags files.
37LOCAL_SRC_FILES += \
38       core/java/android/content/EventLogTags.logtags \
39       core/java/android/webkit/EventLogTags.logtags \
40       telephony/java/com/android/internal/telephony/EventLogTags.logtags \
41
42# The following filters out code we are temporarily not including at all.
43# TODO: Move AWT and beans (and associated harmony code) back into libcore.
44# TODO: Maybe remove javax.microedition entirely?
45# TODO: Move SyncML (org.mobilecontrol.*) into its own library.
46LOCAL_SRC_FILES := $(filter-out \
47			org/mobilecontrol/% \
48			,$(LOCAL_SRC_FILES))
49
50## READ ME: ########################################################
51##
52## When updating this list of aidl files, consider if that aidl is
53## part of the SDK API.  If it is, also add it to the list below that
54## is preprocessed and distributed with the SDK.  This list should
55## not contain any aidl files for parcelables, but the one below should
56## if you intend for 3rd parties to be able to send those objects
57## across process boundaries.
58##
59## READ ME: ########################################################
60LOCAL_SRC_FILES += \
61	core/java/android/accessibilityservice/IAccessibilityServiceConnection.aidl \
62	core/java/android/accessibilityservice/IEventListener.aidl \
63	core/java/android/accounts/IAccountManager.aidl \
64	core/java/android/accounts/IAccountManagerResponse.aidl \
65	core/java/android/accounts/IAccountAuthenticator.aidl \
66	core/java/android/accounts/IAccountAuthenticatorResponse.aidl \
67	core/java/android/app/IActivityController.aidl \
68	core/java/android/app/IActivityPendingResult.aidl \
69	core/java/android/app/IActivityWatcher.aidl \
70	core/java/android/app/IAlarmManager.aidl \
71	core/java/android/app/IBackupAgent.aidl \
72	core/java/android/app/IInstrumentationWatcher.aidl \
73	core/java/android/app/INotificationManager.aidl \
74	core/java/android/app/ISearchManager.aidl \
75	core/java/android/app/ISearchManagerCallback.aidl \
76	core/java/android/app/IServiceConnection.aidl \
77	core/java/android/app/IThumbnailReceiver.aidl \
78	core/java/android/app/IThumbnailRetriever.aidl \
79	core/java/android/app/ITransientNotification.aidl \
80	core/java/android/app/IUiModeManager.aidl \
81	core/java/android/app/IWallpaperManager.aidl \
82	core/java/android/app/IWallpaperManagerCallback.aidl \
83	core/java/android/app/admin/IDevicePolicyManager.aidl \
84	core/java/android/app/backup/IBackupManager.aidl \
85	core/java/android/app/backup/IRestoreObserver.aidl \
86	core/java/android/app/backup/IRestoreSession.aidl \
87	core/java/android/bluetooth/IBluetooth.aidl \
88	core/java/android/bluetooth/IBluetoothA2dp.aidl \
89	core/java/android/bluetooth/IBluetoothCallback.aidl \
90	core/java/android/bluetooth/IBluetoothHeadset.aidl \
91	core/java/android/bluetooth/IBluetoothPbap.aidl \
92	core/java/android/content/IClipboard.aidl \
93	core/java/android/content/IContentService.aidl \
94	core/java/android/content/IIntentReceiver.aidl \
95	core/java/android/content/IIntentSender.aidl \
96	core/java/android/content/IOnPrimaryClipChangedListener.aidl \
97	core/java/android/content/ISyncAdapter.aidl \
98	core/java/android/content/ISyncContext.aidl \
99	core/java/android/content/ISyncStatusObserver.aidl \
100	core/java/android/content/pm/IPackageDataObserver.aidl \
101	core/java/android/content/pm/IPackageDeleteObserver.aidl \
102	core/java/android/content/pm/IPackageInstallObserver.aidl \
103	core/java/android/content/pm/IPackageManager.aidl \
104	core/java/android/content/pm/IPackageMoveObserver.aidl \
105	core/java/android/content/pm/IPackageStatsObserver.aidl \
106	core/java/android/database/IContentObserver.aidl \
107	core/java/android/hardware/usb/IUsbManager.aidl \
108	core/java/android/net/IConnectivityManager.aidl \
109	core/java/android/net/INetworkManagementEventObserver.aidl \
110	core/java/android/net/IThrottleManager.aidl \
111	core/java/android/nfc/ILlcpConnectionlessSocket.aidl \
112	core/java/android/nfc/ILlcpServiceSocket.aidl \
113	core/java/android/nfc/ILlcpSocket.aidl \
114	core/java/android/nfc/INfcAdapter.aidl \
115	core/java/android/nfc/INfcAdapterExtras.aidl \
116	core/java/android/nfc/INfcTag.aidl \
117	core/java/android/nfc/IP2pInitiator.aidl \
118	core/java/android/nfc/IP2pTarget.aidl \
119	core/java/android/os/IHardwareService.aidl \
120	core/java/android/os/IMessenger.aidl \
121	core/java/android/os/INetworkManagementService.aidl \
122	core/java/android/os/INetStatService.aidl \
123	core/java/android/os/IPermissionController.aidl \
124	core/java/android/os/IPowerManager.aidl \
125    core/java/android/os/IRemoteCallback.aidl \
126	core/java/android/os/IVibratorService.aidl \
127    core/java/android/service/wallpaper/IWallpaperConnection.aidl \
128    core/java/android/service/wallpaper/IWallpaperEngine.aidl \
129    core/java/android/service/wallpaper/IWallpaperService.aidl \
130	core/java/android/view/accessibility/IAccessibilityManager.aidl \
131	core/java/android/view/accessibility/IAccessibilityManagerClient.aidl \
132	core/java/android/view/IApplicationToken.aidl \
133	core/java/android/view/IOnKeyguardExitResult.aidl \
134	core/java/android/view/IRotationWatcher.aidl \
135	core/java/android/view/IWindow.aidl \
136	core/java/android/view/IWindowManager.aidl \
137	core/java/android/view/IWindowSession.aidl \
138	core/java/android/speech/IRecognitionListener.aidl \
139	core/java/android/speech/IRecognitionService.aidl \
140	core/java/android/speech/tts/ITextToSpeechCallback.aidl \
141	core/java/android/speech/tts/ITextToSpeechService.aidl \
142	core/java/com/android/internal/app/IBatteryStats.aidl \
143	core/java/com/android/internal/app/IUsageStats.aidl \
144	core/java/com/android/internal/app/IMediaContainerService.aidl \
145	core/java/com/android/internal/appwidget/IAppWidgetService.aidl \
146	core/java/com/android/internal/appwidget/IAppWidgetHost.aidl \
147	core/java/com/android/internal/backup/IBackupTransport.aidl \
148	core/java/com/android/internal/os/IDropBoxManagerService.aidl \
149	core/java/com/android/internal/os/IResultReceiver.aidl \
150	core/java/com/android/internal/statusbar/IStatusBar.aidl \
151	core/java/com/android/internal/statusbar/IStatusBarService.aidl \
152	core/java/com/android/internal/view/IInputContext.aidl \
153	core/java/com/android/internal/view/IInputContextCallback.aidl \
154	core/java/com/android/internal/view/IInputMethod.aidl \
155	core/java/com/android/internal/view/IInputMethodCallback.aidl \
156	core/java/com/android/internal/view/IInputMethodClient.aidl \
157	core/java/com/android/internal/view/IInputMethodManager.aidl \
158	core/java/com/android/internal/view/IInputMethodSession.aidl \
159	core/java/com/android/internal/widget/IRemoteViewsFactory.aidl \
160	core/java/com/android/internal/widget/IRemoteViewsAdapterConnection.aidl \
161	keystore/java/android/security/IKeyChainService.aidl \
162	location/java/android/location/ICountryDetector.aidl \
163	location/java/android/location/ICountryListener.aidl \
164	location/java/android/location/IGeocodeProvider.aidl \
165	location/java/android/location/IGpsStatusListener.aidl \
166	location/java/android/location/IGpsStatusProvider.aidl \
167	location/java/android/location/ILocationListener.aidl \
168	location/java/android/location/ILocationManager.aidl \
169	location/java/android/location/ILocationProvider.aidl \
170	location/java/android/location/INetInitiatedListener.aidl \
171	media/java/android/media/IAudioService.aidl \
172	media/java/android/media/IAudioFocusDispatcher.aidl \
173	media/java/android/media/IMediaScannerListener.aidl \
174	media/java/android/media/IMediaScannerService.aidl \
175	telephony/java/com/android/internal/telephony/IPhoneStateListener.aidl \
176	telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl \
177	telephony/java/com/android/internal/telephony/ITelephony.aidl \
178	telephony/java/com/android/internal/telephony/ITelephonyRegistry.aidl \
179	telephony/java/com/android/internal/telephony/IIccPhoneBook.aidl \
180	telephony/java/com/android/internal/telephony/ISms.aidl \
181	telephony/java/com/android/internal/telephony/IWapPushManager.aidl \
182	wifi/java/android/net/wifi/IWifiManager.aidl \
183	telephony/java/com/android/internal/telephony/IExtendedNetworkService.aidl \
184	vpn/java/android/net/vpn/IVpnService.aidl \
185	voip/java/android/net/sip/ISipSession.aidl \
186	voip/java/android/net/sip/ISipSessionListener.aidl \
187	voip/java/android/net/sip/ISipService.aidl
188#
189
190
191# FRAMEWORKS_BASE_JAVA_SRC_DIRS comes from build/core/pathmap.mk
192LOCAL_AIDL_INCLUDES += $(FRAMEWORKS_BASE_JAVA_SRC_DIRS)
193
194LOCAL_INTERMEDIATE_SOURCES := \
195			$(framework_res_source_path)/android/R.java \
196			$(framework_res_source_path)/android/Manifest.java \
197			$(framework_res_source_path)/com/android/internal/R.java
198
199LOCAL_NO_STANDARD_LIBRARIES := true
200LOCAL_JAVA_LIBRARIES := bouncycastle core core-junit ext
201
202LOCAL_MODULE := framework
203LOCAL_MODULE_CLASS := JAVA_LIBRARIES
204
205LOCAL_NO_EMMA_INSTRUMENT := true
206LOCAL_NO_EMMA_COMPILE := true
207
208# List of classes and interfaces which should be loaded by the Zygote.
209LOCAL_JAVA_RESOURCE_FILES += $(LOCAL_PATH)/preloaded-classes
210
211#LOCAL_JARJAR_RULES := $(LOCAL_PATH)/jarjar-rules.txt
212
213LOCAL_DX_FLAGS := --core-library
214
215include $(BUILD_JAVA_LIBRARY)
216
217# Make sure that R.java and Manifest.java are built before we build
218# the source for this library.
219framework_res_R_stamp := \
220	$(call intermediates-dir-for,APPS,framework-res,,COMMON)/src/R.stamp
221$(full_classes_compiled_jar): $(framework_res_R_stamp)
222
223# Make sure that framework-res is installed when framework is.
224$(LOCAL_INSTALLED_MODULE): | $(dir $(LOCAL_INSTALLED_MODULE))framework-res.apk
225
226framework_built := $(LOCAL_BUILT_MODULE)
227
228# AIDL files to be preprocessed and included in the SDK,
229# relative to the root of the build tree.
230# ============================================================
231aidl_files := \
232	frameworks/base/core/java/android/accounts/IAccountManager.aidl \
233	frameworks/base/core/java/android/accounts/IAccountManagerResponse.aidl \
234	frameworks/base/core/java/android/accounts/IAccountAuthenticator.aidl \
235	frameworks/base/core/java/android/accounts/IAccountAuthenticatorResponse.aidl \
236	frameworks/base/core/java/android/app/Notification.aidl \
237	frameworks/base/core/java/android/app/PendingIntent.aidl \
238	frameworks/base/core/java/android/bluetooth/BluetoothDevice.aidl \
239	frameworks/base/core/java/android/content/ComponentName.aidl \
240	frameworks/base/core/java/android/content/Intent.aidl \
241	frameworks/base/core/java/android/content/IntentSender.aidl \
242	frameworks/base/core/java/android/content/PeriodicSync.aidl \
243	frameworks/base/core/java/android/content/SyncStats.aidl \
244	frameworks/base/core/java/android/content/res/Configuration.aidl \
245	frameworks/base/core/java/android/appwidget/AppWidgetProviderInfo.aidl \
246	frameworks/base/core/java/android/net/Uri.aidl \
247	frameworks/base/core/java/android/nfc/NdefMessage.aidl \
248	frameworks/base/core/java/android/nfc/NdefRecord.aidl \
249	frameworks/base/core/java/android/nfc/Tag.aidl \
250	frameworks/base/core/java/android/os/Bundle.aidl \
251	frameworks/base/core/java/android/os/DropBoxManager.aidl \
252	frameworks/base/core/java/android/os/ParcelFileDescriptor.aidl \
253	frameworks/base/core/java/android/os/ParcelUuid.aidl \
254	frameworks/base/core/java/android/view/KeyEvent.aidl \
255	frameworks/base/core/java/android/view/MotionEvent.aidl \
256	frameworks/base/core/java/android/view/Surface.aidl \
257	frameworks/base/core/java/android/view/WindowManager.aidl \
258	frameworks/base/core/java/android/widget/RemoteViews.aidl \
259	frameworks/base/core/java/com/android/internal/view/IInputContext.aidl \
260	frameworks/base/core/java/com/android/internal/view/IInputMethod.aidl \
261	frameworks/base/core/java/com/android/internal/view/IInputMethodCallback.aidl \
262	frameworks/base/core/java/com/android/internal/view/IInputMethodClient.aidl \
263	frameworks/base/core/java/com/android/internal/view/IInputMethodManager.aidl \
264	frameworks/base/core/java/com/android/internal/view/IInputMethodSession.aidl \
265	frameworks/base/graphics/java/android/graphics/Bitmap.aidl \
266	frameworks/base/graphics/java/android/graphics/Rect.aidl \
267	frameworks/base/graphics/java/android/graphics/Region.aidl \
268	frameworks/base/location/java/android/location/Criteria.aidl \
269	frameworks/base/location/java/android/location/Location.aidl \
270	frameworks/base/telephony/java/android/telephony/ServiceState.aidl \
271	frameworks/base/telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl \
272	frameworks/base/telephony/java/com/android/internal/telephony/ITelephony.aidl \
273	frameworks/base/vpn/java/android/net/vpn/IVpnService.aidl \
274
275gen := $(TARGET_OUT_COMMON_INTERMEDIATES)/framework.aidl
276$(gen): PRIVATE_SRC_FILES := $(aidl_files)
277ALL_SDK_FILES += $(gen)
278$(gen): $(aidl_files) | $(AIDL)
279		@echo Aidl Preprocess: $@
280		$(hide) $(AIDL) --preprocess $@ $(PRIVATE_SRC_FILES)
281
282# the documentation
283# ============================================================
284
285# TODO: deal with com/google/android/googleapps
286packages_to_document := \
287	android \
288	javax/microedition/khronos
289
290# Search through the base framework dirs for these packages.
291# The result will be relative to frameworks/base.
292fwbase_dirs_to_document := \
293	test-runner/src \
294	$(patsubst $(LOCAL_PATH)/%,%, \
295	  $(wildcard \
296	    $(foreach dir, $(FRAMEWORKS_BASE_JAVA_SRC_DIRS), \
297	      $(addprefix $(dir)/, $(packages_to_document)) \
298	     ) \
299	   ) \
300	 )
301
302# include definition of libcore_to_document
303include $(LOCAL_PATH)/../../libcore/Docs.mk
304
305non_base_dirs := \
306	../../external/apache-http/src/org/apache/http
307
308# These are relative to frameworks/base
309dirs_to_document := \
310	$(fwbase_dirs_to_document) \
311	$(non_base_dirs)
312
313html_dirs := \
314	$(FRAMEWORKS_BASE_SUBDIRS) \
315	$(non_base_dirs)
316
317# These are relative to frameworks/base
318framework_docs_LOCAL_SRC_FILES := \
319	$(call find-other-java-files, $(dirs_to_document)) \
320	$(call find-other-html-files, $(html_dirs)) \
321	$(addprefix ../../libcore/, $(call libcore_to_document, $(LOCAL_PATH)/../../libcore))
322
323# This is used by ide.mk as the list of source files that are
324# always included.
325INTERNAL_SDK_SOURCE_DIRS := $(addprefix $(LOCAL_PATH)/,$(dirs_to_document))
326
327framework_docs_LOCAL_DROIDDOC_SOURCE_PATH := \
328	$(FRAMEWORKS_BASE_JAVA_SRC_DIRS)
329
330framework_docs_LOCAL_INTERMEDIATE_SOURCES := \
331			$(framework_res_source_path)/android/R.java \
332			$(framework_res_source_path)/android/Manifest.java \
333			$(framework_res_source_path)/com/android/internal/R.java
334
335framework_docs_LOCAL_JAVA_LIBRARIES := \
336			bouncycastle \
337			core \
338			ext \
339			framework \
340
341framework_docs_LOCAL_MODULE_CLASS := JAVA_LIBRARIES
342framework_docs_LOCAL_DROIDDOC_HTML_DIR := docs/html
343# The since flag (-since N.xml API_LEVEL) is used to add API Level information
344# to the reference documentation. Must be in order of oldest to newest.
345framework_docs_LOCAL_DROIDDOC_OPTIONS := \
346    -knowntags ./frameworks/base/docs/knowntags.txt \
347    -since ./frameworks/base/api/1.xml 1 \
348    -since ./frameworks/base/api/2.xml 2 \
349    -since ./frameworks/base/api/3.xml 3 \
350    -since ./frameworks/base/api/4.xml 4 \
351    -since ./frameworks/base/api/5.xml 5 \
352    -since ./frameworks/base/api/6.xml 6 \
353    -since ./frameworks/base/api/7.xml 7 \
354    -since ./frameworks/base/api/8.xml 8 \
355    -since ./frameworks/base/api/9.xml 9 \
356    -since ./frameworks/base/api/10.xml 10 \
357    -since ./frameworks/base/api/11.xml 11 \
358    -since ./frameworks/base/api/12.xml 12 \
359		-werror -hide 113 \
360		-overview $(LOCAL_PATH)/core/java/overview.html
361
362framework_docs_LOCAL_ADDITIONAL_JAVA_DIR:= $(call intermediates-dir-for,JAVA_LIBRARIES,framework)
363
364framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES := \
365    frameworks/base/docs/knowntags.txt
366
367sample_dir := development/samples
368
369# the list here should match the list of samples included in the sdk samples package
370# (see development/build/sdk.atree)
371web_docs_sample_code_flags := \
372		-hdf android.hasSamples 1 \
373		-samplecode $(sample_dir)/AccessibilityService \
374		            resources/samples/AccessibilityService "Accessibility Service" \
375		-samplecode $(sample_dir)/AccelerometerPlay \
376		            resources/samples/AccelerometerPlay "Accelerometer Play" \
377	  -samplecode $(sample_dir)/ApiDemos \
378		            resources/samples/ApiDemos "API Demos" \
379		-samplecode $(sample_dir)/BackupRestore \
380		            resources/samples/BackupRestore "Backup and Restore" \
381		-samplecode $(sample_dir)/BluetoothChat \
382		            resources/samples/BluetoothChat "Bluetooth Chat" \
383		-samplecode $(sample_dir)/BusinessCard \
384		            resources/samples/BusinessCard "Business Card" \
385		-samplecode $(sample_dir)/ContactManager \
386		            resources/samples/ContactManager "Contact Manager" \
387    -samplecode $(sample_dir)/CubeLiveWallpaper \
388                resources/samples/CubeLiveWallpaper "Cube Live Wallpaper" \
389		-samplecode $(sample_dir)/Home \
390		            resources/samples/Home "Home" \
391                -samplecode $(sample_dir)/HoneycombGallery \
392                            resources/samples/HoneycombGallery "Honeycomb Gallery" \
393		-samplecode $(sample_dir)/JetBoy \
394		            resources/samples/JetBoy "JetBoy" \
395		-samplecode $(sample_dir)/LunarLander \
396		            resources/samples/LunarLander "Lunar Lander" \
397		-samplecode $(sample_dir)/MultiResolution \
398		            resources/samples/MultiResolution "Multiple Resolutions" \
399		-samplecode $(sample_dir)/NFCDemo \
400		            resources/samples/NFCDemo "NFC Demo" \
401		-samplecode $(sample_dir)/NotePad \
402		            resources/samples/NotePad "Note Pad" \
403		-samplecode $(sample_dir)/SampleSyncAdapter \
404		            resources/samples/SampleSyncAdapter "Sample Sync Adapter" \
405		-samplecode $(sample_dir)/RenderScript \
406		            resources/samples/RenderScript "RenderScript" \
407		-samplecode $(sample_dir)/SearchableDictionary \
408		            resources/samples/SearchableDictionary "Searchable Dictionary v2" \
409		-samplecode $(sample_dir)/SipDemo \
410		            resources/samples/SipDemo "SIP Demo" \
411		-samplecode $(sample_dir)/Snake \
412		            resources/samples/Snake "Snake" \
413		-samplecode $(sample_dir)/SoftKeyboard \
414		            resources/samples/SoftKeyboard "Soft Keyboard" \
415		-samplecode $(sample_dir)/Spinner  \
416		            resources/samples/Spinner "Spinner" \
417		-samplecode $(sample_dir)/SpinnerTest \
418		            resources/samples/SpinnerTest "SpinnerTest" \
419		-samplecode $(sample_dir)/StackWidget \
420		            resources/samples/StackWidget "StackView Widget" \
421		-samplecode $(sample_dir)/TicTacToeLib  \
422		            resources/samples/TicTacToeLib "TicTacToeLib" \
423		-samplecode $(sample_dir)/TicTacToeMain \
424		            resources/samples/TicTacToeMain "TicTacToeMain" \
425		-samplecode $(sample_dir)/USB \
426		            resources/samples/USB "USB" \
427		-samplecode $(sample_dir)/WeatherListWidget \
428		            resources/samples/WeatherListWidget "Weather List Widget" \
429		-samplecode $(sample_dir)/Wiktionary \
430		            resources/samples/Wiktionary "Wiktionary" \
431		-samplecode $(sample_dir)/WiktionarySimple \
432		            resources/samples/WiktionarySimple "Wiktionary (Simplified)" \
433		-samplecode $(sample_dir)/VoiceRecognitionService \
434		            resources/samples/VoiceRecognitionService "Voice Recognition Service" \
435		-samplecode $(sample_dir)/XmlAdapters \
436		            resources/samples/XmlAdapters "XML Adapters"
437
438## SDK version identifiers used in the published docs
439  # major[.minor] version for current SDK. (full releases only)
440framework_docs_SDK_VERSION:=3.0
441  # release version (ie "Release x")  (full releases only)
442framework_docs_SDK_REL_ID:=1
443
444framework_docs_LOCAL_DROIDDOC_OPTIONS += \
445		-hdf sdk.version $(framework_docs_SDK_VERSION) \
446		-hdf sdk.rel.id $(framework_docs_SDK_REL_ID) \
447		-hdf sdk.preview 0 \
448
449# ====  the api stubs and current.xml ===========================
450include $(CLEAR_VARS)
451
452LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
453LOCAL_INTERMEDIATE_SOURCES:=$(framework_docs_LOCAL_INTERMEDIATE_SOURCES)
454LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
455LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
456LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
457LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
458LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
459LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
460
461LOCAL_MODULE := api-stubs
462
463LOCAL_DROIDDOC_OPTIONS:=\
464		$(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
465		-stubs $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android_stubs_current_intermediates/src \
466		-api $(INTERNAL_PLATFORM_API_FILE) \
467		-nodocs
468
469LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=build/tools/droiddoc/templates-sdk
470
471LOCAL_UNINSTALLABLE_MODULE := true
472
473include $(BUILD_DROIDDOC)
474
475# $(gen), i.e. framework.aidl, is also needed while building against the current stub.
476$(full_target): $(framework_built) $(gen)
477$(INTERNAL_PLATFORM_API_FILE): $(full_target)
478$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_API_FILE))
479
480# ====  check javadoc comments but don't generate docs ========
481include $(CLEAR_VARS)
482
483LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
484LOCAL_INTERMEDIATE_SOURCES:=$(framework_docs_LOCAL_INTERMEDIATE_SOURCES)
485LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
486LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
487LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
488LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
489LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
490LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
491
492LOCAL_MODULE := doc-comment-check
493
494LOCAL_DROIDDOC_OPTIONS:=\
495		$(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
496		-parsecomments
497
498LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=build/tools/droiddoc/templates-sdk
499
500LOCAL_UNINSTALLABLE_MODULE := true
501
502include $(BUILD_DROIDDOC)
503
504# $(gen), i.e. framework.aidl, is also needed while building against the current stub.
505$(full_target): $(framework_built) $(gen)
506
507droidcore: doc-comment-check-docs
508
509# ====  static html in the sdk ==================================
510include $(CLEAR_VARS)
511
512LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
513LOCAL_INTERMEDIATE_SOURCES:=$(framework_docs_LOCAL_INTERMEDIATE_SOURCES)
514LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
515LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
516LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
517LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
518LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
519LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
520
521LOCAL_MODULE := offline-sdk
522
523LOCAL_DROIDDOC_OPTIONS:=\
524		$(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
525                $(web_docs_sample_code_flags) \
526                -offlinemode \
527		-title "Android SDK" \
528		-proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \
529		-todo $(OUT_DOCS)/$(LOCAL_MODULE)-docs-todo.html \
530		-sdkvalues $(OUT_DOCS) \
531		-hdf android.whichdoc offline
532
533
534LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=build/tools/droiddoc/templates-sdk
535
536include $(BUILD_DROIDDOC)
537
538static_doc_index_redirect := $(out_dir)/index.html
539$(static_doc_index_redirect): \
540	$(LOCAL_PATH)/docs/docs-documentation-redirect.html | $(ACP)
541	$(hide) mkdir -p $(dir $@)
542	$(hide) $(ACP) $< $@
543
544$(full_target): $(static_doc_index_redirect)
545$(full_target): $(framework_built)
546
547# ==== docs for the web (on the google app engine server) =======================
548include $(CLEAR_VARS)
549
550LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
551LOCAL_INTERMEDIATE_SOURCES:=$(framework_docs_LOCAL_INTERMEDIATE_SOURCES)
552LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
553LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
554LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
555LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
556LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
557LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
558LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
559
560LOCAL_MODULE := online-sdk
561
562LOCAL_DROIDDOC_OPTIONS:= \
563		$(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
564		$(web_docs_sample_code_flags) \
565		-toroot / \
566		-hdf android.whichdoc online \
567		-hdf template.showLanguageMenu true
568
569LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=build/tools/droiddoc/templates-sdk
570
571include $(BUILD_DROIDDOC)
572
573# explicitly specify that online-sdk depends on framework-res and any generated docs
574$(full_target): framework-res-package-target
575
576# ==== docs that have all of the stuff that's @hidden =======================
577include $(CLEAR_VARS)
578
579LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
580LOCAL_INTERMEDIATE_SOURCES:=$(framework_docs_LOCAL_INTERMEDIATE_SOURCES)
581LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES) framework
582LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
583LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
584LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
585LOCAL_ADDITIONAL_JAVA_DIR:=$(call intermediates-dir-for,JAVA_LIBRARIES,framework)
586LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
587
588LOCAL_MODULE := hidden
589LOCAL_DROIDDOC_OPTIONS:=\
590		$(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
591		-title "Android SDK - Including hidden APIs."
592#		-hidden
593
594LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=build/tools/droiddoc/templates-sdk
595
596include $(BUILD_DROIDDOC)
597
598# Build ext.jar
599# ============================================================
600
601# NOTICE notes for non-obvious sections
602# apache-http - covered by the Apache Commons section.
603
604
605ext_dirs := \
606	../../external/nist-sip/java \
607	../../external/apache-http/src \
608	../../external/tagsoup/src \
609	../../external/libphonenumber/java/src
610
611ext_src_files := $(call all-java-files-under,$(ext_dirs))
612
613ext_res_dirs := \
614	../../external/libphonenumber/java/src
615
616# ====  the library  =========================================
617include $(CLEAR_VARS)
618
619LOCAL_SRC_FILES := $(ext_src_files)
620
621LOCAL_NO_STANDARD_LIBRARIES := true
622LOCAL_JAVA_LIBRARIES := core
623LOCAL_JAVA_RESOURCE_DIRS := $(ext_res_dirs)
624LOCAL_MODULE_TAGS := optional
625LOCAL_MODULE := ext
626
627LOCAL_NO_EMMA_INSTRUMENT := true
628LOCAL_NO_EMMA_COMPILE := true
629
630LOCAL_DX_FLAGS := --core-library
631
632include $(BUILD_JAVA_LIBRARY)
633
634
635# Include subdirectory makefiles
636# ============================================================
637
638# If we're building with ONE_SHOT_MAKEFILE (mm, mmm), then what the framework
639# team really wants is to build the stuff defined by this makefile.
640ifeq (,$(ONE_SHOT_MAKEFILE))
641include $(call first-makefiles-under,$(LOCAL_PATH))
642endif
643