Add "rt" to libraries
[openblackhole/openblackhole-enigma2.git] / 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/network/libenigma_network.a \
42         $(top_builddir)/lib/service/libenigma_service.a
43
44 enigma2_LDADD = \
45         @BASE_LIBS@ \
46         @LIBGIF_LIBS@ \
47         @LIBJPEG_LIBS@ \
48         @LIBSDL_LIBS@ \
49         @LIBXINE_LIBS@ \
50         @LIBXMLCCWRAP_LIBS@ \
51         @PTHREAD_LIBS@ \
52         @PYTHON_LDFLAGS@ \
53         @LIBDDVD_LIBS@ \
54         -ltuxtxt -ltuxtxt32bpp -lcrypt -lrt
55
56 enigma2_LDFLAGS = -Wl,--export-dynamic
57
58 if HAVE_GIT_DIR
59 GIT_DIR = $(top_srcdir)/.git
60 GIT = git --git-dir=$(GIT_DIR)
61
62 if HAVE_FAKE_GIT_DIR
63 ENIGMA2_COMMIT_DATE = `grep '^CommitDate:' $(GIT_DIR)/last_commit_info | cut -d' ' -f2`
64 ENIGMA2_BRANCH = `cat $(GIT_DIR)/branch`
65 else
66 ENIGMA2_COMMIT_DATE = `$(GIT) log --no-color -n 1 --pretty=format:%cd --date=short`
67 ENIGMA2_BRANCH = `$(GIT) branch --no-color 2>/dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'`
68 ENIGMA2_REV = `$(GIT) describe --abbrev=7 --always --long --tags`
69 endif
70 endif
71
72 BUILT_SOURCES = version-intermediate.h
73 .INTERMEDIATE: version-intermediate.h
74 .PHONY: version-intermediate.h
75 version-intermediate.h:
76         $(AM_V_GEN)touch $@
77         -$(AM_V_at)[ -n "$(ENIGMA2_COMMIT_DATE)" ] && echo "#define ENIGMA2_COMMIT_DATE \"$(ENIGMA2_COMMIT_DATE)\"" >> $@
78         -$(AM_V_at)[ -n "$(ENIGMA2_BRANCH)" ] && echo "#define ENIGMA2_BRANCH \"$(ENIGMA2_BRANCH)\"" >> $@
79         -$(AM_V_at)[ -n "$(ENIGMA2_REV)" ] && echo "#define ENIGMA2_REV \"$(ENIGMA2_REV)\"" >> $@
80         $(AM_V_at)([ -f version.h ] && diff -q version.h $@ >/dev/null) || $(INSTALL_HEADER) $@ version.h
81
82 enigma2$(EXEEXT): $(enigma2_OBJECTS) $(enigma2_DEPENDENCIES) $(enigma2_LDADD_WHOLE)
83         $(AM_V_CXXLD)$(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ $(enigma2_LDFLAGS) $(enigma2_OBJECTS) \
84                 -Wl,--whole-archive $(enigma2_LDADD_WHOLE) -Wl,--no-whole-archive $(enigma2_LDADD) $(LIBS)