blob: 892f772d5fa2a7a5081cb3ab4118d83fcf62ebe9 [file] [log] [blame]
Raphael97f3e042011-11-11 18:08:58 -08001# Copyright 2011 The Android Open Source Project
2#
Raphaeld2d69992012-01-24 15:06:56 -08003# Android.mk for find_java.exe & static library
Raphael97f3e042011-11-11 18:08:58 -08004
5
Raphael97f3e042011-11-11 18:08:58 -08006LOCAL_PATH := $(call my-dir)
Raphael628920b2011-11-22 10:40:13 -08007
Raphaeld2d69992012-01-24 15:06:56 -08008# find_java static library for host (used by find_java.exe and installer)
9# =======================================================================
Raphael628920b2011-11-22 10:40:13 -080010
11include $(CLEAR_VARS)
12
13LOCAL_MODULE := libfindjava
14LOCAL_SRC_FILES := find_java.cpp utils.cpp
15
16LOCAL_CFLAGS += -Wall -Wno-unused-parameter
17LOCAL_CFLAGS += -D_XOPEN_SOURCE -D_GNU_SOURCE -DSH_HISTORY -DUSE_MINGW
18
19include $(BUILD_HOST_STATIC_LIBRARY)
20
21
Raphaeld2d69992012-01-24 15:06:56 -080022# "find_java.exe", to be used from android.bat & co
23# =================================================
Raphael628920b2011-11-22 10:40:13 -080024
Raphael97f3e042011-11-11 18:08:58 -080025include $(CLEAR_VARS)
26
27ifeq ($(HOST_OS),windows)
28
29LOCAL_SRC_FILES := \
30 win_android.cpp
31
Raphaeld2d69992012-01-24 15:06:56 -080032LOCAL_MODULE := find_java
Raphael628920b2011-11-22 10:40:13 -080033LOCAL_STATIC_LIBRARIES := libfindjava
34
Raphael97f3e042011-11-11 18:08:58 -080035LOCAL_CFLAGS += -Wall -Wno-unused-parameter
36LOCAL_CFLAGS += -D_XOPEN_SOURCE -D_GNU_SOURCE -DSH_HISTORY -DUSE_MINGW
Raphael97f3e042011-11-11 18:08:58 -080037
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)
Raphaeld2d69992012-01-24 15:06:56 -080052FIND_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 $@
Raphael97f3e042011-11-11 18:08:58 -080056
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#
Raphaeld2d69992012-01-24 15:06:56 -080062LOCAL_PREBUILT_OBJ_FILES += images/$(FIND_JAVA_ICON_OBJ)
Raphael97f3e042011-11-11 18:08:58 -080063
64include $(BUILD_HOST_EXECUTABLE)
65
66$(call dist-for-goals,droid,$(LOCAL_BUILT_MODULE))
67
68endif
69
70