Home | History | Annotate | Download | only in avdlauncher
      1 # Copyright 2011 The Android Open Source Project
      2 #
      3 # Android.mk for avdlauncher
      4 #
      5 # The "AVD 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 
     10 
     11 #----- The current C++ avdlauncher -----
     12 
     13 LOCAL_PATH := $(call my-dir)
     14 include $(CLEAR_VARS)
     15 
     16 ifeq ($(HOST_OS),windows)
     17 
     18 LOCAL_SRC_FILES := \
     19 	avdlauncher.c
     20 
     21 LOCAL_CFLAGS += -Wall -Wno-unused-parameter
     22 LOCAL_CFLAGS += -D_XOPEN_SOURCE -D_GNU_SOURCE -DSH_HISTORY
     23 LOCAL_MODULE := avdlauncher
     24 
     25 LOCAL_MODULE_TAGS := optional
     26 
     27 # Locate windres executable
     28 WINDRES := windres
     29 ifneq ($(USE_MINGW),)
     30   # When building the resources under Linux, use the MinGW one
     31   WINDRES := i586-mingw32msvc-windres
     32 endif
     33 
     34 # Link the Windows icon file as well into the executable, based on the technique
     35 # used in external/qemu/Makefile.android.  The variables need to have different
     36 # names to not interfere with the ones from qemu/Makefile.android.
     37 #
     38 INTERMEDIATE     := $(call intermediates-dir-for,EXECUTABLES,$(LOCAL_MODULE),true)
     39 AVDLAUNCHER_ICON_OBJ := avdlauncher_icon.o
     40 AVDLAUNCHER_ICON_PATH := $(LOCAL_PATH)/images
     41 $(AVDLAUNCHER_ICON_PATH)/$(AVDLAUNCHER_ICON_OBJ): $(AVDLAUNCHER_ICON_PATH)/android_icon.rc
     42 	$(WINDRES) $< -I $(AVDLAUNCHER_ICON_PATH) -o $@
     43 
     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 #
     49 LOCAL_PREBUILT_OBJ_FILES += images/$(AVDLAUNCHER_ICON_OBJ)
     50 
     51 include $(BUILD_HOST_EXECUTABLE)
     52 
     53 $(call dist-for-goals,droid,$(LOCAL_BUILT_MODULE))
     54 
     55 endif
     56 
     57