aboutsummaryrefslogtreecommitdiff
path: root/main/Makefile.am
blob: 9f2b11827e0834631c38a149ba78d833abeaef0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
AM_CPPFLAGS = \
	-I$(top_srcdir) \
	-I$(top_srcdir)/include \
	-include Python.h \
	-include $(top_builddir)/enigma2_config.h

bin_PROGRAMS = enigma2

enigma2_SOURCES = \
	enigma.cpp bsod.cpp

CLEANFILES = version.h

bsod.o: version.h

enigma.o: version.h

# when there is no ../CVS/Entries, don't worry.
../CVS/Entries:

../CVS/Root:

.PHONY: .svn/entries

entries: .svn/entries
	@if [ ! -f entries ]; then touch entries; fi
	@if [ -f .svn/entries ] && ! diff -q entries .svn/entries 2>/dev/null; then	\
		cp --no-preserve=mode .svn/entries entries;				\
	fi;

version.h: entries
	> version.h
	@if [ -d .svn ]; then \
		echo "#define ENIGMA2_LAST_CHANGE_DATE \"`LANG="en" svn info | grep 'Last Changed Date:' | cut -d' ' -f4`\"" >> version.h; \
	elif [ -d ../.git ]; then \
		if [ -f ../.git/last_commit_info ]; then \
			echo "#define ENIGMA2_LAST_CHANGE_DATE \"`cat ../.git/last_commit_info | grep 'Date:' | cut -d' ' -f4`\"" >> version.h; \
			echo "#define ENIGMA2_BRANCH \"`cat ../.git/branch`\"" >> version.h; \
		else \
			echo "#define ENIGMA2_LAST_CHANGE_DATE \"`LANG="en" git log --max-count=1 --date=short | grep 'Date:' | cut -d' ' -f4`\"" >> version.h; \
			echo "#define ENIGMA2_BRANCH \"`LANG="en" git branch | grep '* ' | cut -d' ' -f2`\"" >> version.h; \
		fi; \
	fi;

enigma2_LDADD = \
	$(top_builddir)/lib/libenigma.la \
	@BASE_LIBS@ \
	@LIBXINE_LIBS@ \
	@PTHREAD_LIBS@ \
	@SDL_LIBS@ \
	@LIBS@