aboutsummaryrefslogtreecommitdiffstats
path: root/find_lock/Android.mk
blob: 2fd596b85b69079ea163869da093ccd9a175efe0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Copyright 2011 The Android Open Source Project
#
# Android.mk for find_lock.exe & static library


LOCAL_PATH := $(call my-dir)

# "find_lock.exe"
# ===============

include $(CLEAR_VARS)

ifeq ($(HOST_OS),windows)

LOCAL_SRC_FILES := \
	find_lock.cpp \
	find_lock_exe.cpp

LOCAL_MODULE := find_lock
LOCAL_STATIC_LIBRARIES := libfindjava

LOCAL_CFLAGS += -Wall -Wno-unused-parameter
LOCAL_CFLAGS += -D_XOPEN_SOURCE -D_GNU_SOURCE -DSH_HISTORY -DUSE_MINGW
LOCAL_CFLAGS += -I$(TOPDIR)sdk/find_java

LOCAL_MODULE_TAGS := optional

# Locate windres executable
WINDRES := windres
ifneq ($(USE_MINGW),)
  # When building the Windows resources under Linux, use the MinGW one
  WINDRES := i586-mingw32msvc-windres
endif

# Link the Windows icon file as well into the executable, based on the technique
# used in external/qemu/Makefile.android.  The variables need to have different
# names to not interfere with the ones from qemu/Makefile.android.
#
INTERMEDIATE         := $(call intermediates-dir-for,EXECUTABLES,$(LOCAL_MODULE),true)
FIND_LOCK_ICON_OBJ  := find_lock_icon.o
FIND_LOCK_ICON_PATH := $(LOCAL_PATH)/images
$(FIND_LOCK_ICON_PATH)/$(FIND_LOCK_ICON_OBJ): $(FIND_LOCK_ICON_PATH)/android_icon.rc
	$(WINDRES) $< -I $(FIND_LOCK_ICON_PATH) -o $@

# seems to be the only way to add an object file that was not generated from
# a C/C++/Java source file to our build system. and very unfortunately,
# $(TOPDIR)/$(LOCALPATH) will always be prepended to this value, which forces
# us to put the object file in the source directory...
#
LOCAL_PREBUILT_OBJ_FILES += images/$(FIND_LOCK_ICON_OBJ)

include $(BUILD_HOST_EXECUTABLE)

$(call dist-for-goals,droid,$(LOCAL_BUILT_MODULE))

endif