blob: b60af0f9af5d594d65a07b9906b4c98d5d2f5779 (
plain)
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
|
# Make.config
#
# See the README file for copyright information and how to reach the author.
#
#
# user defined stuff
PREFIX = /usr/local
# enable AUX patch, in VDR >= 2.3.4 not needed!
#WITH_AUX_PATCH = 1
# enable graphtftng and/or pin plugin support if autodetection below don't work
#WITH_GTFT = 1
#WITH_PIN = 1
DEBUG = 1
#USE_CLANG = 1
# set python interpreter
PYTHON ?= python
# -----------------------
# don't touch below ;)
ifdef USE_CLANG
CC = clang++
else
CC = g++
endif
doCompile = $(CC) -c $(CFLAGS) $(DEFINES)
doLink = $(CC) $(LFLAGS)
doLib = ar -rs
USEPYTHON = 1
USEEPGS = 1
ifdef USEPYTHON
ifeq ($(shell $(PYTHON) -c 'from __future__ import print_function; import sys; sys.exit(0) if sys.version_info[:2] < (3,8) else print(1)'), 1)
PYTHON_LIBS = $(shell $(PYTHON)-config --libs --embed)
else
PYTHON_LIBS = $(shell $(PYTHON)-config --libs)
endif
LIBS += $(PYTHON_LIBS)
BASELIBS += $(PYTHON_LIBS)
CXXFLAGS += $(shell $(PYTHON)-config --includes)
endif
USES = -DVDR_PLUGIN -DUSEUUID -DUSEMD5 -DUSEJSON -DUSEGUNZIP -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
ifdef DEBUG
CXXFLAGS += -ggdb -O0
endif
CXXFLAGS += -fPIC -Wreturn-type -Wall -Wno-parentheses -Wformat -pedantic \
-Wno-long-long -Wunused-variable -Wunused-label -Wno-unused-result \
-Wunused-value -Wunused-function -Wno-variadic-macros \
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
CXXFLAGS += -std=c++11 -D__STDC_FORMAT_MACROS
ifdef USE_CLANG
CXXFLAGS += -x c++ -Wunused-const-variable
else
CXXFLAGS += -Wunused-but-set-variable
endif
DEFINES += -D__STL_CONFIG_H
CFLAGS += $(CXXFLAGS)
%.o: %.c
$(doCompile) -o $@ $<
|