Talustus | 3019a91 | 2013-04-06 11:50:07 +0200 | [diff] [blame] | 1 | # Makefile for Android to build fb2png |
| 2 | # |
| 3 | # Copyright (C) 2012 Kyan <kyan.ql.he@gmail.com> |
| 4 | # |
| 5 | # This program is free software; you can redistribute it and/or modify |
| 6 | # it under the terms of the GNU General Public License as published by |
| 7 | # the Free Software Foundation; either version 2 of the License, or |
| 8 | # (at your option) any later version. |
| 9 | # |
| 10 | # This program is distributed in the hope that it will be useful, |
| 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | # GNU General Public License for more details. |
| 14 | # |
| 15 | # You should have received a copy of the GNU General Public License along |
| 16 | # with this program; if not, write to the Free Software Foundation, Inc., |
| 17 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 18 | # |
| 19 | |
| 20 | #Ported to CWM source for PhilZ Touch recovery |
| 21 | #Special thanks to talustus for his help in cross compiling and the Makefile |
| 22 | #Thanks to McKael @xda for his help in fixing for Nexus 4 |
| 23 | |
| 24 | LOCAL_PATH:= $(call my-dir) |
| 25 | |
| 26 | # We need to build this for both the device (as a shared library) |
| 27 | # and the host (as a static library for tools to use). |
| 28 | |
| 29 | # <-- Build libpng |
| 30 | include $(CLEAR_VARS) |
| 31 | |
| 32 | LOCAL_MODULE := libpng |
| 33 | LOCAL_SRC_FILES := libpng/lib/libpng.a |
| 34 | |
| 35 | include $(PREBUILT_STATIC_LIBRARY) |
| 36 | # --> |
| 37 | |
| 38 | |
| 39 | # <-- Build libfb2png |
| 40 | include $(CLEAR_VARS) |
| 41 | |
| 42 | LOCAL_MODULE := libfb2png |
| 43 | LOCAL_SRC_FILES := \ |
| 44 | fb2png.c \ |
| 45 | img_process.c \ |
| 46 | fb.c |
| 47 | |
| 48 | LOCAL_C_INCLUDES +=\ |
| 49 | external/libpng\ |
| 50 | external/zlib |
| 51 | |
| 52 | LOCAL_CFLAGS += -DANDROID |
| 53 | LOCAL_STATIC_LIBRARIES := libpng libz |
| 54 | |
| 55 | include $(BUILD_STATIC_LIBRARY) |
| 56 | # --> |
| 57 | |
| 58 | |
| 59 | # <-- Build fb2png bin |
| 60 | include $(CLEAR_VARS) |
| 61 | |
| 62 | LOCAL_SRC_FILES := main.c |
| 63 | LOCAL_MODULE := fb2png |
| 64 | LOCAL_FORCE_STATIC_EXECUTABLE := true |
| 65 | LOCAL_MODULE_TAGS := eng |
| 66 | LOCAL_CFLAGS += -DANDROID |
| 67 | LOCAL_STATIC_LIBRARIES := libfb2png libpng libz libc |
| 68 | |
| 69 | LOCAL_C_INCLUDES +=\ |
| 70 | external/libpng\ |
| 71 | external/zlib |
| 72 | |
| 73 | LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES |
| 74 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin |
Iftekhar Rifat | 0543f06 | 2015-10-18 22:22:51 +0600 | [diff] [blame] | 75 | LOCAL_PACK_MODULE_RELOCATIONS := false |
Talustus | 3019a91 | 2013-04-06 11:50:07 +0200 | [diff] [blame] | 76 | |
| 77 | include $(BUILD_EXECUTABLE) |
| 78 | # --> |