Support duo4kse.
[vuplus_dvbapp] / main / Makefile.am
1 AM_CPPFLAGS = \
2         -I$(top_srcdir) \
3         -I$(top_srcdir)/include \
4         -include Python.h \
5         -include $(top_builddir)/enigma2_config.h
6
7 AM_CXXFLAGS = \
8         $(LIBSDL_CFLAGS)
9
10 bin_PROGRAMS = enigma2
11
12 enigma2_SOURCES = \
13         bsod.cpp \
14         bsod.h \
15         enigma.cpp \
16         xmlgenerator.cpp \
17         xmlgenerator.h \
18         version_info.cpp \
19         version_info.h \
20         version.h
21
22 EXTRA_DIST = \
23         enigma-dvbtest.cpp \
24         enigma-gdi.cpp \
25         enigma-gui.cpp \
26         enigma-playlist.cpp \
27         enigma-scan.cpp
28
29 enigma2_LDADD_WHOLE = \
30         $(top_builddir)/lib/actions/libenigma_actions.a \
31         $(top_builddir)/lib/base/libenigma_base.a \
32         $(top_builddir)/lib/components/libenigma_components.a \
33         $(top_builddir)/lib/driver/libenigma_driver.a \
34         $(top_builddir)/lib/mmi/libenigma_mmi.a \
35         $(top_builddir)/lib/dvb/libenigma_dvb.a \
36         $(top_builddir)/lib/dvb_ci/libenigma_dvb_ci.a \
37         $(top_builddir)/lib/gdi/libenigma_gdi.a \
38         $(top_builddir)/lib/gui/libenigma_gui.a \
39         $(top_builddir)/lib/python/libenigma_python.a \
40         $(top_builddir)/lib/nav/libenigma_nav.a \
41         $(top_builddir)/lib/service/libenigma_service.a
42
43 enigma2_LDADD = \
44         @BASE_LIBS@ \
45         @LIBGIF_LIBS@ \
46         @LIBJPEG_LIBS@ \
47         @LIBVUGLES2_LIBS@ \
48         @LIBSDL_LIBS@ \
49         @LIBXINE_LIBS@ \
50         @LIBXMLCCWRAP_LIBS@ \
51         @PTHREAD_LIBS@ \
52         @PYTHON_LDFLAGS@
53
54 enigma2_LDFLAGS = -Wl,--export-dynamic
55
56 if HAVE_GIT_DIR
57 GIT_DIR = $(top_srcdir)/.git
58 GIT = git --git-dir=$(GIT_DIR)
59
60 if HAVE_FAKE_GIT_DIR
61 ENIGMA2_COMMIT_DATE = `grep '^CommitDate:' $(GIT_DIR)/last_commit_info | cut -d' ' -f2`
62 ENIGMA2_BRANCH = `cat $(GIT_DIR)/branch`
63 else
64 ENIGMA2_COMMIT_DATE = `$(GIT) log --no-color -n 1 --pretty=format:%cd --date=short`
65 ENIGMA2_BRANCH = `$(GIT) branch --no-color 2>/dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'`
66 ENIGMA2_REV = `$(GIT) describe --abbrev=7 --always --long --tags`
67 endif
68 endif
69
70 BUILT_SOURCES = version-intermediate.h
71 .INTERMEDIATE: version-intermediate.h
72 .PHONY: version-intermediate.h
73 version-intermediate.h:
74         $(AM_V_GEN)touch $@
75         -$(AM_V_at)[ -n "$(ENIGMA2_COMMIT_DATE)" ] && echo "#define ENIGMA2_COMMIT_DATE \"$(ENIGMA2_COMMIT_DATE)\"" >> $@
76         -$(AM_V_at)[ -n "$(ENIGMA2_BRANCH)" ] && echo "#define ENIGMA2_BRANCH \"$(ENIGMA2_BRANCH)\"" >> $@
77         -$(AM_V_at)[ -n "$(ENIGMA2_REV)" ] && echo "#define ENIGMA2_REV \"$(ENIGMA2_REV)\"" >> $@
78         $(AM_V_at)([ -f version.h ] && diff -q version.h $@ >/dev/null) || $(INSTALL_HEADER) $@ version.h
79
80 enigma2$(EXEEXT): $(enigma2_OBJECTS) $(enigma2_DEPENDENCIES) $(enigma2_LDADD_WHOLE)
81         $(AM_V_CXXLD)$(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ $(enigma2_LDFLAGS) $(enigma2_OBJECTS) \
82                 -Wl,--whole-archive $(enigma2_LDADD_WHOLE) -Wl,--no-whole-archive $(enigma2_LDADD) $(LIBS)