Merge commit 'aba0cdf8718a41a4ac3397131b45d272d119d60b' into megamerge (mostly)
[openblackhole/openblackhole-enigma2.git] / main / Makefile.am
1 INCLUDES = \
2         -I$(top_srcdir)/include
3
4 bin_PROGRAMS = enigma2
5
6 enigma2_SOURCES = \
7         enigma.cpp bsod.cpp
8
9 CLEANFILES = version.h
10
11 bsod.o: version.h
12
13 enigma.o: version.h
14
15 # when there is no ../CVS/Entries, don't worry.
16 ../CVS/Entries:
17
18 ../CVS/Root:
19
20 .PHONY: .svn/entries
21
22 entries: .svn/entries
23         @if [ ! -f entries ]; then touch entries; fi
24         @if [ -f .svn/entries ] && ! diff -q entries .svn/entries 2>/dev/null; then     \
25                 cp --no-preserve=mode .svn/entries entries;                             \
26         fi;
27
28 version.h: entries
29         > version.h
30         @if [ -d .svn ]; then \
31                 echo "#define ENIGMA2_LAST_CHANGE_DATE \"`LANG="en" svn info | grep 'Last Changed Date:' | cut -d' ' -f4`\"" >> version.h; \
32         elif [ -d ../.git ]; then \
33                 if [ -f ../.git/last_commit_info ]; then \
34                         echo "#define ENIGMA2_LAST_CHANGE_DATE \"`cat ../.git/last_commit_info | grep 'Date:' | cut -d' ' -f4`\"" >> version.h; \
35                         echo "#define ENIGMA2_BRANCH \"`cat ../.git/branch`\"" >> version.h; \
36                 else \
37                         echo "#define ENIGMA2_LAST_CHANGE_DATE \"`LANG="en" git log --max-count=1 --date=short | grep 'Date:' | cut -d' ' -f4`\"" >> version.h; \
38                         echo "#define ENIGMA2_BRANCH \"`LANG="en" git branch | grep '* ' | cut -d' ' -f2`\"" >> version.h; \
39                 fi; \
40         fi;
41
42 enigma2_LDADD_WHOLE = \
43         $(top_builddir)/lib/actions/libenigma_actions.a \
44         $(top_builddir)/lib/base/libenigma_base.a \
45         $(top_builddir)/lib/components/libenigma_components.a \
46         $(top_builddir)/lib/driver/libenigma_driver.a \
47         $(top_builddir)/lib/mmi/libenigma_mmi.a \
48         $(top_builddir)/lib/dvb/libenigma_dvb.a \
49         $(top_builddir)/lib/dvb_ci/libenigma_dvb_ci.a \
50         $(top_builddir)/lib/gdi/libenigma_gdi.a \
51         $(top_builddir)/lib/gui/libenigma_gui.a \
52         $(top_builddir)/lib/python/libenigma_python.a \
53         $(top_builddir)/lib/nav/libenigma_nav.a \
54         $(top_builddir)/lib/service/libenigma_service.a
55
56 #PLi change:
57 enigma2_LDADD_WHOLE += $(top_builddir)/lib/network/libenigma_network.a
58
59 enigma2_LDADD = \
60         @FREETYPE_LIBS@ \
61         @ID3TAG_LIBS@ \
62         @MAD_LIBS@ \
63         @PNG_LIBS@ \
64         @SDL_LIBS@ \
65         @SIGC_LIBS@ \
66         @DVBSI_LIBS@ \
67         @FRIBIDI_LIBS@ \
68         @GSTREAMER_LIBS@ \
69         @GSTREAMERPBUTILS_LIBS@ \
70         @JPEG_LIBS@ \
71         @LIBUNGIF_LIBS@ \
72         @XML2_LIBS@ \
73         @XMLCCWRAP_LIBS@ \
74         -ldl -lpthread -lcrypt -lresolv -lrt -ltuxtxt32bpp
75
76 enigma2$(EXEEXT): $(enigma2_OBJECTS) $(enigma2_DEPENDENCIES) $(enigma2_LDADD_WHOLE)
77 #       @rm -f enigma2$(EXEEXT)
78         $(CXXLINK) $(enigma2_LDFLAGS) $(enigma2_OBJECTS) -Wl,--export-dynamic -Wl,--whole-archive $(enigma2_LDADD_WHOLE) -Wl,--no-whole-archive $(enigma2_LDADD) $(LIBS)
79 #       g++ -o enigma2$(EXEEXT) $(enigma2_LDFLAGS) $(enigma2_OBJECTS) -Wl,--export-dynamic -Wl,--whole-archive $(enigma2_LDADD_WHOLE) -Wl,--no-whole-archive $(enigma2_LDADD) $(LIBS)