-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile.am
137 lines (119 loc) · 4.6 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
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
include $(srcdir)/cwm4/root_makefile_top.am
DEFAULT_INCLUDES =
# The last include is so '#include "config.h"' works for the generated config.h.
# Once installed that will work because it is in the same directory.
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_builddir)/include/libcwd
SUBDIRS = @CW_SUBDIRS@ include utils . tests testsuite cutee
DIST_SUBDIRS = include utils tests testsuite cutee
EXTRA_DIST += LICENSE.QPL README.threads README.FreeBSD README.openbsd README.solaris \
README.cygwin README.mingw32 nodebug.h macros.h depcomp libcwd.pc.in libcwd_r.pc.in \
libcwd.lsm libcwd.spec valgrind.supp CMakeLists.txt cmake-config.h.in \
cmake/libcwd_rConfig.cmake
DISTCLEANFILES = libcwd_r-@[email protected] stamp-h.in
VERSIONINFO=@VERSIONINFO@
CXXFLAGS = @CXXFLAGS@
if ENABLETHREADING
LIBCWD_R = libcwd_r.la
else
LIBCWD_R =
endif
if ENABLENONTHREADING
LIBCWD = libcwd.la
else
LIBCWD =
endif
dist_pkgdata_DATA = libcwdrc
lib_LTLIBRARIES = $(LIBCWD) $(LIBCWD_R)
if ENABLENONTHREADING
libcwd_la_CXXFLAGS = -std=c++17 $(PCHFLAGS) -DCWDEBUG
libcwd_la_SOURCES = \
environ.cc \
debug.cc \
debugmalloc.cc \
private_allocator.cc \
demangle3.cc \
alloc_filter.cc \
strerrno.cc \
type_info.cc \
compilation_unit.cc
libcwd_la_LDFLAGS = -version-info $(VERSIONINFO) -no-undefined
libcwd_la_LIBADD = utils/libutils.la
endif
if ENABLETHREADING
libcwd_r_la_CXXFLAGS = -std=c++17 $(PCHFLAGS) -DCWDEBUG -DLIBCWD_THREAD_SAFE
libcwd_r_la_SOURCES = \
environ.cc \
debug.cc \
debugmalloc.cc \
private_allocator.cc \
demangle3.cc \
alloc_filter.cc \
strerrno.cc \
type_info.cc \
compilation_unit.cc \
threading.cc \
wrapcnclpnts.cc
libcwd_r_la_LDFLAGS = -version-info $(VERSIONINFO) -no-undefined $(LIB_THREADS_SHARED)
libcwd_r_la_LIBADD = utils/libutils_r.la
endif
check:
$(MAKE) -C testsuite -j 1 check
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libcwd.pc libcwd_r.pc
$(pkgconfig_DATA): config.status
# --------------- Maintainer's Section
# Default installation directory of documentation and example-project.
DOCDESTDIR=$(DESTDIR)/usr/share/doc/libcwd
install-doc:
test -e $(DOCDESTDIR)/documentation || mkdir -p $(DOCDESTDIR)/documentation
cp -pr $(top_builddir)/doc/* $(DOCDESTDIR)/documentation
rm -f $(DOCDESTDIR)/documentation/Makefile $(DOCDESTDIR)/documentation/doxygen.config
find $(DOCDESTDIR)/documentation -name .git -print | xargs rm -rf
find $(DOCDESTDIR)/documentation/tutorial \( -name 'core*' -o -name '*-bin' -o -name '*.o' \) -print | xargs rm -rf
find $(DOCDESTDIR)/documentation -name '*.dot' -size 0 -print | xargs rm -f
rm -f $(DOCDESTDIR)/documentation/tutorial/Makefile $(DOCDESTDIR)/documentation/styles/Makefile
mkdir -p $(DOCDESTDIR)/example-project/m4
if test -d $(srcdir)/example-project/.git; then \
echo > $(DOCDESTDIR)/example-project/.files; \
for i in $$(cd $(srcdir)/example-project && git ls-files); do \
if test -f $(srcdir)/example-project/$$i; then \
$(srcdir)/install-sh -T $(srcdir)/example-project/$$i $(DOCDESTDIR)/example-project/$$i; \
echo $$i >> $(DOCDESTDIR)/example-project/.files; \
fi \
done \
elif test -r $(srcdir)/example-project/.files; then \
for i in $$(cat $(srcdir)/example-project/.files); do \
cp -p $(srcdir)/example-project/$$i $(DOCDESTDIR)/example-project/$$i; \
done; \
cp -p $(srcdir)/example-project/.files $(DOCDESTDIR)/example-project; \
fi
dist-hook: documentation
chmod u+w $(distdir)/Makefile.in
cat $(distdir)/Makefile.in | \
sed -e 's/^\(CONFIG_CLEAN_FILES =.*\) libcwd\.spec libcwd\.lsm\(.*\)/\1\2/' > $(distdir)/Makefile.in.new && \
mv $(distdir)/Makefile.in.new $(distdir)/Makefile.in
$(MAKE) DOCDESTDIR=$(distdir) install-doc
mkdir $(distdir)/debian
if test -d $(srcdir)/debian/.git; then \
echo > $(distdir)/debian/.files; \
for i in $$(cd $(srcdir)/debian && git ls-files); do \
$(srcdir)/install-sh -T $(srcdir)/debian/$$i $(distdir)/debian/$$i; \
echo $$i >> $(distdir)/debian/.files; \
done \
elif test -r $(srcdir)/debian/.files; then \
for i in $$(cat $(srcdir)/debian/.files); do \
cp -p $(srcdir)/debian/$$i $(distdir)/debian/$$i; \
done; \
cp -p $(srcdir)/debian/.files $(distdir)/debian; \
fi
chmod +x $(distdir)/install-sh
distclean-local:
rm -rf rpm $(srcdir)/autom4te.cache
if test -d example-project; then \
(cd example-project; rm -rf autom4te.cache .deps aclocal.m4 config.h config.h.in \
config.log config.status configure Makefile Makefile.in stamp-h1 program *.o); \
fi
cd $(srcdir) && dh_clean || true
rm -f $(srcdir)/build-stamp
@MAINTAINER_MODE_TRUE@include maintMakefile
include $(srcdir)/cwm4/root_makefile_bottom.am