njn | 8b68b64 | 2009-06-24 00:37:09 +0000 | [diff] [blame] | 1 | # VEX/Makefile is generated from this file at configure-time. |
| 2 | |
| 3 | include $(top_srcdir)/Makefile.all.am |
| 4 | |
| 5 | #---------------------------------------------------------------------------- |
| 6 | # Headers, etc |
| 7 | #---------------------------------------------------------------------------- |
| 8 | |
| 9 | EXTRA_DIST = \ |
| 10 | HACKING.README \ |
| 11 | LICENSE.README \ |
| 12 | LICENSE.GPL \ |
njn | 8b68b64 | 2009-06-24 00:37:09 +0000 | [diff] [blame] | 13 | auxprogs/genoffsets.c |
| 14 | |
| 15 | pkginclude_HEADERS = \ |
| 16 | pub/libvex.h \ |
| 17 | pub/libvex_basictypes.h \ |
florian | 7452db8 | 2012-08-25 21:48:22 +0000 | [diff] [blame] | 18 | pub/libvex_emnote.h \ |
njn | 8b68b64 | 2009-06-24 00:37:09 +0000 | [diff] [blame] | 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 \ |
sewardj | f0c1250 | 2014-01-12 12:54:00 +0000 | [diff] [blame] | 25 | pub/libvex_guest_arm64.h \ |
sewardj | b5b8740 | 2011-03-07 16:05:35 +0000 | [diff] [blame] | 26 | pub/libvex_guest_s390x.h \ |
sewardj | 5db1540 | 2012-06-07 09:13:21 +0000 | [diff] [blame] | 27 | pub/libvex_guest_mips32.h \ |
florian | e42cca5 | 2013-08-29 17:59:27 +0000 | [diff] [blame] | 28 | pub/libvex_guest_mips64.h \ |
sewardj | 112711a | 2015-04-10 12:30:09 +0000 | [diff] [blame] | 29 | pub/libvex_guest_tilegx.h \ |
sewardj | 5730031 | 2011-03-07 16:42:02 +0000 | [diff] [blame] | 30 | pub/libvex_s390x_common.h \ |
njn | 8b68b64 | 2009-06-24 00:37:09 +0000 | [diff] [blame] | 31 | pub/libvex_ir.h \ |
| 32 | pub/libvex_trc_values.h |
| 33 | |
| 34 | noinst_HEADERS = \ |
sewardj | 27824a7 | 2009-07-02 12:23:16 +0000 | [diff] [blame] | 35 | priv/main_globals.h \ |
| 36 | priv/main_util.h \ |
| 37 | priv/ir_match.h \ |
| 38 | priv/ir_opt.h \ |
| 39 | priv/guest_generic_bb_to_IR.h \ |
| 40 | priv/guest_generic_x87.h \ |
| 41 | priv/guest_x86_defs.h \ |
| 42 | priv/guest_amd64_defs.h \ |
| 43 | priv/guest_ppc_defs.h \ |
| 44 | priv/guest_arm_defs.h \ |
sewardj | f0c1250 | 2014-01-12 12:54:00 +0000 | [diff] [blame] | 45 | priv/guest_arm64_defs.h \ |
sewardj | b5b8740 | 2011-03-07 16:05:35 +0000 | [diff] [blame] | 46 | priv/guest_s390_defs.h \ |
sewardj | 5db1540 | 2012-06-07 09:13:21 +0000 | [diff] [blame] | 47 | priv/guest_mips_defs.h \ |
sewardj | 112711a | 2015-04-10 12:30:09 +0000 | [diff] [blame] | 48 | priv/guest_tilegx_defs.h \ |
sewardj | 27824a7 | 2009-07-02 12:23:16 +0000 | [diff] [blame] | 49 | priv/host_generic_regs.h \ |
| 50 | priv/host_generic_simd64.h \ |
sewardj | b823b85 | 2010-06-18 08:18:38 +0000 | [diff] [blame] | 51 | priv/host_generic_simd128.h \ |
sewardj | fda50af | 2013-03-27 11:43:20 +0000 | [diff] [blame] | 52 | priv/host_generic_simd256.h \ |
| 53 | priv/host_generic_maddf.h \ |
sewardj | 27824a7 | 2009-07-02 12:23:16 +0000 | [diff] [blame] | 54 | priv/host_x86_defs.h \ |
| 55 | priv/host_amd64_defs.h \ |
| 56 | priv/host_ppc_defs.h \ |
sewardj | b5b8740 | 2011-03-07 16:05:35 +0000 | [diff] [blame] | 57 | priv/host_arm_defs.h \ |
sewardj | f0c1250 | 2014-01-12 12:54:00 +0000 | [diff] [blame] | 58 | priv/host_arm64_defs.h \ |
sewardj | b5b8740 | 2011-03-07 16:05:35 +0000 | [diff] [blame] | 59 | priv/host_s390_defs.h \ |
florian | 6c1470a | 2015-04-18 09:15:47 +0000 | [diff] [blame^] | 60 | priv/host_tilegx_defs.h \ |
florian | 4b2e2df | 2012-09-20 01:22:53 +0000 | [diff] [blame] | 61 | priv/s390_disasm.h \ |
florian | 142a4ba | 2012-12-24 00:16:23 +0000 | [diff] [blame] | 62 | priv/s390_defs.h \ |
sewardj | 112711a | 2015-04-10 12:30:09 +0000 | [diff] [blame] | 63 | priv/host_mips_defs.h \ |
| 64 | priv/tilegx_disasm.h |
njn | 8b68b64 | 2009-06-24 00:37:09 +0000 | [diff] [blame] | 65 | |
| 66 | BUILT_SOURCES = pub/libvex_guest_offsets.h |
| 67 | CLEANFILES = pub/libvex_guest_offsets.h |
| 68 | |
florian | a6b1728 | 2014-09-05 14:08:51 +0000 | [diff] [blame] | 69 | if COMPILER_IS_CLANG |
| 70 | CFLAGS_FOR_GENOFFSETS = $(CFLAGS) -no-integrated-as |
| 71 | else |
| 72 | CFLAGS_FOR_GENOFFSETS = $(CFLAGS) |
| 73 | endif |
| 74 | |
njn | 8b68b64 | 2009-06-24 00:37:09 +0000 | [diff] [blame] | 75 | # This is very uggerly. Need to sed out both "xyzzyN" and |
| 76 | # "xyzzy$N" since gcc on different targets emits the constants |
| 77 | # differently -- with a leading $ on x86/amd64 but none on ppc32/64. |
florian | 4e94bda | 2014-10-29 13:57:49 +0000 | [diff] [blame] | 78 | # ICC also emits the constants differently with a leading # #define |
sewardj | f3d5c6e | 2010-09-28 15:09:47 +0000 | [diff] [blame] | 79 | pub/libvex_guest_offsets.h: auxprogs/genoffsets.c \ |
| 80 | pub/libvex_basictypes.h \ |
| 81 | pub/libvex_guest_x86.h \ |
| 82 | pub/libvex_guest_amd64.h \ |
| 83 | pub/libvex_guest_ppc32.h \ |
| 84 | pub/libvex_guest_ppc64.h \ |
sewardj | b5b8740 | 2011-03-07 16:05:35 +0000 | [diff] [blame] | 85 | pub/libvex_guest_arm.h \ |
sewardj | f0c1250 | 2014-01-12 12:54:00 +0000 | [diff] [blame] | 86 | pub/libvex_guest_arm64.h \ |
sewardj | 5db1540 | 2012-06-07 09:13:21 +0000 | [diff] [blame] | 87 | pub/libvex_guest_s390x.h \ |
florian | e42cca5 | 2013-08-29 17:59:27 +0000 | [diff] [blame] | 88 | pub/libvex_guest_mips32.h \ |
sewardj | 112711a | 2015-04-10 12:30:09 +0000 | [diff] [blame] | 89 | pub/libvex_guest_mips64.h \ |
| 90 | pub/libvex_guest_tilegx.h |
njn | 8b68b64 | 2009-06-24 00:37:09 +0000 | [diff] [blame] | 91 | rm -f auxprogs/genoffsets.s |
mjw | e299020 | 2014-05-09 13:34:13 +0000 | [diff] [blame] | 92 | $(mkdir_p) auxprogs pub |
florian | a6b1728 | 2014-09-05 14:08:51 +0000 | [diff] [blame] | 93 | $(CC) $(CFLAGS_FOR_GENOFFSETS) \ |
sewardj | 51331e1 | 2011-07-07 14:05:39 +0000 | [diff] [blame] | 94 | $(LIBVEX_CFLAGS) \ |
sewardj | 76cd8d7 | 2010-08-22 11:51:26 +0000 | [diff] [blame] | 95 | $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) \ |
| 96 | -O -S -o auxprogs/genoffsets.s \ |
mjw | e299020 | 2014-05-09 13:34:13 +0000 | [diff] [blame] | 97 | $(srcdir)/auxprogs/genoffsets.c |
florian | 4e94bda | 2014-10-29 13:57:49 +0000 | [diff] [blame] | 98 | grep xyzzy auxprogs/genoffsets.s | grep "^[# ]*#define" \ |
| 99 | | sed "s/# #define/#define/g" \ |
sewardj | 59570ff | 2010-01-01 11:59:33 +0000 | [diff] [blame] | 100 | | sed "s/xyzzy\\$$//g" \ |
| 101 | | sed "s/xyzzy#//g" \ |
| 102 | | sed "s/xyzzy//g" \ |
njn | 8b68b64 | 2009-06-24 00:37:09 +0000 | [diff] [blame] | 103 | > pub/libvex_guest_offsets.h |
| 104 | rm -f auxprogs/genoffsets.s |
| 105 | |
| 106 | #---------------------------------------------------------------------------- |
philippe | d7065d5 | 2015-04-01 20:06:26 +0000 | [diff] [blame] | 107 | # libvex-<platform>-<os>.a : containing all VEX objects, including |
| 108 | # a main_main.o compiled in single arch (guest==host). |
| 109 | # libvexmultiarch-<platform>-<os>.a, only containing multiarch_main_main.o, |
| 110 | # which is main_main.c compiled so that any guest/host combination |
| 111 | # can be done at runtime. |
njn | 8b68b64 | 2009-06-24 00:37:09 +0000 | [diff] [blame] | 112 | #---------------------------------------------------------------------------- |
| 113 | |
philippe | d7065d5 | 2015-04-01 20:06:26 +0000 | [diff] [blame] | 114 | pkglib_LIBRARIES = libvex-@VGCONF_ARCH_PRI@-@VGCONF_OS@.a \ |
| 115 | libvexmultiarch-@VGCONF_ARCH_PRI@-@VGCONF_OS@.a |
njn | 8b68b64 | 2009-06-24 00:37:09 +0000 | [diff] [blame] | 116 | if VGCONF_HAVE_PLATFORM_SEC |
philippe | d7065d5 | 2015-04-01 20:06:26 +0000 | [diff] [blame] | 117 | pkglib_LIBRARIES += libvex-@VGCONF_ARCH_SEC@-@VGCONF_OS@.a \ |
| 118 | libvexmultiarch-@VGCONF_ARCH_SEC@-@VGCONF_OS@.a |
njn | 8b68b64 | 2009-06-24 00:37:09 +0000 | [diff] [blame] | 119 | endif |
| 120 | |
njn | 8b68b64 | 2009-06-24 00:37:09 +0000 | [diff] [blame] | 121 | LIBVEX_SOURCES_COMMON = \ |
sewardj | 27824a7 | 2009-07-02 12:23:16 +0000 | [diff] [blame] | 122 | priv/main_globals.c \ |
| 123 | priv/main_main.c \ |
| 124 | priv/main_util.c \ |
| 125 | priv/ir_defs.c \ |
florian | bb913cd | 2012-08-28 16:50:39 +0000 | [diff] [blame] | 126 | priv/ir_inject.c \ |
sewardj | 27824a7 | 2009-07-02 12:23:16 +0000 | [diff] [blame] | 127 | priv/ir_match.c \ |
| 128 | priv/ir_opt.c \ |
| 129 | priv/guest_generic_bb_to_IR.c \ |
| 130 | priv/guest_generic_x87.c \ |
| 131 | priv/guest_x86_helpers.c \ |
| 132 | priv/guest_x86_toIR.c \ |
| 133 | priv/guest_amd64_helpers.c \ |
| 134 | priv/guest_amd64_toIR.c \ |
| 135 | priv/guest_ppc_helpers.c \ |
| 136 | priv/guest_ppc_toIR.c \ |
| 137 | priv/guest_arm_helpers.c \ |
| 138 | priv/guest_arm_toIR.c \ |
sewardj | f0c1250 | 2014-01-12 12:54:00 +0000 | [diff] [blame] | 139 | priv/guest_arm64_helpers.c \ |
| 140 | priv/guest_arm64_toIR.c \ |
sewardj | b5b8740 | 2011-03-07 16:05:35 +0000 | [diff] [blame] | 141 | priv/guest_s390_helpers.c \ |
| 142 | priv/guest_s390_toIR.c \ |
sewardj | 5db1540 | 2012-06-07 09:13:21 +0000 | [diff] [blame] | 143 | priv/guest_mips_helpers.c \ |
| 144 | priv/guest_mips_toIR.c \ |
sewardj | 112711a | 2015-04-10 12:30:09 +0000 | [diff] [blame] | 145 | priv/guest_tilegx_helpers.c \ |
| 146 | priv/guest_tilegx_toIR.c \ |
sewardj | 27824a7 | 2009-07-02 12:23:16 +0000 | [diff] [blame] | 147 | priv/host_generic_regs.c \ |
| 148 | priv/host_generic_simd64.c \ |
sewardj | b823b85 | 2010-06-18 08:18:38 +0000 | [diff] [blame] | 149 | priv/host_generic_simd128.c \ |
sewardj | fda50af | 2013-03-27 11:43:20 +0000 | [diff] [blame] | 150 | priv/host_generic_simd256.c \ |
| 151 | priv/host_generic_maddf.c \ |
sewardj | 27824a7 | 2009-07-02 12:23:16 +0000 | [diff] [blame] | 152 | priv/host_generic_reg_alloc2.c \ |
| 153 | priv/host_x86_defs.c \ |
| 154 | priv/host_x86_isel.c \ |
| 155 | priv/host_amd64_defs.c \ |
| 156 | priv/host_amd64_isel.c \ |
| 157 | priv/host_ppc_defs.c \ |
| 158 | priv/host_ppc_isel.c \ |
| 159 | priv/host_arm_defs.c \ |
sewardj | b5b8740 | 2011-03-07 16:05:35 +0000 | [diff] [blame] | 160 | priv/host_arm_isel.c \ |
sewardj | f0c1250 | 2014-01-12 12:54:00 +0000 | [diff] [blame] | 161 | priv/host_arm64_defs.c \ |
| 162 | priv/host_arm64_isel.c \ |
sewardj | b5b8740 | 2011-03-07 16:05:35 +0000 | [diff] [blame] | 163 | priv/host_s390_defs.c \ |
| 164 | priv/host_s390_isel.c \ |
florian | 4b2e2df | 2012-09-20 01:22:53 +0000 | [diff] [blame] | 165 | priv/s390_disasm.c \ |
sewardj | 5db1540 | 2012-06-07 09:13:21 +0000 | [diff] [blame] | 166 | priv/host_mips_defs.c \ |
sewardj | 112711a | 2015-04-10 12:30:09 +0000 | [diff] [blame] | 167 | priv/host_mips_isel.c \ |
| 168 | priv/host_tilegx_defs.c \ |
| 169 | priv/host_tilegx_isel.c \ |
| 170 | priv/tilegx_disasm.c |
njn | 8b68b64 | 2009-06-24 00:37:09 +0000 | [diff] [blame] | 171 | |
philippe | d7065d5 | 2015-04-01 20:06:26 +0000 | [diff] [blame] | 172 | LIBVEXMULTIARCH_SOURCES = priv/multiarch_main_main.c |
| 173 | |
njn | 8b68b64 | 2009-06-24 00:37:09 +0000 | [diff] [blame] | 174 | LIBVEX_CFLAGS = \ |
| 175 | -Wbad-function-cast \ |
njn | 8b68b64 | 2009-06-24 00:37:09 +0000 | [diff] [blame] | 176 | -fstrict-aliasing |
| 177 | |
| 178 | libvex_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_SOURCES = $(LIBVEX_SOURCES_COMMON) |
| 179 | libvex_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CPPFLAGS = \ |
| 180 | $(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) -Ipriv |
| 181 | libvex_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CFLAGS = \ |
| 182 | $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) $(LIBVEX_CFLAGS) |
| 183 | if VGCONF_HAVE_PLATFORM_SEC |
| 184 | libvex_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_SOURCES = $(LIBVEX_SOURCES_COMMON) |
| 185 | libvex_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CPPFLAGS = \ |
| 186 | $(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) -Ipriv |
| 187 | libvex_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CFLAGS = \ |
| 188 | $(AM_CFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) $(LIBVEX_CFLAGS) |
| 189 | endif |
| 190 | |
philippe | d7065d5 | 2015-04-01 20:06:26 +0000 | [diff] [blame] | 191 | libvexmultiarch_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_SOURCES = \ |
| 192 | $(LIBVEXMULTIARCH_SOURCES) |
| 193 | libvexmultiarch_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CPPFLAGS = \ |
| 194 | $(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) -Ipriv |
| 195 | libvexmultiarch_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CFLAGS = \ |
| 196 | $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) $(LIBVEX_CFLAGS) |
| 197 | if VGCONF_HAVE_PLATFORM_SEC |
| 198 | libvexmultiarch_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_SOURCES = \ |
| 199 | $(LIBVEXMULTIARCH_SOURCES) |
| 200 | libvexmultiarch_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CPPFLAGS = \ |
| 201 | $(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) -Ipriv |
| 202 | libvexmultiarch_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CFLAGS = \ |
| 203 | $(AM_CFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) $(LIBVEX_CFLAGS) |
| 204 | endif |
| 205 | |