-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
65 lines (51 loc) · 1.57 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
#
# Makefile
#
# See the README file for copyright information and how to reach the author.
#
#
EPGD_SRC ?= ../..
include $(EPGD_SRC)/Make.config
PLUGIN = tvm
VERSION = $(shell grep 'define TVM_VERSION ' $(PLUGIN).h | awk '{ print $$3 }' | sed -e 's/[";]//g')
ARCHIVE = $(PLUGIN)-$(VERSION)-$(shell date +%Y%m%d-%H%M)
SOFILE = libepgd-tvm.so
OBJS = tvm.o
CFLAGS += -I$(EPGD_SRC) -Wno-long-long
all: $(SOFILE)
$(SOFILE): $(OBJS)
$(CC) $(CFLAGS) -shared $(OBJS) $(LIBS) -o $@
extst: xmltest.c
g++ -ggdb -I$(EPGD_SRC) $(EPGD_SRC)/lib/common.c $(EPGD_SRC)/lib/config.c -lpthread xmltest.c -o extst
install: $(SOFILE) install-config
install -D $(SOFILE) $(_PLGDEST)/
clean:
@-rm -f $(OBJS) core* *~ *.so extst *.xml
rm -f ./configs/*~
rm -f tvm-*.tgz
install-config:
if ! test -d $(CONFDEST); then \
mkdir -p $(CONFDEST); \
chmod a+rx $(CONFDEST); \
fi
for i in `ls ./configs/tvmovie*.xsl`; do\
if ! test -f "$(CONFDEST)/$$i"; then\
install --mode=644 -D "$$i" $(CONFDEST)/; \
fi;\
done;
for i in `ls ./configs/tvmovie*.xml`; do\
if ! test -f "$(CONFDEST)/$$i"; then\
install --mode=644 -D "$$i" $(CONFDEST)/; \
fi;\
done;
dist: clean
@-rm -rf $(TMPDIR)/$(ARCHIVE)
@mkdir $(TMPDIR)/$(ARCHIVE)
@cp -a * $(TMPDIR)/$(ARCHIVE)
@tar czf $(ARCHIVE).tgz -C $(TMPDIR) $(ARCHIVE)
@-rm -rf $(TMPDIR)/$(ARCHIVE)
@echo Distribution package created as $(ARCHIVE).tgz
#***************************************************************************
# dependencies
#***************************************************************************
tvm.o : tvm.c tvm.h