-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Makefile
54 lines (43 loc) · 1.92 KB
/
Makefile
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
# Get the current date and time in the format YYYYMMDD_HHMMSS
VERSION_STRING := $(shell date +"%Y%m%d_%H%M%S")
CFLAGS ?=
CFLAGS += -Wno-address-of-packed-member -DVERSION_STRING="\"$(VERSION_STRING)\""
SRCS := compat.c msposd.c bmp/bitmap.c bmp/region.c bmp/lib/schrift.c bmp/text.c osd/net/network.c osd/msp/msp.c osd/msp/msp_displayport.c libpng/lodepng.c osd/util/interface.c osd/util/settings.c osd/util/ini_parser.c osd/msp/vtxmenu.c
OUTPUT ?= $(PWD)
BUILD = $(CC) $(SRCS) -I $(SDK)/include -I$(TOOLCHAIN)/usr/include -I$(PWD) -L$(DRV) $(CFLAGS) $(LIB) -levent_core -Os -s $(CFLAGS) -o $(OUTPUT)
VERSION := $(shell git describe --always --dirty)
version.h:
echo "Git version: $(VERSION)"
echo "#ifndef VERSION_H" > version.h
echo "#define VERSION_H" >> version.h
echo "#define GIT_VERSION \"$(VERSION)\"" >> version.h
echo "#endif // VERSION_H" >> version.h
all: version.h
clean:
rm -f *.o msposd msposd_goke msposd_hisi msposd_star6b0 msposd_star6e
goke: version.h
$(eval SDK = ./sdk/gk7205v300)
$(eval CFLAGS += -D__GOKE__)
$(eval LIB = -ldl -ldnvqe -lgk_api -lhi_mpi -lsecurec -lupvqe -lvoice_engine -ldnvqe)
$(BUILD)
hisi: version.h
$(eval SDK = ./sdk/hi3516ev300)
$(eval CFLAGS += -D__GOKE__)
$(eval LIB = -ldnvqe -lmpi -lsecurec -lupvqe -lVoiceEngine)
$(BUILD)
star6b0: version.h
$(eval SDK = ./sdk/infinity6)
$(eval CFLAGS += -D__SIGMASTAR__ -D__INFINITY6__ -D__INFINITY6B0__)
$(eval LIB = -lcam_os_wrapper -lm -lmi_rgn -lmi_sys)
$(BUILD)
star6e: version.h
$(eval SDK = ./sdk/infinity6)
$(eval CFLAGS += -D__SIGMASTAR__ -D__INFINITY6__ -D__INFINITY6E__)
$(eval LIB = -lcam_os_wrapper -lm -lmi_rgn -lmi_sys -lmi_venc)
$(BUILD)
native: version.h
$(eval SDK = ./sdk/gk7205v300)
$(eval CFLAGS += -D_x86)
$(eval LIB = -lcsfml-graphics -lcsfml-window -lcsfml-system `pkg-config --libs cairo x11` -lm)
$(eval BUILD = $(CC) $(SRCS) -I $(SDK)/include -L $(DRV) $(CFLAGS) $(LIB) -levent_core -O0 -g -o $(OUTPUT))
$(BUILD)