blob: 41690e166003ca602bd0dcb9b9b06c1d3ea07d46 [file] [log] [blame]
njn8b68b642009-06-24 00:37:09 +00001# VEX/Makefile is generated from this file at configure-time.
2
3include $(top_srcdir)/Makefile.all.am
4
5#----------------------------------------------------------------------------
6# Headers, etc
7#----------------------------------------------------------------------------
8
9EXTRA_DIST = \
10 HACKING.README \
11 LICENSE.README \
12 LICENSE.GPL \
13 quote.txt \
14 newline.txt \
15 auxprogs/genoffsets.c
16
17pkginclude_HEADERS = \
18 pub/libvex.h \
19 pub/libvex_basictypes.h \
florian7452db82012-08-25 21:48:22 +000020 pub/libvex_emnote.h \
njn8b68b642009-06-24 00:37:09 +000021 pub/libvex_guest_offsets.h \
22 pub/libvex_guest_x86.h \
23 pub/libvex_guest_amd64.h \
24 pub/libvex_guest_ppc32.h \
25 pub/libvex_guest_ppc64.h \
26 pub/libvex_guest_arm.h \
sewardjf0c12502014-01-12 12:54:00 +000027 pub/libvex_guest_arm64.h \
sewardjb5b87402011-03-07 16:05:35 +000028 pub/libvex_guest_s390x.h \
sewardj5db15402012-06-07 09:13:21 +000029 pub/libvex_guest_mips32.h \
floriane42cca52013-08-29 17:59:27 +000030 pub/libvex_guest_mips64.h \
sewardj57300312011-03-07 16:42:02 +000031 pub/libvex_s390x_common.h \
njn8b68b642009-06-24 00:37:09 +000032 pub/libvex_ir.h \
33 pub/libvex_trc_values.h
34
35noinst_HEADERS = \
sewardj27824a72009-07-02 12:23:16 +000036 priv/main_globals.h \
37 priv/main_util.h \
38 priv/ir_match.h \
39 priv/ir_opt.h \
40 priv/guest_generic_bb_to_IR.h \
41 priv/guest_generic_x87.h \
42 priv/guest_x86_defs.h \
43 priv/guest_amd64_defs.h \
44 priv/guest_ppc_defs.h \
45 priv/guest_arm_defs.h \
sewardjf0c12502014-01-12 12:54:00 +000046 priv/guest_arm64_defs.h \
sewardjb5b87402011-03-07 16:05:35 +000047 priv/guest_s390_defs.h \
sewardj5db15402012-06-07 09:13:21 +000048 priv/guest_mips_defs.h \
sewardj27824a72009-07-02 12:23:16 +000049 priv/host_generic_regs.h \
50 priv/host_generic_simd64.h \
sewardjb823b852010-06-18 08:18:38 +000051 priv/host_generic_simd128.h \
sewardjfda50af2013-03-27 11:43:20 +000052 priv/host_generic_simd256.h \
53 priv/host_generic_maddf.h \
sewardj27824a72009-07-02 12:23:16 +000054 priv/host_x86_defs.h \
55 priv/host_amd64_defs.h \
56 priv/host_ppc_defs.h \
sewardjb5b87402011-03-07 16:05:35 +000057 priv/host_arm_defs.h \
sewardjf0c12502014-01-12 12:54:00 +000058 priv/host_arm64_defs.h \
sewardjb5b87402011-03-07 16:05:35 +000059 priv/host_s390_defs.h \
florian4b2e2df2012-09-20 01:22:53 +000060 priv/s390_disasm.h \
florian142a4ba2012-12-24 00:16:23 +000061 priv/s390_defs.h \
sewardj5db15402012-06-07 09:13:21 +000062 priv/host_mips_defs.h
njn8b68b642009-06-24 00:37:09 +000063
64BUILT_SOURCES = pub/libvex_guest_offsets.h
65CLEANFILES = pub/libvex_guest_offsets.h
66
67# This is very uggerly. Need to sed out both "xyzzyN" and
68# "xyzzy$N" since gcc on different targets emits the constants
69# differently -- with a leading $ on x86/amd64 but none on ppc32/64.
sewardjf3d5c6e2010-09-28 15:09:47 +000070pub/libvex_guest_offsets.h: auxprogs/genoffsets.c \
71 pub/libvex_basictypes.h \
72 pub/libvex_guest_x86.h \
73 pub/libvex_guest_amd64.h \
74 pub/libvex_guest_ppc32.h \
75 pub/libvex_guest_ppc64.h \
sewardjb5b87402011-03-07 16:05:35 +000076 pub/libvex_guest_arm.h \
sewardjf0c12502014-01-12 12:54:00 +000077 pub/libvex_guest_arm64.h \
sewardj5db15402012-06-07 09:13:21 +000078 pub/libvex_guest_s390x.h \
floriane42cca52013-08-29 17:59:27 +000079 pub/libvex_guest_mips32.h \
80 pub/libvex_guest_mips64.h
njn8b68b642009-06-24 00:37:09 +000081 rm -f auxprogs/genoffsets.s
mjwe2990202014-05-09 13:34:13 +000082 $(mkdir_p) auxprogs pub
sewardj51331e12011-07-07 14:05:39 +000083 $(CC) $(CFLAGS) \
84 $(LIBVEX_CFLAGS) \
sewardj76cd8d72010-08-22 11:51:26 +000085 $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) \
86 -O -S -o auxprogs/genoffsets.s \
mjwe2990202014-05-09 13:34:13 +000087 $(srcdir)/auxprogs/genoffsets.c
florianf71b35a2012-04-22 19:27:44 +000088 grep xyzzy auxprogs/genoffsets.s | grep "^#define" \
sewardj59570ff2010-01-01 11:59:33 +000089 | sed "s/xyzzy\\$$//g" \
90 | sed "s/xyzzy#//g" \
91 | sed "s/xyzzy//g" \
njn8b68b642009-06-24 00:37:09 +000092 > pub/libvex_guest_offsets.h
93 rm -f auxprogs/genoffsets.s
94
95#----------------------------------------------------------------------------
njn8b68b642009-06-24 00:37:09 +000096# libvex-<platform>.a
97#----------------------------------------------------------------------------
98
99pkglib_LIBRARIES = libvex-@VGCONF_ARCH_PRI@-@VGCONF_OS@.a
100if VGCONF_HAVE_PLATFORM_SEC
101pkglib_LIBRARIES += libvex-@VGCONF_ARCH_SEC@-@VGCONF_OS@.a
102endif
103
njn8b68b642009-06-24 00:37:09 +0000104LIBVEX_SOURCES_COMMON = \
sewardj27824a72009-07-02 12:23:16 +0000105 priv/main_globals.c \
106 priv/main_main.c \
107 priv/main_util.c \
108 priv/ir_defs.c \
florianbb913cd2012-08-28 16:50:39 +0000109 priv/ir_inject.c \
sewardj27824a72009-07-02 12:23:16 +0000110 priv/ir_match.c \
111 priv/ir_opt.c \
112 priv/guest_generic_bb_to_IR.c \
113 priv/guest_generic_x87.c \
114 priv/guest_x86_helpers.c \
115 priv/guest_x86_toIR.c \
116 priv/guest_amd64_helpers.c \
117 priv/guest_amd64_toIR.c \
118 priv/guest_ppc_helpers.c \
119 priv/guest_ppc_toIR.c \
120 priv/guest_arm_helpers.c \
121 priv/guest_arm_toIR.c \
sewardjf0c12502014-01-12 12:54:00 +0000122 priv/guest_arm64_helpers.c \
123 priv/guest_arm64_toIR.c \
sewardjb5b87402011-03-07 16:05:35 +0000124 priv/guest_s390_helpers.c \
125 priv/guest_s390_toIR.c \
sewardj5db15402012-06-07 09:13:21 +0000126 priv/guest_mips_helpers.c \
127 priv/guest_mips_toIR.c \
sewardj27824a72009-07-02 12:23:16 +0000128 priv/host_generic_regs.c \
129 priv/host_generic_simd64.c \
sewardjb823b852010-06-18 08:18:38 +0000130 priv/host_generic_simd128.c \
sewardjfda50af2013-03-27 11:43:20 +0000131 priv/host_generic_simd256.c \
132 priv/host_generic_maddf.c \
sewardj27824a72009-07-02 12:23:16 +0000133 priv/host_generic_reg_alloc2.c \
134 priv/host_x86_defs.c \
135 priv/host_x86_isel.c \
136 priv/host_amd64_defs.c \
137 priv/host_amd64_isel.c \
138 priv/host_ppc_defs.c \
139 priv/host_ppc_isel.c \
140 priv/host_arm_defs.c \
sewardjb5b87402011-03-07 16:05:35 +0000141 priv/host_arm_isel.c \
sewardjf0c12502014-01-12 12:54:00 +0000142 priv/host_arm64_defs.c \
143 priv/host_arm64_isel.c \
sewardjb5b87402011-03-07 16:05:35 +0000144 priv/host_s390_defs.c \
145 priv/host_s390_isel.c \
florian4b2e2df2012-09-20 01:22:53 +0000146 priv/s390_disasm.c \
sewardj5db15402012-06-07 09:13:21 +0000147 priv/host_mips_defs.c \
148 priv/host_mips_isel.c
njn8b68b642009-06-24 00:37:09 +0000149
150LIBVEX_CFLAGS = \
151 -Wbad-function-cast \
152 -Wcast-qual \
153 -Wcast-align \
154 -fstrict-aliasing
155
156libvex_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_SOURCES = $(LIBVEX_SOURCES_COMMON)
157libvex_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CPPFLAGS = \
158 $(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) -Ipriv
159libvex_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CFLAGS = \
160 $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) $(LIBVEX_CFLAGS)
161if VGCONF_HAVE_PLATFORM_SEC
162libvex_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_SOURCES = $(LIBVEX_SOURCES_COMMON)
163libvex_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CPPFLAGS = \
164 $(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) -Ipriv
165libvex_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CFLAGS = \
166 $(AM_CFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) $(LIBVEX_CFLAGS)
167endif
168