1# Copyright 2011 The Android Open Source Project 2# 3# Android.mk for find_java.exe & static library 4 5 6LOCAL_PATH := $(call my-dir) 7 8# find_java static library for host (used by find_java.exe and installer) 9# ======================================================================= 10 11include $(CLEAR_VARS) 12 13ifeq ($(HOST_OS),windows) 14 15LOCAL_MODULE := libfindjava 16LOCAL_SRC_FILES := find_java_lib.cpp utils.cpp 17 18LOCAL_CFLAGS += -Wall -Wno-unused-parameter 19LOCAL_CFLAGS += -D_XOPEN_SOURCE -D_GNU_SOURCE -DSH_HISTORY -DUSE_MINGW 20 21include $(BUILD_HOST_STATIC_LIBRARY) 22 23 24# "find_java.exe", to be used from android.bat & co 25# ================================================= 26 27include $(CLEAR_VARS) 28 29LOCAL_SRC_FILES := \ 30 find_java_exe.cpp 31 32LOCAL_MODULE := find_java 33LOCAL_STATIC_LIBRARIES := libfindjava 34 35LOCAL_CFLAGS += -Wall -Wno-unused-parameter 36LOCAL_CFLAGS += -D_XOPEN_SOURCE -D_GNU_SOURCE -DSH_HISTORY -DUSE_MINGW 37 38LOCAL_MODULE_TAGS := optional 39 40# Locate windres executable 41WINDRES := windres 42ifneq ($(USE_MINGW),) 43 # When building the Windows resources under Linux, use the MinGW one 44 WINDRES := i586-mingw32msvc-windres 45endif 46 47# Link the Windows icon file as well into the executable, based on the technique 48# used in external/qemu/Makefile.android. The variables need to have different 49# names to not interfere with the ones from qemu/Makefile.android. 50# 51INTERMEDIATE := $(call intermediates-dir-for,EXECUTABLES,$(LOCAL_MODULE),true) 52FIND_JAVA_ICON_OBJ := find_java_icon.o 53FIND_JAVA_ICON_PATH := $(LOCAL_PATH)/images 54$(FIND_JAVA_ICON_PATH)/$(FIND_JAVA_ICON_OBJ): $(FIND_JAVA_ICON_PATH)/android_icon.rc 55 $(WINDRES) $< -I $(FIND_JAVA_ICON_PATH) -o $@ 56 57# seems to be the only way to add an object file that was not generated from 58# a C/C++/Java source file to our build system. and very unfortunately, 59# $(TOPDIR)/$(LOCALPATH) will always be prepended to this value, which forces 60# us to put the object file in the source directory... 61# 62LOCAL_PREBUILT_OBJ_FILES += images/$(FIND_JAVA_ICON_OBJ) 63 64include $(BUILD_HOST_EXECUTABLE) 65 66$(call dist-for-goals,droid,$(LOCAL_BUILT_MODULE)) 67 68endif 69 70 71