blob: e82495d515f5d337cf327f2dd6d4a644844829d4 [file] [log] [blame]
Talustus3019a912013-04-06 11:50:07 +02001# 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
24LOCAL_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
30include $(CLEAR_VARS)
31
32LOCAL_MODULE := libpng
33LOCAL_SRC_FILES := libpng/lib/libpng.a
34
35include $(PREBUILT_STATIC_LIBRARY)
36# -->
37
38
39# <-- Build libfb2png
40include $(CLEAR_VARS)
41
42LOCAL_MODULE := libfb2png
43LOCAL_SRC_FILES := \
44 fb2png.c \
45 img_process.c \
46 fb.c
47
48LOCAL_C_INCLUDES +=\
49 external/libpng\
50 external/zlib
51
52LOCAL_CFLAGS += -DANDROID
53LOCAL_STATIC_LIBRARIES := libpng libz
54
55include $(BUILD_STATIC_LIBRARY)
56# -->
57
58
59# <-- Build fb2png bin
60include $(CLEAR_VARS)
61
62LOCAL_SRC_FILES := main.c
63LOCAL_MODULE := fb2png
64LOCAL_FORCE_STATIC_EXECUTABLE := true
65LOCAL_MODULE_TAGS := eng
66LOCAL_CFLAGS += -DANDROID
67LOCAL_STATIC_LIBRARIES := libfb2png libpng libz libc
68
69LOCAL_C_INCLUDES +=\
70 external/libpng\
71 external/zlib
72
73LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
74LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
Iftekhar Rifat0543f062015-10-18 22:22:51 +060075LOCAL_PACK_MODULE_RELOCATIONS := false
Talustus3019a912013-04-06 11:50:07 +020076
77include $(BUILD_EXECUTABLE)
78# -->