clean up build #2
[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 bin_PROGRAMS = enigma2
8
9 enigma2_SOURCES = \
10         enigma.cpp bsod.cpp
11
12 CLEANFILES = version.h
13
14 bsod.o: version.h
15
16 enigma.o: version.h
17
18 # when there is no ../CVS/Entries, don't worry.
19 ../CVS/Entries:
20
21 ../CVS/Root:
22
23 .PHONY: .svn/entries
24
25 entries: .svn/entries
26         @if [ ! -f entries ]; then touch entries; fi
27         @if [ -f .svn/entries ] && ! diff -q entries .svn/entries 2>/dev/null; then     \
28                 cp --no-preserve=mode .svn/entries entries;                             \
29         fi;
30
31 version.h: entries
32         > version.h
33         @if [ -d .svn ]; then \
34                 echo "#define ENIGMA2_LAST_CHANGE_DATE \"`LANG="en" svn info | grep 'Last Changed Date:' | cut -d' ' -f4`\"" >> version.h; \
35         elif [ -d ../.git ]; then \
36                 if [ -f ../.git/last_commit_info ]; then \
37                         echo "#define ENIGMA2_LAST_CHANGE_DATE \"`cat ../.git/last_commit_info | grep 'Date:' | cut -d' ' -f4`\"" >> version.h; \
38                         echo "#define ENIGMA2_BRANCH \"`cat ../.git/branch`\"" >> version.h; \
39                 else \
40                         echo "#define ENIGMA2_LAST_CHANGE_DATE \"`LANG="en" git log --max-count=1 --date=short | grep 'Date:' | cut -d' ' -f4`\"" >> version.h; \
41                         echo "#define ENIGMA2_BRANCH \"`LANG="en" git branch | grep '* ' | cut -d' ' -f2`\"" >> version.h; \
42                 fi; \
43         fi;
44
45 enigma2_LDADD = \
46         $(top_builddir)/lib/libenigma.la \
47         @BASE_LIBS@ \
48         @LIBXINE_LIBS@ \
49         @PTHREAD_LIBS@ \
50         @SDL_LIBS@ \
51         @LIBS@