blob: 7ff813f5c245c00c3fa0652c6c4f8d3c74ebc4f4 (
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
|
#
# Makefile for a UPnP profiler plugin
#
# $Id$
#
#
# This is the profile of the profiler plugin. It is used
# to determine how a resource may be accessed.
#
PROFILE = dvb
### The version number of this plugin (taken from the main source file):
VERSION = $(shell grep 'static const char \*VERSION *=' $(PROFILE)Profiler.cpp | awk '{ print $$6 }' | sed -e 's/[";]//g')
### The C++ compiler and options:
CXX ?= g++
CXXFLAGS ?= -g -O3 -Wall -Werror=overloaded-virtual -Wno-parentheses -fPIC
UPNPDIR ?= ../../..
VDRLIBDIR ?= $(UPNPDIR)/../../lib
APIVERSION = $(shell sed -ne '/define UPNPPLUGIN_VERSION/s/^.*"\(.*\)".*$$/\1/p' $(UPNPDIR)/include/plugin.h)
INCLUDES += -I$(UPNPDIR)/include
DEFINES += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
OBJS = $(PROFILE)Profiler.o
LIBS = -L$(VDRLIBDIR) -Wl,-R$(VDRLIBDIR) -lvdr-upnp
all: libupnp-$(PROFILE)-profiler.so
### Implicit rules:
%.o: %.cpp
$(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
### Dependencies:
MAKEDEP = $(CXX) -MM -MG
DEPFILE = .dependencies
$(DEPFILE): Makefile
@$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.cpp) > $@
-include $(DEPFILE)
libupnp-$(PROFILE)-profiler.so: $(OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) $(LIBS) -o $@
@cp --remove-destination $@ $@.$(APIVERSION)
clean:
@-rm -f $(OBJS) $(DEPFILE) *.so *.so.$(APIVERSION) core* *~
|