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
75
76
77
78
79
|
--- a/Makefile
+++ b/Makefile
@@ -41,8 +41,8 @@ CXXFLAGS ?= -g -O2 -W -Wall -Wextra -Wer
### The directory environment:
-VDRDIR ?= ../../..
-LIBDIR ?= ../../lib
+VDRDIR = /usr/local/include/vdr
+LIBDIR = ../lib
TMPDIR ?= /tmp
### Make sure that necessary options are included:
@@ -72,7 +72,7 @@ DEFINES += $(CONFIG) -D_GNU_SOURCE -DPLU
_CFLAGS = $(DEFINES) $(INCLUDES) \
$(shell pkg-config --cflags libavcodec) \
`pkg-config --cflags x11 x11-xcb xcb xcb-xv xcb-shm xcb-dpms xcb-atom\
- xcb-screensaver xcb-randr xcb-glx xcb-icccm xcb-keysyms`\
+ xcb-screensaver xcb-randr xcb-glx xcb-keysyms`\
`pkg-config --cflags gl glu` \
$(if $(findstring USE_VDPAU,$(CONFIG)), \
`pkg-config --cflags vdpau`) \
@@ -88,7 +88,7 @@ override CFLAGS += $(_CFLAGS)
LIBS += -lrt \
$(shell pkg-config --libs libavcodec) \
`pkg-config --libs x11 x11-xcb xcb xcb-xv xcb-shm xcb-dpms xcb-atom\
- xcb-screensaver xcb-randr xcb-glx xcb-icccm xcb-keysyms`\
+ xcb-screensaver xcb-randr xcb-glx xcb-keysyms`\
`pkg-config --libs gl glu` \
$(if $(findstring USE_VDPAU,$(CONFIG)), \
`pkg-config --libs vdpau`) \
@@ -113,7 +113,7 @@ all: libvdr-$(PLUGIN).so i18n
### Dependencies:
-MAKEDEP = $(CC) -MM -MG
+MAKEDEP = $(CC) -MM # # # -MG
DEPFILE = .dependencies
$(DEPFILE): Makefile
@$(MAKEDEP) $(DEFINES) $(INCLUDES) $(SRCS) >$@
@@ -125,7 +125,7 @@ $(OBJS): Makefile
### Internationalization (I18N):
PODIR = po
-LOCALEDIR = $(VDRDIR)/locale
+LOCALEDIR = ../locale
I18Npo = $(wildcard $(PODIR)/*.po)
I18Nmsgs = $(addprefix $(LOCALEDIR)/, $(addsuffix /LC_MESSAGES/vdr-$(PLUGIN).mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file))))))
I18Npot = $(PODIR)/$(PLUGIN).pot
@@ -153,7 +153,11 @@ i18n: $(I18Nmsgs) $(I18Npot)
libvdr-$(PLUGIN).so: $(OBJS) Makefile
$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -fPIC $(OBJS) -o $@ $(LIBS)
+ifdef FREEBSD
+ @cp -f $@ $(LIBDIR)/$@.$(APIVERSION)
+else
@cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION)
+endif
dist: $(I18Npo) clean
@-rm -rf $(TMPDIR)/$(ARCHIVE)
@@ -166,9 +170,17 @@ dist: $(I18Npo) clean
clean:
@-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~ $(PODIR)/*.mo $(PODIR)/*.pot
+#install: libvdr-$(PLUGIN).so
+# cp --remove-destination libvdr-$(PLUGIN).so \
+# /usr/lib/vdr/plugins/libvdr-$(PLUGIN).so.$(APIVERSION)
+
install: libvdr-$(PLUGIN).so
+ifdef FREEBSD
+ ${INSTALL_PROGRAM} libvdr-$(PLUGIN).so $(PREFIX)/lib/vdr/libvdr-$(PLUGIN).so.$(APIVERSION)
+else
cp --remove-destination libvdr-$(PLUGIN).so \
/usr/lib/vdr/plugins/libvdr-$(PLUGIN).so.$(APIVERSION)
+endif
HDRS= $(wildcard *.h)
|