File: Makefile.am

package info (click to toggle)
cryptmount 5.0-2
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,948 kB
  • ctags: 584
  • sloc: ansic: 6,235; sh: 5,342; makefile: 221; sed: 16
file content (122 lines) | stat: -rw-r--r-- 4,330 bytes parent folder | download
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# automake script for 'cryptmount'
# RW Penney, November 2005

AM_CPPFLAGS = -DCM_SYSCONF_DIR="\"$(CM_SYSCONF_DIR)\"" \
		-DCM_SYSRUN_DIR="\"$(CM_SYSRUN_DIR)\"" \
		-DCM_MODULE_DIR="\"$(pkglibdir)\""

ACLOCAL_AMFLAGS = #-I m4
bin_PROGRAMS=cryptmount
cryptmount_SOURCES=cryptmount.c cryptmount.h \
	armour.c armour.h \
	armour-builtin.c armour-gcry.c armour-luks.c \
	blowfish.c blowfish.h \
	dmutils.c dmutils.h \
	fsutils.c fsutils.h \
	looputils.c looputils.h \
	tables.c tables.h \
	utils.c utils.h \
	cmtesting.c cmtesting.h
cryptmount_NONHEADERS = $(shell echo "${cryptmount_SOURCES}" | sed 's%\<[^ ]*\.h\>%%g')

if BUILD_LUKSCOMPAT
if !BUILD_MODULES
cryptmount_LDADD = ${libcryptsetup_LIBS}
endif
endif

localedir=$(datadir)/locale
INCLUDES=-DLOCALEDIR=\"$(localedir)\"
EXTRA_DIST = config.rpath mkinstalldirs cmtab.example \
	README.OpenSSL RELNOTES ToDo cryptmount.spec \
	debian/changelog debian/compat debian/control debian/copyright \
	debian/dirs debian/docs debian/rules debian/lintian-override \
	debian/postinst debian/postrm debian/watch debian/source/format

SUBDIRS = man po sysinit testing


#
# Build-information for dynamically-loadable key-manager modules
# (Dependent on gcc-compatible compiler, because libtool would be overkill)
#
MODULE_GENSRCS = utils.c
MODULE_GENHDRS = armour.h config.h utils.h
cm-gcry.so:	armour-gcry.c ${MODULE_GENSRCS} ${MODULE_GENHDRS}
	${CC} ${DEFS} -DAS_MODULE ${DEFAULT_INCLUDES} ${INCLUDES} \
		${AM_CPPFLAGS} ${CPPFLAGS} ${AM_CFLAGS} ${CFLAGS} \
		-shared -fPIC armour-gcry.c ${MODULE_GENSRCS} \
		${LIBS_GCRY} ${LDFLAGS} -o $@
cm-luks.so:	armour-luks.c ${MODULE_GENSRCS} ${MODULE_GENHDRS} looputils.c
	${CC} ${DEFS} -DAS_MODULE ${DEFAULT_INCLUDES} ${INCLUDES} \
		${AM_CPPFLAGS} ${CPPFLAGS} ${AM_CFLAGS} ${CFLAGS} \
		-shared -fPIC armour-luks.c ${MODULE_GENSRCS} \
		dmutils.c looputils.c ${LIBS_LUKS} ${LDFLAGS} -o $@
all:	${CM_MODULES}

install-exec-hook:	install-etcdir install-modules
	chown root.root $(DESTDIR)$(bindir)/cryptmount$(EXEEXT)
	chmod u+srwx,go-w,go+r $(DESTDIR)$(bindir)/cryptmount$(EXEEXT)
	@if test -z "$(DESTDIR)" -o "$(DESTDIR)" = "/"; then \
		modprobe -a loop dm-crypt || true; \
		( egrep -q '\<device-mapper\>' /proc/devices \
			&& egrep -q '\<loop\>' /proc/devices ) || \
		echo "Warning: kernel support for /dev/loop and /dev/mapper is needed by cryptmount"; \
	fi


.PHONY:	install-etcdir
install-etcdir:
	if test ! -f "${DESTDIR}${CM_SYSCONF_DIR}/cmtab" ; then \
	    echo -e "# ${CM_SYSCONF_DIR}/cmtab - encrypted filesystem information for cryptmount\n# try 'man 8 cryptmount' or 'man 5 cmtab' for more details\n" >> "${DESTDIR}${CM_SYSCONF_DIR}/cmtab"; \
	fi
	${INSTALL_PROGRAM_ENV} ${INSTALL_DATA} cmtab.example "${DESTDIR}/usr/share/doc/cryptmount/examples/cmtab"


install-modules:	${CM_MODULES}
	test -z "${CM_MODULES}" -o -d "${DESTDIR}${pkglibdir}" || ${mkdir_p} "${DESTDIR}${pkglibdir}"
	for mod in ${CM_MODULES}; do \
		${INSTALL_PROGRAM_ENV} ${INSTALL_PROGRAM} -m 700 $${mod} "${DESTDIR}${pkglibdir}"; \
		chown root.root ${DESTDIR}${pkglibdir}/$${mod}; \
	done


install-setup:	setupscript
	test -d "${DESTDIR}${sbindir}" || ${mkdir_p} "${DESTDIR}${sbindir}"
	${INSTALL_PROGRAM_ENV} ${INSTALL_SCRIPT} setupscript "${DESTDIR}${sbindir}/cryptmount-setup"


clean-local:
	-rm -f ${CM_MODULES}
	-rm -f splint.log

dist-hook:
	sed -e "s,^\(Version:\s*\)[0-9].*,\1${VERSION}," cryptmount.spec > cm_spec.new; cmp -q cryptmount.spec cm_spec.new || mv cm_spec.new cryptmount.spec; rm -f cm_spec.new

pedantic:	CFLAGS = -Wall -W -pedantic -g
pedantic:	${bin_PROGRAMS} ${CM_MODULES}

if HAVE_DOXYGEN
doxydocs:	doxygen.conf
	doxygen doxygen.conf
endif

.PHONY:	splint
splint:
	@echo -n "" > splint.log
	for src in ${cryptmount_NONHEADERS}; do \
		echo "==== $${src} ====" >> splint.log; \
		splint ${DEFS} ${DEFAULT_INCLUDES} ${INCLUDES} ${AM_CPFLAGS} ${CPPFLAGS} -D__signed__="" -posix-lib -checks $${src} >> splint.log 2>&1 ; \
		echo -e "\n\n" >> splint.log || true; \
	done

# 'cmtest' target is for use with 'mudslinger' testing script:
cmtest:	CFLAGS = -Wall -g -DTESTING -DCM_SRCDIR=\"${abs_srcdir}\"
cmtest:	${bin_PROGRAMS} ${CM_MODULES}
	${MAKE} -C testing autokeys mudslinger


.PHONY:	depend
depend:
	${CC} -MM ${DEFS} ${DEFAULT_INCLUDES} ${INCLUDES} ${AM_CPFLAGS} ${CPPFLAGS} ${cryptmount_NONHEADERS} > .depend
-include .depend