FreeBSD Helgrind: turn off check for locks held on exit for FreeBSD 14.2
[valgrind.git] / Makefile.vex.am
blobc1244a69d25c7a14d2fff05603e2a32cfa68748e
1 # VEX/Makefile is generated from this file at configure-time.
3 include $(top_srcdir)/Makefile.all.am
5 #----------------------------------------------------------------------------
6 # Headers, etc
7 #----------------------------------------------------------------------------
9 EXTRA_DIST = \
10         HACKING.README \
11         LICENSE.README \
12         LICENSE.GPL \
13         auxprogs/genoffsets.c
15 pkginclude_HEADERS = \
16         pub/libvex.h \
17         pub/libvex_basictypes.h \
18         pub/libvex_emnote.h \
19         pub/libvex_guest_offsets.h \
20         pub/libvex_guest_x86.h \
21         pub/libvex_guest_amd64.h \
22         pub/libvex_guest_ppc32.h \
23         pub/libvex_guest_ppc64.h \
24         pub/libvex_guest_arm.h \
25         pub/libvex_guest_arm64.h \
26         pub/libvex_guest_s390x.h \
27         pub/libvex_guest_mips32.h \
28         pub/libvex_guest_mips64.h \
29         pub/libvex_s390x_common.h \
30         pub/libvex_ir.h \
31         pub/libvex_trc_values.h \
32         pub/libvex_inner.h
33 # libvex_inner.h is special: it is a public header for valgrind core,
34 # but should not be used by the end user
36 noinst_HEADERS = \
37         priv/main_globals.h \
38         priv/main_util.h \
39         priv/ir_match.h \
40         priv/ir_opt.h \
41         priv/guest_generic_bb_to_IR.h \
42         priv/guest_generic_x87.h \
43         priv/guest_x86_defs.h \
44         priv/guest_amd64_defs.h \
45         priv/guest_ppc_defs.h \
46         priv/guest_arm_defs.h \
47         priv/guest_arm64_defs.h \
48         priv/guest_s390_defs.h \
49         priv/guest_mips_defs.h \
50         priv/mips_defs.h \
51         priv/guest_nanomips_defs.h \
52         priv/host_generic_regs.h \
53         priv/host_generic_simd64.h \
54         priv/host_generic_simd128.h \
55         priv/host_generic_simd256.h \
56         priv/host_generic_maddf.h \
57         priv/host_amd64_maddf.h \
58         priv/host_x86_defs.h \
59         priv/host_amd64_defs.h \
60         priv/host_ppc_defs.h \
61         priv/host_arm_defs.h \
62         priv/host_arm64_defs.h \
63         priv/host_s390_defs.h \
64         priv/s390_disasm.h \
65         priv/s390_defs.h \
66         priv/host_mips_defs.h \
67         priv/host_nanomips_defs.h \
68         priv/common_nanomips_defs.h
70 BUILT_SOURCES = pub/libvex_guest_offsets.h
71 CLEANFILES    = pub/libvex_guest_offsets.h
73 if COMPILER_IS_CLANG
74 CFLAGS_FOR_GENOFFSETS = $(CFLAGS) -no-integrated-as
75 else
76 CFLAGS_FOR_GENOFFSETS = $(CFLAGS)
77 endif
79 # for VEX building, use the LTO versions, in case they differ from non lto versions
80 AR = ${LTO_AR}
81 RANLIB = ${LTO_RANLIB}
83 # This is very uggerly.  Need to sed out both "xyzzyN" and
84 # "xyzzy$N" since gcc on different targets emits the constants
85 # differently -- with a leading $ on x86/amd64 but none on ppc32/64.
86 # ICC also emits the constants differently with a leading # #define
87 pub/libvex_guest_offsets.h: auxprogs/genoffsets.c \
88                             pub/libvex_basictypes.h \
89                             pub/libvex_guest_x86.h \
90                             pub/libvex_guest_amd64.h \
91                             pub/libvex_guest_ppc32.h \
92                             pub/libvex_guest_ppc64.h \
93                             pub/libvex_guest_arm.h \
94                             pub/libvex_guest_arm64.h \
95                             pub/libvex_guest_s390x.h \
96                             pub/libvex_guest_mips32.h \
97                             pub/libvex_guest_mips64.h
98         rm -f auxprogs/genoffsets.s
99         $(mkdir_p) auxprogs pub
100         $(CC) $(CFLAGS_FOR_GENOFFSETS) \
101               $(LIBVEX_CFLAGS_NO_LTO) \
102               $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) \
103                                 -O -S -o auxprogs/genoffsets.s \
104                                          $(srcdir)/auxprogs/genoffsets.c
105         grep xyzzy auxprogs/genoffsets.s | grep "^[# ]*#define" \
106            | sed "s/# #define/#define/g" \
107            | sed "s/xyzzy\\$$//g" \
108            | sed "s/xyzzy#//g" \
109            | sed "s/xyzzy//g" \
110            > pub/libvex_guest_offsets.h
111         rm -f auxprogs/genoffsets.s
113 #----------------------------------------------------------------------------
114 # libvex-<platform>-<os>.a : containing all VEX objects, including
115 # a main_main.o compiled in single arch (guest==host).
116 # libvexmultiarch-<platform>-<os>.a, only containing multiarch_main_main.o,
117 # which is main_main.c compiled so that any guest/host combination
118 # can be done at runtime.
119 #----------------------------------------------------------------------------
121 pkglib_LIBRARIES  = libvex-@VGCONF_ARCH_PRI@-@VGCONF_OS@.a \
122         libvexmultiarch-@VGCONF_ARCH_PRI@-@VGCONF_OS@.a
123 if VGCONF_HAVE_PLATFORM_SEC
124 pkglib_LIBRARIES += libvex-@VGCONF_ARCH_SEC@-@VGCONF_OS@.a \
125         libvexmultiarch-@VGCONF_ARCH_SEC@-@VGCONF_OS@.a
126 endif
128 LIBVEX_SOURCES_COMMON = \
129         priv/main_globals.c \
130         priv/main_main.c \
131         priv/main_util.c \
132         priv/ir_defs.c \
133         priv/ir_inject.c \
134         priv/ir_match.c \
135         priv/ir_opt.c \
136         priv/guest_generic_bb_to_IR.c \
137         priv/guest_generic_x87.c \
138         priv/guest_x86_helpers.c \
139         priv/guest_x86_toIR.c \
140         priv/guest_amd64_helpers.c \
141         priv/guest_amd64_toIR.c \
142         priv/guest_ppc_helpers.c \
143         priv/guest_ppc_toIR.c \
144         priv/guest_arm_helpers.c \
145         priv/guest_arm_toIR.c \
146         priv/guest_arm64_helpers.c \
147         priv/guest_arm64_toIR.c \
148         priv/guest_s390_helpers.c \
149         priv/guest_s390_toIR.c \
150         priv/guest_mips_helpers.c \
151         priv/guest_mipsdsp_toIR.c \
152         priv/guest_mips_toIR.c \
153         priv/guest_nanomips_helpers.c \
154         priv/guest_nanomips_toIR.c \
155         priv/host_generic_regs.c \
156         priv/host_generic_simd64.c \
157         priv/host_generic_simd128.c \
158         priv/host_generic_simd256.c \
159         priv/host_generic_maddf.c \
160         priv/host_amd64_maddf.c \
161         priv/host_generic_reg_alloc2.c \
162         priv/host_generic_reg_alloc3.c \
163         priv/host_x86_defs.c \
164         priv/host_x86_isel.c \
165         priv/host_amd64_defs.c \
166         priv/host_amd64_isel.c \
167         priv/host_ppc_defs.c \
168         priv/host_ppc_isel.c \
169         priv/host_arm_defs.c \
170         priv/host_arm_isel.c \
171         priv/host_arm64_defs.c \
172         priv/host_arm64_isel.c \
173         priv/host_s390_defs.c \
174         priv/host_s390_isel.c \
175         priv/s390_disasm.c \
176         priv/host_mips_defs.c \
177         priv/host_nanomips_defs.c \
178         priv/host_mips_isel.c \
179         priv/host_nanomips_isel.c
181 LIBVEXMULTIARCH_SOURCES = priv/multiarch_main_main.c
183 LIBVEX_CFLAGS_NO_LTO = \
184         -Wbad-function-cast \
185         -fstrict-aliasing
187 LIBVEX_CFLAGS = ${LTO_CFLAGS} \
188         ${LIBVEX_CFLAGS_NO_LTO}
190 libvex_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_SOURCES  = $(LIBVEX_SOURCES_COMMON)
191 libvex_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CPPFLAGS = \
192         $(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) -Ipriv
193 libvex_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CFLAGS   = \
194         $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) $(LIBVEX_CFLAGS)
195 if VGCONF_HAVE_PLATFORM_SEC
196 libvex_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_SOURCES  = $(LIBVEX_SOURCES_COMMON)
197 libvex_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CPPFLAGS = \
198         $(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) -Ipriv
199 libvex_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CFLAGS   = \
200         $(AM_CFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) $(LIBVEX_CFLAGS)
201 endif
203 libvexmultiarch_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_SOURCES  = \
204         $(LIBVEXMULTIARCH_SOURCES)
205 libvexmultiarch_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CPPFLAGS = \
206         $(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) -Ipriv
207 libvexmultiarch_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CFLAGS   = \
208         $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) $(LIBVEX_CFLAGS)
209 if VGCONF_HAVE_PLATFORM_SEC
210 libvexmultiarch_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_SOURCES  = \
211         $(LIBVEXMULTIARCH_SOURCES)
212 libvexmultiarch_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CPPFLAGS = \
213         $(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) -Ipriv
214 libvexmultiarch_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CFLAGS   = \
215         $(AM_CFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) $(LIBVEX_CFLAGS)
216 endif