-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
69 lines (48 loc) · 1.74 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
VERSION = $(shell git describe --always)
include config.mak
CC ?= gcc
CXX ?= g++
CXXFLAGS ?= -Wall -D__user=
DEFINES += -DRELEASE_VERSION=\"$(VERSION)\" -D__KERNEL_STRICT_NAMES
LBDIR = src
TOOL = ffdecsawrapper
LIBS = -lcrypto -lcrypt -lv4l1 -lpthread
SCDIR = sc/PLUGINS/src
SCLIBS = -Wl,-whole-archive ./sc/PLUGINS/lib/libsc-*.a -Wl,-no-whole-archive \
./sc/PLUGINS/lib/libffdecsawrapper-sc.a
ifneq ($(RELEASE),1)
CXXFLAGS += -g
endif
OBJ := forward.o process_req.o msg_passing.o plugin_getsid.o plugin_ringbuf.o\
plugin_showioctl.o plugin_legacysw.o plugin_dss.o plugin_cam.o \
plugin_ffdecsa.o version.o
OBJ_SC := misc.o dvbdevice.o osdbase.o menuitems.o device.o thread.o \
tools.o sasccam.o log.o compat.o libsi.a
OBJS := $(foreach ob,$(OBJ) $(OBJ_SC), objs/$(ob)) FFdecsa/FFdecsa.o
INCLUDES_SC := -I$(SCDIR) -I./sc/include
INCLUDES_SI := -Isc/include/libsi
OBJ_LIBSI := objs/si_descriptor.o objs/si_section.o objs/si_si.o objs/si_util.o
INC_DEPS := $(shell ls $(LBDIR)/*.h)
INC_DEPS_LB := $(shell ls dvblb_plugins/*.h)
all: $(TOOL)
$(TOOL): $(OBJS) | sc-plugin
$(CXX) $(CXXFLAGS) -o $(TOOL) $(SCLIBS) $(OBJS) $(LIBS)
clean:
@git clean -xfd
distclean:
@git clean -xfd
@git reset --hard HEAD
sc-plugin:
$(MAKE) -C $(SCDIR) CXX=$(CXX) CXXFLAGS=$(SC_FLAGS) STATIC=1 all
FFdecsa/FFdecsa.o:
$(MAKE) -C FFdecsa $(FFDECSA_OPTS)
objs/libsi.a: $(OBJ_LIBSI)
ar ru $@ $(OBJ_LIBSI)
objs/%.o: $(LBDIR)/%.c $(INC_DEPS)
$(CXX) $(CXXFLAGS) -o $@ -c $(DEFINES) -I$(LBDIR) $<
objs/%.o: dvblb_plugins/%.c $(INC_DEPS) $(INC_DEPS_LB)
$(CXX) $(CXXFLAGS) -o $@ -c $(DEFINES) -I$(LBDIR) $<
objs/%.o: sc/%.cpp
$(CXX) $(CXXFLAGS) -o $@ -c $(DEFINES) $(INCLUDES_SC) $<
objs/si_%.o: sc/libsi/%.c
$(CXX) $(CXXFLAGS) -o $@ -c $(DEFINES) $(INCLUDES_SI) $<