mirror of
https://github.com/jojo61/vdr-plugin-softhdcuvid.git
synced 2025-03-01 10:39:28 +00:00
Reindent all sources to common coding style.
This commit is contained in:
54
Makefile
54
Makefile
@@ -1,6 +1,6 @@
|
||||
#
|
||||
# Makefile for a Video Disk Recorder plugin
|
||||
#
|
||||
#
|
||||
# $Id: 2a41981a57e5e83036463c6a08c84b86ed9d2be3 $
|
||||
|
||||
# The official name of this plugin.
|
||||
@@ -11,13 +11,13 @@
|
||||
### Configuration (edit this for your needs)
|
||||
# comment out if not needed
|
||||
|
||||
# what kind of driver do we make -
|
||||
# what kind of driver do we make -
|
||||
# if VAAPI is enabled the drivername is softhdvaapi
|
||||
# if CUVID is enabled the drivername is softhdcuvid
|
||||
#VAAPI=1
|
||||
CUVID=1
|
||||
|
||||
# use libplacebo - available for both drivers
|
||||
# use libplacebo - available for both drivers
|
||||
#LIBPLACEBO=1
|
||||
|
||||
# use YADIF deint - only available with cuvid
|
||||
@@ -92,7 +92,7 @@ TMPDIR ?= /tmp
|
||||
|
||||
### The compiler options:
|
||||
|
||||
export CFLAGS = $(call PKGCFG,cflags)
|
||||
export CFLAGS = $(call PKGCFG,cflags)
|
||||
export CXXFLAGS = $(call PKGCFG,cxxflags)
|
||||
|
||||
ifeq ($(CFLAGS),)
|
||||
@@ -136,16 +136,16 @@ endif
|
||||
ifeq ($(OPENGL),1)
|
||||
CONFIG += -DUSE_GLX
|
||||
_CFLAGS += $(shell pkg-config --cflags gl glu glew)
|
||||
#LIBS += $(shell pkg-config --libs glu glew)
|
||||
#LIBS += $(shell pkg-config --libs glu glew)
|
||||
_CFLAGS += $(shell pkg-config --cflags freetype2)
|
||||
LIBS += $(shell pkg-config --libs freetype2)
|
||||
endif
|
||||
|
||||
ifeq ($(VAAPI),1)
|
||||
CONFIG += -DVAAPI
|
||||
CONFIG += -DVAAPI
|
||||
#LIBPLACEBO=1
|
||||
PLUGIN = softhdvaapi
|
||||
LIBS += -lEGL
|
||||
LIBS += -lEGL
|
||||
endif
|
||||
|
||||
ifeq ($(LIBPLACEBO),1)
|
||||
@@ -155,7 +155,7 @@ endif
|
||||
ifeq ($(CUVID),1)
|
||||
CONFIG += -DUSE_PIP # PIP support
|
||||
CONFIG += -DCUVID # enable CUVID decoder
|
||||
LIBS += -lEGL -lGL
|
||||
LIBS += -lEGL -lGL
|
||||
ifeq ($(YADIF),1)
|
||||
CONFIG += -DYADIF # Yadif only with CUVID
|
||||
endif
|
||||
@@ -173,7 +173,7 @@ SOFILE = libvdr-$(PLUGIN).so
|
||||
|
||||
|
||||
#
|
||||
# Test that libswresample is available
|
||||
# Test that libswresample is available
|
||||
#
|
||||
#ifneq (exists, $(shell pkg-config libswresample && echo exists))
|
||||
# $(warning ******************************************************************)
|
||||
@@ -182,7 +182,7 @@ SOFILE = libvdr-$(PLUGIN).so
|
||||
#endif
|
||||
|
||||
#
|
||||
# Test and set config for libavutil
|
||||
# Test and set config for libavutil
|
||||
#
|
||||
ifneq (exists, $(shell pkg-config libavutil && echo exists))
|
||||
$(warning ******************************************************************)
|
||||
@@ -193,7 +193,7 @@ _CFLAGS += $(shell pkg-config --cflags libavutil)
|
||||
LIBS += $(shell pkg-config --libs libavutil)
|
||||
|
||||
#
|
||||
# Test and set config for libswscale
|
||||
# Test and set config for libswscale
|
||||
#
|
||||
ifneq (exists, $(shell pkg-config libswscale && echo exists))
|
||||
$(warning ******************************************************************)
|
||||
@@ -233,10 +233,10 @@ endif
|
||||
|
||||
#_CFLAGS += $(shell pkg-config --cflags libavcodec x11 x11-xcb xcb xcb-icccm)
|
||||
#LIBS += -lrt $(shell pkg-config --libs libavcodec x11 x11-xcb xcb xcb-icccm)
|
||||
_CFLAGS += $(shell pkg-config --cflags x11 x11-xcb xcb xcb-icccm)
|
||||
LIBS += -lrt $(shell pkg-config --libs x11 x11-xcb xcb xcb-icccm)
|
||||
_CFLAGS += $(shell pkg-config --cflags x11 x11-xcb xcb xcb-icccm)
|
||||
LIBS += -lrt $(shell pkg-config --libs x11 x11-xcb xcb xcb-icccm)
|
||||
|
||||
_CFLAGS += -I/usr/local/cuda/include
|
||||
_CFLAGS += -I/usr/local/cuda/include
|
||||
_CFLAGS += -I./opengl -I./
|
||||
|
||||
LIBS += -L/usr/lib64
|
||||
@@ -247,10 +247,10 @@ LIBS += -lplacebo -lglut
|
||||
endif
|
||||
|
||||
ifeq ($(CUVID),1)
|
||||
LIBS += -lcuda -L/usr/local/cuda/targets/x86_64-linux/lib -lcudart -lnvcuvid
|
||||
LIBS += -lcuda -L/usr/local/cuda/targets/x86_64-linux/lib -lcudart -lnvcuvid
|
||||
endif
|
||||
|
||||
LIBS += -lGLEW -lGLU -ldl
|
||||
LIBS += -lGLEW -lGLU -ldl
|
||||
### Includes and Defines (add further entries here):
|
||||
|
||||
INCLUDES +=
|
||||
@@ -261,16 +261,16 @@ DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"' -D_GNU_SOURCE $(CONFIG) \
|
||||
### Make it standard
|
||||
|
||||
override CXXFLAGS += $(_CFLAGS) $(DEFINES) $(INCLUDES) \
|
||||
-g -Wextra -Winit-self -Werror=overloaded-virtual -std=c++0x
|
||||
override CFLAGS += $(_CFLAGS) $(DEFINES) $(INCLUDES) \
|
||||
-g -Wextra -Winit-self -Werror=overloaded-virtual -std=c++0x
|
||||
override CFLAGS += $(_CFLAGS) $(DEFINES) $(INCLUDES) \
|
||||
-g -W -Wextra -Winit-self -Wdeclaration-after-statement
|
||||
|
||||
|
||||
### The object files (add further files here):
|
||||
|
||||
OBJS = softhdcuvid.o softhddev.o video.o audio.o codec.o ringbuffer.o
|
||||
OBJS = softhdcuvid.o softhddev.o video.o audio.o codec.o ringbuffer.o
|
||||
ifeq ($(OPENGLOSD),1)
|
||||
OBJS += openglosd.o
|
||||
OBJS += openglosd.o
|
||||
endif
|
||||
|
||||
SRCS = $(wildcard $(OBJS:.o=.c)) softhdcuvid.cpp
|
||||
@@ -290,11 +290,11 @@ $(DEPFILE): Makefile
|
||||
|
||||
### Internationalization (I18N):
|
||||
|
||||
PODIR = po
|
||||
I18Npo = $(wildcard $(PODIR)/*.po)
|
||||
I18Nmo = $(addsuffix .mo, $(foreach file, $(I18Npo), $(basename $(file))))
|
||||
PODIR = po
|
||||
I18Npo = $(wildcard $(PODIR)/*.po)
|
||||
I18Nmo = $(addsuffix .mo, $(foreach file, $(I18Npo), $(basename $(file))))
|
||||
I18Nmsgs = $(addprefix $(DESTDIR)$(LOCDIR)/, $(addsuffix /LC_MESSAGES/vdr-$(PLUGIN).mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file))))))
|
||||
I18Npot = $(PODIR)/$(PLUGIN).pot
|
||||
I18Npot = $(PODIR)/$(PLUGIN).pot
|
||||
|
||||
%.mo: %.po
|
||||
msgfmt -c -o $@ $<
|
||||
@@ -322,7 +322,7 @@ $(OBJS): Makefile
|
||||
|
||||
|
||||
$(SOFILE): $(OBJS) shaders.h
|
||||
$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) $(LIBS) -o $@
|
||||
$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) $(LIBS) -o $@
|
||||
|
||||
install-lib: $(SOFILE)
|
||||
install -D $^ $(DESTDIR)$(LIBDIR)/$^.$(APIVERSION)
|
||||
@@ -343,13 +343,11 @@ clean:
|
||||
|
||||
## Private Targets:
|
||||
|
||||
HDRS= $(wildcard *.h)
|
||||
HDRS= $(wildcard *.h)
|
||||
|
||||
indent:
|
||||
for i in $(SRCS) $(HDRS); do \
|
||||
indent $$i; \
|
||||
unexpand -a $$i | sed -e s/constconst/const/ > $$i.up; \
|
||||
mv $$i.up $$i; \
|
||||
done
|
||||
|
||||
video_test: video.c Makefile
|
||||
|
||||
Reference in New Issue
Block a user