# 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 pin plugin support if autodetection below don't work #WITH_PIN = 1 DEBUG = 1 # ------------------ # internals SQLCFG = mariadb_config ifdef MYSQL SQLCFG = mysql_config endif #USE_CLANG = 1 # set python interpreter PYTHON ?= python 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 $@ $<