blob: 6b317a55d21d411416c43653725961c300ff8ae5 [file] [log] [blame]
Raphael6508be12009-10-11 22:32:49 -07001# Copyright 2009 The Android Open Source Project
2#
3# Android.mk for sdklauncher
4#
5# The "SDK Launcher" is for Windows only.
6# This simple .exe will sit at the root of the Windows SDK
7# and currently simply executes tools\android.bat.
8# Eventually it should simply replace the batch file.
9
Raphael6508be12009-10-11 22:32:49 -070010
Raphael Molle6414c72011-07-06 23:41:57 -040011#----- The current C++ sdklauncher -----
Raphael6508be12009-10-11 22:32:49 -070012
Raphael Molle6414c72011-07-06 23:41:57 -040013LOCAL_PATH := $(call my-dir)
Raphael6508be12009-10-11 22:32:49 -070014include $(CLEAR_VARS)
15
Raphael Molle6414c72011-07-06 23:41:57 -040016ifeq ($(HOST_OS),windows)
17
Raphael6508be12009-10-11 22:32:49 -070018LOCAL_SRC_FILES := \
19 sdklauncher.c
20
21LOCAL_CFLAGS += -Wall -Wno-unused-parameter
22LOCAL_CFLAGS += -D_XOPEN_SOURCE -D_GNU_SOURCE -DSH_HISTORY
23LOCAL_MODULE := sdklauncher
24
Raphaelfb098492011-09-16 09:18:08 -070025LOCAL_MODULE_TAGS := optional
26
Raphaela3dcd8f2010-04-15 19:41:05 -070027# Locate windres executable
28WINDRES := windres
29ifneq ($(USE_MINGW),)
Raphaelfb098492011-09-16 09:18:08 -070030 # When building the Windows resources under Linux, use the MinGW one
Raphaela3dcd8f2010-04-15 19:41:05 -070031 WINDRES := i586-mingw32msvc-windres
32endif
33
Raphael6508be12009-10-11 22:32:49 -070034# Link the Windows icon file as well into the executable, based on the technique
Raphael Moll0ddce472010-08-21 17:59:12 -070035# used in external/qemu/Makefile.android. The variables need to have different
36# names to not interfere with the ones from qemu/Makefile.android.
Raphael6508be12009-10-11 22:32:49 -070037#
38INTERMEDIATE := $(call intermediates-dir-for,EXECUTABLES,$(LOCAL_MODULE),true)
Raphael Moll0ddce472010-08-21 17:59:12 -070039SDKLAUNCHER_ICON_OBJ := sdklauncher_icon.o
40SDKLAUNCHER_ICON_PATH := $(LOCAL_PATH)/images
41$(SDKLAUNCHER_ICON_PATH)/$(SDKLAUNCHER_ICON_OBJ): $(SDKLAUNCHER_ICON_PATH)/android_icon.rc
42 $(WINDRES) $< -I $(SDKLAUNCHER_ICON_PATH) -o $@
Raphael6508be12009-10-11 22:32:49 -070043
44# seems to be the only way to add an object file that was not generated from
45# a C/C++/Java source file to our build system. and very unfortunately,
46# $(TOPDIR)/$(LOCALPATH) will always be prepended to this value, which forces
47# us to put the object file in the source directory...
48#
Raphael Moll0ddce472010-08-21 17:59:12 -070049LOCAL_PREBUILT_OBJ_FILES += images/$(SDKLAUNCHER_ICON_OBJ)
Raphael6508be12009-10-11 22:32:49 -070050
51include $(BUILD_HOST_EXECUTABLE)
52
53$(call dist-for-goals,droid,$(LOCAL_BUILT_MODULE))
54
55endif
Raphael Molle6414c72011-07-06 23:41:57 -040056
Raphael Molle6414c72011-07-06 23:41:57 -040057
58
59