0 | |
From: Laurent Bigonville <bigon@users.noreply.github.com>
|
1 | |
Date: Tue, 5 Jan 2021 19:29:44 +0100
|
2 | |
Subject: Turn libaucommon into a libtool convenience library (#147)
|
3 | |
|
4 | |
This makes sure that the functions compiled into libaucommon
|
5 | |
(audit_strsplit_r,...) end up in the libaudit/libauparse static library
|
6 | |
|
7 | |
Fixes: #146
|
8 | |
---
|
9 | |
audisp/plugins/remote/Makefile.am | 2 +-
|
10 | |
audisp/plugins/syslog/Makefile.am | 2 +-
|
11 | |
auparse/Makefile.am | 4 ++--
|
12 | |
auparse/test/Makefile.am | 6 +++---
|
13 | |
common/Makefile.am | 6 +++---
|
14 | |
lib/Makefile.am | 4 ++--
|
15 | |
6 files changed, 12 insertions(+), 12 deletions(-)
|
16 | |
|
17 | |
diff --git a/audisp/plugins/remote/Makefile.am b/audisp/plugins/remote/Makefile.am
|
18 | |
index 0066e25..bd3f301 100644
|
19 | |
--- a/audisp/plugins/remote/Makefile.am
|
20 | |
+++ b/audisp/plugins/remote/Makefile.am
|
21 | |
@@ -33,7 +33,7 @@ man_MANS = audisp-remote.8 audisp-remote.conf.5
|
22 | |
check_PROGRAMS = test-queue
|
23 | |
TESTS = $(check_PROGRAMS)
|
24 | |
|
25 | |
-audisp_remote_DEPENDENCIES = ${top_builddir}/common/libaucommon.a
|
26 | |
+audisp_remote_DEPENDENCIES = ${top_builddir}/common/libaucommon.la
|
27 | |
audisp_remote_SOURCES = audisp-remote.c remote-config.c queue.c
|
28 | |
audisp_remote_CFLAGS = -fPIE -DPIE -g -D_REENTRANT -D_GNU_SOURCE -Wundef
|
29 | |
audisp_remote_LDFLAGS = -pie -Wl,-z,relro -Wl,-z,now
|
30 | |
diff --git a/audisp/plugins/syslog/Makefile.am b/audisp/plugins/syslog/Makefile.am
|
31 | |
index 55ca77b..353229e 100644
|
32 | |
--- a/audisp/plugins/syslog/Makefile.am
|
33 | |
+++ b/audisp/plugins/syslog/Makefile.am
|
34 | |
@@ -29,7 +29,7 @@ plugin_conf = syslog.conf
|
35 | |
sbin_PROGRAMS = audisp-syslog
|
36 | |
man_MANS = audisp-syslog.8
|
37 | |
|
38 | |
-audisp_syslog_DEPENDENCIES = ${top_builddir}/common/libaucommon.a
|
39 | |
+audisp_syslog_DEPENDENCIES = ${top_builddir}/common/libaucommon.la
|
40 | |
audisp_syslog_SOURCES = audisp-syslog.c
|
41 | |
audisp_syslog_CFLAGS = -fPIE -DPIE -g -D_GNU_SOURCE -Wundef
|
42 | |
audisp_syslog_LDFLAGS = -pie -Wl,-z,relro -Wl,-z,now
|
43 | |
diff --git a/auparse/Makefile.am b/auparse/Makefile.am
|
44 | |
index b853003..d180c34 100644
|
45 | |
--- a/auparse/Makefile.am
|
46 | |
+++ b/auparse/Makefile.am
|
47 | |
@@ -45,8 +45,8 @@ libauparse_la_SOURCES = lru.c interpret.c nvlist.c ellist.c \
|
48 | |
normalize_record_map.h normalize_syscall_map.h
|
49 | |
nodist_libauparse_la_SOURCES = $(BUILT_SOURCES)
|
50 | |
|
51 | |
-libauparse_la_LIBADD = ${top_builddir}/lib/libaudit.la ${top_builddir}/common/libaucommon.a
|
52 | |
-libauparse_la_DEPENDENCIES = $(libauparse_la_SOURCES) ${top_builddir}/config.h ${top_builddir}/common/libaucommon.a
|
53 | |
+libauparse_la_LIBADD = ${top_builddir}/lib/libaudit.la ${top_builddir}/common/libaucommon.la
|
54 | |
+libauparse_la_DEPENDENCIES = $(libauparse_la_SOURCES) ${top_builddir}/config.h ${top_builddir}/common/libaucommon.la
|
55 | |
libauparse_la_LDFLAGS = -Wl,-z,relro
|
56 | |
|
57 | |
message.c:
|
58 | |
diff --git a/auparse/test/Makefile.am b/auparse/test/Makefile.am
|
59 | |
index 89ffcc4..11d10b0 100644
|
60 | |
--- a/auparse/test/Makefile.am
|
61 | |
+++ b/auparse/test/Makefile.am
|
62 | |
@@ -29,17 +29,17 @@ AM_CPPFLAGS = -I${top_srcdir}/auparse -I${top_srcdir}/lib
|
63 | |
|
64 | |
lookup_test_SOURCES = lookup_test.c
|
65 | |
lookup_test_LDADD = ${top_builddir}/auparse/libauparse.la \
|
66 | |
- ${top_builddir}/lib/libaudit.la ${top_builddir}/common/libaucommon.a
|
67 | |
+ ${top_builddir}/lib/libaudit.la ${top_builddir}/common/libaucommon.la
|
68 | |
|
69 | |
auparse_test_SOURCES = auparse_test.c
|
70 | |
auparse_test_LDFLAGS = -static
|
71 | |
auparse_test_LDADD = ${top_builddir}/auparse/libauparse.la \
|
72 | |
- ${top_builddir}/lib/libaudit.la ${top_builddir}/common/libaucommon.a
|
73 | |
+ ${top_builddir}/lib/libaudit.la ${top_builddir}/common/libaucommon.la
|
74 | |
|
75 | |
auparselol_test_SOURCES = auparselol_test.c
|
76 | |
auparselol_test_LDFLAGS = -static
|
77 | |
auparselol_test_LDADD = ${top_builddir}/auparse/libauparse.la \
|
78 | |
- ${top_builddir}/lib/libaudit.la ${top_builddir}/common/libaucommon.a
|
79 | |
+ ${top_builddir}/lib/libaudit.la ${top_builddir}/common/libaucommon.la
|
80 | |
|
81 | |
drop_srcdir = sed 's,$(srcdir)/test,test,'
|
82 | |
|
83 | |
diff --git a/common/Makefile.am b/common/Makefile.am
|
84 | |
index 9e00cbc..8b9aacb 100644
|
85 | |
--- a/common/Makefile.am
|
86 | |
+++ b/common/Makefile.am
|
87 | |
@@ -24,7 +24,7 @@ CONFIG_CLEAN_FILES = *.rej *.orig
|
88 | |
AM_CPPFLAGS = -D_GNU_SOURCE -fPIC -DPIC -I${top_srcdir} -I${top_srcdir}/lib
|
89 | |
|
90 | |
noinst_HEADERS = common.h
|
91 | |
-libaucommon_a_DEPENDENCIES = ../config.h
|
92 | |
-libaucommon_a_SOURCES = audit-fgets.c strsplit.c
|
93 | |
-noinst_LIBRARIES = libaucommon.a
|
94 | |
+libaucommon_la_DEPENDENCIES = ../config.h
|
95 | |
+libaucommon_la_SOURCES = audit-fgets.c strsplit.c
|
96 | |
+noinst_LTLIBRARIES = libaucommon.la
|
97 | |
|
98 | |
diff --git a/lib/Makefile.am b/lib/Makefile.am
|
99 | |
index 107c444..12e5861 100644
|
100 | |
--- a/lib/Makefile.am
|
101 | |
+++ b/lib/Makefile.am
|
102 | |
@@ -38,8 +38,8 @@ include_HEADERS = libaudit.h
|
103 | |
libaudit_la_SOURCES = libaudit.c message.c netlink.c \
|
104 | |
lookup_table.c audit_logging.c deprecated.c \
|
105 | |
dso.h private.h errormsg.h
|
106 | |
-libaudit_la_LIBADD = $(CAPNG_LDADD) ${top_builddir}/common/libaucommon.a
|
107 | |
-libaudit_la_DEPENDENCIES = $(libaudit_la_SOURCES) ../config.h ${top_builddir}/common/libaucommon.a
|
108 | |
+libaudit_la_LIBADD = $(CAPNG_LDADD) ${top_builddir}/common/libaucommon.la
|
109 | |
+libaudit_la_DEPENDENCIES = $(libaudit_la_SOURCES) ../config.h ${top_builddir}/common/libaucommon.la
|
110 | |
libaudit_la_LDFLAGS = -Wl,-z,relro -version-info $(VERSION_INFO)
|
111 | |
nodist_libaudit_la_SOURCES = $(BUILT_SOURCES)
|
112 | |
|