Makefile.am 1.89 KB
Newer Older
1
ACLOCAL_AMFLAGS = -I m4
Petri Hintukainen's avatar
Petri Hintukainen committed
2
AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_builddir)/src/dvdcss
3

4
EXTRA_DIST = msvc libdvdcss.spec INSTALL
5

6 7
dist_doc_DATA = AUTHORS COPYING NEWS README ChangeLog

8
MAINTAINERCLEANFILES = ChangeLog
9

10
ChangeLog: $(wildcard $(srcdir)/.git/logs/HEAD)
11
if GIT
12 13 14
	-cd $(srcdir) && git log > $(abs_builddir)/$(@)-tmp
	test -s $(@)-tmp && mv $(@)-tmp $(@)
	-rm -f $(@)-tmp
15
endif
16
	test -e $(@) || touch $(@)
17

18
lib_LTLIBRARIES = libdvdcss.la
19
EXTRA_PROGRAMS = test/csstest test/dvd_region
20 21 22 23 24 25 26 27 28 29 30 31 32 33

libdvdcss_la_SOURCES = \
	src/libdvdcss.c \
	src/libdvdcss.h \
	src/device.c \
	src/device.h \
	src/css.c \
	src/css.h \
	src/csstables.h \
	src/ioctl.c \
	src/ioctl.h \
	src/error.c \
	src/common.h

34
libdvdcss_la_LDFLAGS = -version-info $(DVDCSS_LTVERSION) $(DVDCSS_LDFLAGS)
35 36 37
libdvdcss_la_LIBADD =

if !SYS_MSVC
38
libdvdcss_la_LDFLAGS += -no-undefined
39 40
endif

41 42 43
test_csstest_SOURCES = test/csstest.c
test_csstest_LDADD = libdvdcss.la
test_csstest_CFLAGS = -I $(top_srcdir)/src
44

45
test_dvd_region_SOURCES = test/dvd_region.c
46 47
test_dvd_region_LDADD = libdvdcss.la
test_dvd_region_CFLAGS = -I $(top_srcdir)/src
48

49
pkgincludedir = $(includedir)/dvdcss
Petri Hintukainen's avatar
Petri Hintukainen committed
50 51 52
pkginclude_HEADERS = \
	src/dvdcss/dvdcss.h \
	src/dvdcss/version.h
53 54 55

pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = src/libdvdcss.pc
56

57 58 59 60 61
if APIDOC
all-local: apidoc
install-data-local: install-apidoc
uninstall-hook: uninstall-apidoc
endif
62

63
apidoc: stamp-doxygen
64

65
stamp-doxygen: doc/doxygen.cfg src/libdvdcss.c src/dvdcss/dvdcss.h
66
	doxygen $<
67 68
	touch $@

69
tools: test/csstest$(EXEEXT) test/dvd_region$(EXEEXT)
70

71
clean-local:
72
	-rm -Rf stamp-doxygen doc/doxygen_sqlite3.db libdvdcss.spec doc/html
73 74 75 76 77 78 79 80 81

install-apidoc:
	$(MKDIR_P) $(DESTDIR)$(htmldir)
	for file in doc/html/*; do \
		$(INSTALL_DATA) $$file "$(DESTDIR)$(htmldir)" || exit 1; \
	done;

uninstall-apidoc:
	-rm -Rf $(DESTDIR)$(htmldir)/*.png $(DESTDIR)$(htmldir)/*.html $(DESTDIR)$(htmldir)/*.css $(DESTDIR)$(htmldir)/*.js
82

83
.PHONY: apidoc tools