Makefile.am 1.74 KB
Newer Older
1 2
ACLOCAL_AMFLAGS = -I m4

3
EXTRA_DIST = msvc libdvdcss.spec INSTALL
4

5 6
dist_doc_DATA = AUTHORS COPYING NEWS README ChangeLog

7
MAINTAINERCLEANFILES = ChangeLog
8

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

15
lib_LTLIBRARIES = libdvdcss.la
16
EXTRA_PROGRAMS = test/csstest test/dvd_region
17 18 19 20 21 22 23 24 25 26 27 28 29 30

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

31
libdvdcss_la_LDFLAGS = -version-info $(DVDCSS_LTVERSION) $(DVDCSS_LDFLAGS)
32 33 34
libdvdcss_la_LIBADD =

if !SYS_MSVC
35
libdvdcss_la_LDFLAGS += -no-undefined
36 37
endif

38 39 40
test_csstest_SOURCES = test/csstest.c
test_csstest_LDADD = libdvdcss.la
test_csstest_CFLAGS = -I $(top_srcdir)/src
41

42 43 44
test_dvd_region_SOURCES = test/dvd_region.c src/ioctl.c
test_dvd_region_LDADD = libdvdcss.la
test_dvd_region_CFLAGS = -I $(top_srcdir)/src
45

46 47 48 49 50
pkgincludedir = $(includedir)/dvdcss
pkginclude_HEADERS = src/dvdcss/dvdcss.h

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

52 53 54 55 56
if APIDOC
all-local: apidoc
install-data-local: install-apidoc
uninstall-hook: uninstall-apidoc
endif
57

58
apidoc: stamp-doxygen
59

60
stamp-doxygen: doc/doxygen.cfg src/libdvdcss.c src/dvdcss/dvdcss.h
61
	doxygen $<
62 63
	touch $@

64 65
tools: test/csstest test/dvd_region

66
clean-local:
67 68 69 70 71 72 73 74 75 76
	-rm -Rf stamp-doxygen doc/html

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
77

78
.PHONY: apidoc tools