2 # Copyright 2004-2009,2013-15 Red Hat Inc., Durham, North Carolina.
5 # This library is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU Lesser General Public
7 # License as published by the Free Software Foundation; either
8 # version 2.1 of the License, or (at your option) any later version.
10 # This library is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # Lesser General Public License for more details.
15 # You should have received a copy of the GNU Lesser General Public
16 # License along with this library; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 # Steve Grubb <sgrubb@redhat.com>
24 CLEANFILES = $(BUILT_SOURCES)
25 CONFIG_CLEAN_FILES = *.loT *.rej *.orig
26 EXTRA_DIST = syscall-update.txt
28 AM_CFLAGS = -fPIC -DPIC -D_GNU_SOURCE
29 AM_CPPFLAGS = -I. -I${top_srcdir} -I${top_srcdir}/auparse
31 pkgconfigdir = $(libdir)/pkgconfig
32 pkgconfig_DATA = audit.pc
33 DISTCLEANFILES = $(pkgconfig_DATA)
35 lib_LTLIBRARIES = libaudit.la
36 include_HEADERS = libaudit.h
37 libaudit_la_SOURCES = libaudit.c message.c netlink.c \
38 lookup_table.c audit_logging.c deprecated.c \
39 strsplit.c dso.h private.h errormsg.h
41 libaudit_la_DEPENDENCIES = $(libaudit_la_SOURCES) ../config.h
42 libaudit_la_LDFLAGS = -Wl,-z,relro -version-info $(VERSION_INFO)
43 nodist_libaudit_la_SOURCES = $(BUILT_SOURCES)
45 BUILT_SOURCES = actiontabs.h errtabs.h fieldtabs.h flagtabs.h \
46 ftypetabs.h i386_tables.h ia64_tables.h machinetabs.h \
47 msg_typetabs.h optabs.h ppc_tables.h s390_tables.h \
48 s390x_tables.h x86_64_tables.h
50 BUILT_SOURCES += alpha_tables.h
53 BUILT_SOURCES += arm_tables.h
56 BUILT_SOURCES += aarch64_tables.h
58 noinst_PROGRAMS = gen_actiontabs_h gen_errtabs_h gen_fieldtabs_h \
59 gen_flagtabs_h gen_ftypetabs_h gen_i386_tables_h \
60 gen_ia64_tables_h gen_machinetabs_h gen_msg_typetabs_h \
61 gen_optabs_h gen_ppc_tables_h gen_s390_tables_h \
62 gen_s390x_tables_h gen_x86_64_tables_h
64 noinst_PROGRAMS += gen_alpha_tables_h
67 noinst_PROGRAMS += gen_arm_tables_h
70 noinst_PROGRAMS += gen_aarch64_tables_h
72 gen_actiontabs_h_SOURCES = gen_tables.c gen_tables.h actiontab.h
73 gen_actiontabs_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="actiontab.h"'
74 $(gen_actiontabs_h_OBJECTS): CC=$(CC_FOR_BUILD)
75 $(gen_actiontabs_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD)
76 gen_actiontabs_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD)
77 actiontabs.h: gen_actiontabs_h Makefile
78 ./gen_actiontabs_h --lowercase --i2s --s2i action > $@
81 gen_alpha_tables_h_SOURCES = gen_tables.c gen_tables.h alpha_table.h
82 gen_alpha_tables_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="alpha_table.h"'
83 $(gen_alpha_tables_h_OBJECTS): CC=$(CC_FOR_BUILD)
84 $(gen_alpha_tables_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD)
85 gen_alpha_tables_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD)
86 alpha_tables.h: gen_alpha_tables_h Makefile
87 ./gen_alpha_tables_h --lowercase --i2s --s2i alpha_syscall > $@
91 gen_arm_tables_h_SOURCES = gen_tables.c gen_tables.h arm_table.h
92 gen_arm_tables_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="arm_table.h"'
93 $(gen_arm_tables_h_OBJECTS): CC=$(CC_FOR_BUILD)
94 $(gen_arm_tables_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD)
95 gen_arm_tables_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD)
96 arm_tables.h: gen_arm_tables_h Makefile
97 ./gen_arm_tables_h --lowercase --i2s --s2i arm_syscall > $@
101 gen_aarch64_tables_h_SOURCES = gen_tables.c gen_tables.h aarch64_table.h
102 gen_aarch64_tables_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="aarch64_table.h"'
103 $(gen_aarch64_tables_h_OBJECTS): CC=$(CC_FOR_BUILD)
104 $(gen_aarch64_tables_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD)
105 gen_aarch64_tables_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD)
106 aarch64_tables.h: gen_aarch64_tables_h Makefile
107 ./gen_aarch64_tables_h --lowercase --i2s --s2i aarch64_syscall > $@
110 gen_errtabs_h_SOURCES = gen_tables.c gen_tables.h errtab.h
111 gen_errtabs_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="errtab.h"'
112 $(gen_errtabs_h_OBJECTS): CC=$(CC_FOR_BUILD)
113 $(gen_errtabs_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD)
114 gen_errtabs_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD)
115 errtabs.h: gen_errtabs_h Makefile
116 ./gen_errtabs_h --duplicate-ints --uppercase --i2s --s2i err > $@
118 gen_fieldtabs_h_SOURCES = gen_tables.c gen_tables.h fieldtab.h
119 gen_fieldtabs_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="fieldtab.h"'
120 $(gen_fieldtabs_h_OBJECTS): CC=$(CC_FOR_BUILD)
121 $(gen_fieldtabs_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD)
122 gen_fieldtabs_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD)
123 fieldtabs.h: gen_fieldtabs_h Makefile
124 ./gen_fieldtabs_h --duplicate-ints --lowercase --i2s --s2i field > $@
126 gen_flagtabs_h_SOURCES = gen_tables.c gen_tables.h flagtab.h
127 gen_flagtabs_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="flagtab.h"'
128 $(gen_flagtabs_h_OBJECTS): CC=$(CC_FOR_BUILD)
129 $(gen_flagtabs_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD)
130 gen_flagtabs_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD)
131 flagtabs.h: gen_flagtabs_h Makefile
132 ./gen_flagtabs_h --lowercase --i2s --s2i flag > $@
134 gen_ftypetabs_h_SOURCES = gen_tables.c gen_tables.h ftypetab.h
135 gen_ftypetabs_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="ftypetab.h"'
136 $(gen_ftypetabs_h_OBJECTS): CC=$(CC_FOR_BUILD)
137 $(gen_ftypetabs_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD)
138 gen_ftypetabs_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD)
139 ftypetabs.h: gen_ftypetabs_h Makefile
140 ./gen_ftypetabs_h --lowercase --i2s --s2i ftype > $@
142 gen_i386_tables_h_SOURCES = gen_tables.c gen_tables.h i386_table.h
143 gen_i386_tables_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="i386_table.h"'
144 $(gen_i386_tables_h_OBJECTS): CC=$(CC_FOR_BUILD)
145 $(gen_i386_tables_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD)
146 gen_i386_tables_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD)
147 i386_tables.h: gen_i386_tables_h Makefile
148 ./gen_i386_tables_h --duplicate-ints --lowercase --i2s --s2i \
151 gen_ia64_tables_h_SOURCES = gen_tables.c gen_tables.h ia64_table.h
152 gen_ia64_tables_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="ia64_table.h"'
153 $(gen_ia64_tables_h_OBJECTS): CC=$(CC_FOR_BUILD)
154 $(gen_ia64_tables_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD)
155 gen_ia64_tables_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD)
156 ia64_tables.h: gen_ia64_tables_h Makefile
157 ./gen_ia64_tables_h --lowercase --i2s --s2i ia64_syscall > $@
159 gen_machinetabs_h_SOURCES = gen_tables.c gen_tables.h machinetab.h
160 gen_machinetabs_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="machinetab.h"'
161 $(gen_machinetabs_h_OBJECTS): CC=$(CC_FOR_BUILD)
162 $(gen_machinetabs_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD)
163 gen_machinetabs_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD)
164 machinetabs.h: gen_machinetabs_h Makefile
165 ./gen_machinetabs_h --duplicate-ints --lowercase --i2s --s2i machine \
168 gen_msg_typetabs_h_SOURCES = gen_tables.c gen_tables.h msg_typetab.h
169 gen_msg_typetabs_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="msg_typetab.h"'
170 $(gen_msg_typetabs_h_OBJECTS): CC=$(CC_FOR_BUILD)
171 $(gen_msg_typetabs_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD)
172 gen_msg_typetabs_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD)
173 msg_typetabs.h: gen_msg_typetabs_h Makefile
174 ./gen_msg_typetabs_h --uppercase --i2s --s2i msg_type > $@
176 gen_optabs_h_SOURCES = gen_tables.c gen_tables.h optab.h
177 gen_optabs_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="optab.h"'
178 $(gen_optabs_h_OBJECTS): CC=$(CC_FOR_BUILD)
179 $(gen_optabs_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD)
180 gen_optabs_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD)
181 optabs.h: gen_optabs_h Makefile
182 ./gen_optabs_h --i2s op > $@
184 gen_ppc_tables_h_SOURCES = gen_tables.c gen_tables.h ppc_table.h
185 gen_ppc_tables_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="ppc_table.h"'
186 $(gen_ppc_tables_h_OBJECTS): CC=$(CC_FOR_BUILD)
187 $(gen_ppc_tables_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD)
188 gen_ppc_tables_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD)
189 ppc_tables.h: gen_ppc_tables_h Makefile
190 ./gen_ppc_tables_h --lowercase --i2s --s2i ppc_syscall > $@
192 gen_s390_tables_h_SOURCES = gen_tables.c gen_tables.h s390_table.h
193 gen_s390_tables_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="s390_table.h"'
194 $(gen_s390_tables_h_OBJECTS): CC=$(CC_FOR_BUILD)
195 $(gen_s390_tables_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD)
196 gen_s390_tables_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD)
197 s390_tables.h: gen_s390_tables_h Makefile
198 ./gen_s390_tables_h --lowercase --i2s --s2i s390_syscall > $@
200 gen_s390x_tables_h_SOURCES = gen_tables.c gen_tables.h s390x_table.h
201 gen_s390x_tables_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="s390x_table.h"'
202 $(gen_s390x_tables_h_OBJECTS): CC=$(CC_FOR_BUILD)
203 $(gen_s390x_tables_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD)
204 gen_s390x_tables_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD)
205 s390x_tables.h: gen_s390x_tables_h Makefile
206 ./gen_s390x_tables_h --lowercase --i2s --s2i s390x_syscall > $@
208 gen_x86_64_tables_h_SOURCES = gen_tables.c gen_tables.h x86_64_table.h
209 gen_x86_64_tables_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="x86_64_table.h"'
210 $(gen_x86_64_tables_h_OBJECTS): CC=$(CC_FOR_BUILD)
211 $(gen_x86_64_tables_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD)
212 gen_x86_64_tables_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD)
213 x86_64_tables.h: gen_x86_64_tables_h Makefile
214 ./gen_x86_64_tables_h --lowercase --i2s --s2i x86_64_syscall > $@