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