slang: revert parallelized build
[ipfire-2.x.git] / lfs / vdr_dvbapi
CommitLineData
d1dee6c1
MT
1###############################################################################
2# #
3# IPFire.org - A linux based firewall #
eee037b8 4# Copyright (C) 2007-2018 IPFire Team <info@ipfire.org> #
d1dee6c1
MT
5# #
6# This program is free software: you can redistribute it and/or modify #
7# it under the terms of the GNU General Public License as published by #
8# the Free Software Foundation, either version 3 of the License, or #
9# (at your option) any later version. #
10# #
11# This program is distributed in the hope that it will be useful, #
12# but WITHOUT ANY WARRANTY; without even the implied warranty of #
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
14# GNU General Public License for more details. #
15# #
16# You should have received a copy of the GNU General Public License #
17# along with this program. If not, see <http://www.gnu.org/licenses/>. #
18# #
19###############################################################################
20
21###############################################################################
22# Definitions
23###############################################################################
24
25include Config
26
27VER = 1.0.6
6e903b7f
MT
28SUP_ARCHES =
29
d1dee6c1
MT
30THISAPP = vdr-plugin-dvbapi-$(VER)
31DL_FILE = $(THISAPP).tar.gz
32
33DL_FROM = $(URL_IPFIRE)
34DIR_APP = $(DIR_SRC)/$(THISAPP)
35TARGET = $(DIR_INFO)/$(THISAPP)
36PROG = vdr_dvbapi
37PAK_VER = 1
38
39DEPS = ""
40
41VDRPLUGVER = 2.0.0
42
43EXTRA_FLAGS= -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
44CFLAGS += $(EXTRA_FLAGS)
45CXXFLAGS += $(EXTRA_FLAGS)
46
47CSAFLAGS = -O3 -fexpensive-optimizations -funroll-loops
48CSAFLAGS-sse = $(CSAFLAGS) -mmmx -msse -msse2 -msse3
49PARALLEL = PARALLEL_64_LONG
50PARALLEL-sse = PARALLEL_128_SSE2
51
52define BUILD
53 cp -a $(DIR_APP) $(DIR_APP)-build$(1)
54 cd $(DIR_APP)-build$(1) && make $(MAKE_TUNING) LIBDIR=. VDRDIR=/usr/lib/vdr \
55 CFLAGS="$(CFLAGS$(1))" CXXFLAGS="$(CXXFLAGS$(1))" \
56 CSAFLAGS="$(CSAFLAGS$(1))" PARALLEL="$(PARALLEL$(1))" \
57 LOCALEDIR=$$(pwd)/locale all
58
59 -mkdir -pv /etc/vdr/plugins/dvbapi
60 cd $(DIR_APP)-build$(1) && install -m 755 libvdr-dvbapi.so \
61 /usr/lib/vdr/libvdr-dvbapi.so.$(VDRPLUGVER)$(1)
62endef
63
64
65###############################################################################
66# Top-level Rules
67###############################################################################
68
69objects = $(DL_FILE)
70
71$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
72
73$(DL_FILE)_MD5 = 6a8024b2970beba8eadc1acaa86805e7
74
75install : $(TARGET)
76
77check : $(patsubst %,$(DIR_CHK)/%,$(objects))
78
79download : $(patsubst %,$(DIR_DL)/%,$(objects))
80
81md5 : $(subst %,%_MD5,$(objects))
82
83dist:
84 @$(PAK)
85
86###############################################################################
87# Downloading, checking, md5sum
88###############################################################################
89
90$(patsubst %,$(DIR_CHK)/%,$(objects)) :
91 @$(CHECK)
92
93$(patsubst %,$(DIR_DL)/%,$(objects)) :
94 @$(LOAD)
95
96$(subst %,%_MD5,$(objects)) :
97 @$(MD5)
98
99###############################################################################
100# Installation Details
101###############################################################################
102
103$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
104 @$(PREBUILD)
105 @rm -rf $(DIR_APP)* && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
106
dc7d6b20 107ifeq "$(BUILD_ARCH)" "i586"
d1dee6c1
MT
108 # Build an SSE enabled version.
109 $(call BUILD,-sse)
110endif
111
112 # Build normal version.
113 $(call BUILD)
114
115 echo "#" > /etc/sysconfig/vdr-plugins.d/dvbapi.conf
116 echo "# Command line parameters for vdr-plugin-dvbapi" >> /etc/sysconfig/vdr-plugins.d/dvbapi.conf
117 echo "#" >> /etc/sysconfig/vdr-plugins.d/dvbapi.conf
118 echo "# For more details see:" >> /etc/sysconfig/vdr-plugins.d/dvbapi.conf
119 echo "# - \`vdr --help -Pdvbapi\`" >> /etc/sysconfig/vdr-plugins.d/dvbapi.conf
120 echo "PLUGIN_OPTIONS=\"\"" >> /etc/sysconfig/vdr-plugins.d/dvbapi.conf
121
122 @rm -rf $(DIR_APP)*
123 @$(POSTBUILD)