ronnie
2022-10-14 1504bb53e29d3d46222c0b3ea994fc494b48e153
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#
# 1. Set the path and clear environment
#     TARGET_PATH := $(call my-dir)
#     include $(ENV_CLEAR)
#
# 2. Set the source files and headers files
#    TARGET_SRC := xxx_1.c xxx_2.c
#    TARGET_INC := xxx_1.h xxx_2.h
#
# 3. Set the output target
#    TARGET_MODULE := xxx
#
# 4. Include the main makefile
#    include $(BUILD_BIN)
#
# Before include the build makefile, you can set the compilaion
# flags, e.g. TARGET_ASFLAGS TARGET_CFLAGS TARGET_CPPFLAGS
#
TARGET_PATH := $(call my-dir)
 
#########################################
include $(ENV_CLEAR)
 
include $(TARGET_TOP)/middleware/config/mpp_config.mk
 
ifeq ($(MPPCFG_COMPILE_DYNAMIC_LIB), Y)
 
include $(TARGET_PATH)/../config.mk
 
TARGET_SRC := \
   pixel_format.c \
   fbm.c \
   vdecoder.c \
   sbm/sbmStream.c \
   sbm/sbmFrameBase.c \
   sbm/sbmFrameH264.c \
   sbm/sbmFrameH265.c
 
TARGET_INC := \
   $(TARGET_PATH) \
   $(TARGET_PATH)/include \
   $(TARGET_PATH)/../include \
   $(TARGET_PATH)/../ve/include \
   $(TARGET_PATH)/../base/include
 
TARGET_SHARED_LIB := \
    libVE \
    libcdc_base \
    libvideoengine \
    libMemAdapter
 
TARGET_CFLAGS += -fPIC -Wall -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unused-function
 
SHARED_LIBS_PATHS := -L$(TARGET_PATH)/../ve/
TARGET_LDFLAGS := -shared -ldl $(SHARED_LIBS_PATHS)
 
TARGET_MODULE := libvdecoder
 
include $(BUILD_SHARED_LIB)
 
endif
 
 
ifeq ($(MPPCFG_COMPILE_STATIC_LIB), Y)
include $(ENV_CLEAR)
 
include $(TARGET_PATH)/../config.mk
 
TARGET_SRC := \
   pixel_format.c \
   fbm.c \
   vdecoder.c \
   sbm/sbmStream.c \
   sbm/sbmFrameBase.c \
   sbm/sbmFrameH264.c \
   sbm/sbmFrameH265.c
 
TARGET_INC := \
   $(TARGET_PATH) \
   $(TARGET_PATH)/include \
   $(TARGET_PATH)/../include \
   $(TARGET_PATH)/../ve/include \
   $(TARGET_PATH)/../base/include
 
TARGET_CFLAGS += -fPIC -Wall -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unused-function
 
TARGET_MODULE := libvdecoder
 
include $(BUILD_STATIC_LIB)
 
endif