forked from andrewshadura/tnat64
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.am
53 lines (39 loc) · 1.59 KB
/
Makefile.am
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
ACLOCAL_AMFLAGS = -I m4
bin_SCRIPTS = tnat64
do_subst = sed -e 's,[@]libdir[@],$(libdir),g' \
-e 's,[@]pkglibdir[@],$(pkglibdir),g' \
-e 's,[@]bindir[@],$(bindir),g' \
-e 's,[@]CONF_FILE[@],$(CONF_FILE),g' \
-e 's,[@]PERL[@],$(PERL),g' \
-e 's,[@]PACKAGE[@],$(PACKAGE),g' \
-e 's,[@]VERSION[@],$(VERSION),g'
# It is tempting to generate tnat64 from tnat64.in during ./configure
# by adding it to AC_CONFIG_FILES() in configure.ac, but that has a
# horrible bug of leaving unexpanded variables in paths, which is
# unpleasant to work around. The below is the recommended procedure.
tnat64: tnat64.in Makefile
$(do_subst) < $(srcdir)/tnat64.in > tnat64
chmod +x tnat64
tnat64.8: tnat64.8.in Makefile
$(do_subst) < $(srcdir)/tnat64.8.in > tnat64.8
EXTRA_DIST = tnat64.in tnat64.8.in
bin_PROGRAMS = tnat64-validateconf
tnat64_validateconf_SOURCES = validateconf.c common.c common.h parser.c parser.h
tnat64_validateconf_CFLAGS = $(AM_CFLAGS) # this renames object files
pkglib_LTLIBRARIES = libtnat64.la
libtnat64_la_SOURCES = tnat64.c common.c common.h parser.c parser.h
libtnat64_la_LDFLAGS = -Wc,-nostdlib
libtnat64_la_LIBADD = -ldl -lc
man_MANS = tnat64.8
dist_man_MANS = tnat64.1 tnat64.conf.5 tnat64-validateconf.1
dist_doc_DATA = tnat64.conf.complex.example tnat64.conf.simple.example
export DIG NSLOOKUP NETCAT
export objdir = .libs
TESTS = tests/01-correct-ipv6-address tests/02-local-connection
install-exec-hook:
cd $(DESTDIR)$(pkglibdir) && \
rm -f libtnat64.a && \
rm -f libtnat64.la && \
rm -f libtnat64.so && \
rm -f libtnat64.so.0 && \
mv libtnat64.so.0.0.0 libtnat64.so