-
Notifications
You must be signed in to change notification settings - Fork 0
/
rules.mk
67 lines (51 loc) · 1.42 KB
/
rules.mk
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
59
60
61
62
63
64
65
66
67
LOCAL_DIR := $(GET_LOCAL_DIR)
MODULE := $(LOCAL_DIR)
GLOBAL_INCLUDES += $(LOCAL_DIR)
common_SRC_FILES := \
png.c \
pngerror.c \
pngget.c \
pngmem.c \
pngpread.c \
pngread.c \
pngrio.c \
pngrtran.c \
pngrutil.c \
pngset.c \
pngtrans.c \
pngwio.c \
pngwrite.c \
pngwtran.c \
pngwutil.c \
ifneq ($(ARM_WITHOUT_VFP_NEON),true)
my_cflags_arm := -DPNG_ARM_NEON_OPT=2
endif
my_cflags_arm64 := -DPNG_ARM_NEON_OPT=2
# BUG: http://llvm.org/PR19472 - SLP vectorization (on ARM at least) crashes
# when we can't lower a vectorized bswap.
#my_cflags_arm += -fno-slp-vectorize
my_src_files_arm := \
arm/arm_init.c \
arm/filter_neon.S \
arm/filter_neon_intrinsics.c
common_CFLAGS := -std=gnu89 #-fvisibility=hidden ## -fomit-frame-pointer
common_CFLAGS += -Wno-error -Wno-error=implicit-function-declaration
common_C_INCLUDES +=
common_COPY_HEADERS_TO := libpng
common_COPY_HEADERS := png.h pngconf.h pngusr.h
# For the device (static)
# =====================================================
MODULE_SRCS := $(addprefix $(LOCAL_DIR)/, $(common_SRC_FILES))
MODULE_CFLAGS += $(common_CFLAGS) -ftrapv
ifeq ($(ARCH),arm)
MODULE_CFLAGS += $(my_cflags_arm)
MODULE_SRCS += $(addprefix $(LOCAL_DIR)/, $(my_src_files_arm))
endif
ifeq ($(ARCH),arm64)
MODULE_CFLAGS += $(my_cflags_arm64)
MODULE_SRCS += $(addprefix $(LOCAL_DIR)/, $(my_src_files_arm))
endif
MODULE_DEPS := \
lib/ffs \
$(EXTERNAL_MODULES_DIR)/zlib
include make/module.mk