-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile_8mp
executable file
·66 lines (47 loc) · 1.64 KB
/
Makefile_8mp
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
PROGRAM=test_dec_arm_elinux
ENC_PROGRAM=test_enc_arm_elinux
LIBRARY=./release/lib/lib_vpu_wrapper
CC ?= gcc
LN ?= $(CC)
AS ?= as
AR ?= =ar
CFLAGS= -O2 -Wall
INCLUDES= -I. -I$(SDKTARGETSYSROOT)/usr/include/hantro_dec -I$(SDKTARGETSYSROOT)/usr/include/hantro_enc -I/opt/fsl-imx-xwayland/5.4-zeus/sysroots/aarch64-poky-linux/usr/include -I/usr/include
AFLAGS=
LFLAGS=-lm -lfslvpuwrap -lcodec -lhantro -lhantro_vc8000e
#CFLAGS+=-DUSE_VPU_WRAPPER_TIMER
#CFLAGS+=-DVPU_WRAPPER_DEBUG
CFLAGS+=-DDEC_STREAM_DEBUG
CFLAGS+=-DENC_STREAM_DEBUG
CFLAGS+=-DAPP_DEBUG
CFLAGS+=-DFB_RENDER_DEBUG
CFLAGS+= -DSET_OUTPUT_CROP_RECT -DUSE_EXTERNAL_BUFFER -DVSI_API -DENABLE_CODEC_VP8
CFLAGS+= -DENCVC8000E -DOMX_ENCODER_VIDEO_DOMAIN -DENABLE_HANTRO_ENC
CFLAGS+= -DUSE_IMX8MP
LIB_OBJS=vpu_wrapper_hantro.o vpu_wrapper_timer.o
LIB_OBJS +=utils.o
APP_OBJS=test_dec_arm_elinux.o decode_stream.o
APP_OBJS+=fb_render.o
ENC_APP_OBJS=test_enc_arm_elinux.o encode_stream.o vpu_wrapper_hantro_VCencoder.o
all: EXE ENC_EXE
@echo "--- Build-all done for vpu wrapper ---"
LIBRARY: $(LIB_OBJS)
mkdir -p ./release/lib
$(AR) -r $(LIBRARY).a $(LIB_OBJS)
$(LN) -o $(LIBRARY).so --shared -fpic $(LIB_OBJS)
#$(LN) -o $(LIBRARY).so -shared -nostartfiles $(LIB_OBJS)
EXE: $(APP_OBJS) LIBRARY
$(LN) -o $(PROGRAM) $(LFLAGS) $(APP_OBJS) $(LIBRARY).a
ENC_EXE: $(ENC_APP_OBJS) LIBRARY
$(LN) -o $(ENC_PROGRAM) $(LFLAGS) $(ENC_APP_OBJS) $(LIBRARY).a
%.o: %.c
#$(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<
$(CC) -fPIC $(CFLAGS) $(INCLUDES) -c -o $@ $<
clean:
rm -rf $(LIB_OBJS)
rm -rf $(APP_OBJS)
rm -rf $(ENC_APP_OBJS)
rm -rf $(LIBRARY).a
rm -rf $(LIBRARY).so
rm -rf $(PROGRAM)
rm -rf $(ENC_PROGRAM)