blob: c0805457ef3369dfb7f130c5c52ae545c90c56b8 [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 \
20 pub/libvex_emwarn.h \
21 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 \
27 pub/libvex_ir.h \
28 pub/libvex_trc_values.h
29
30noinst_HEADERS = \
sewardj27824a72009-07-02 12:23:16 +000031 priv/main_globals.h \
32 priv/main_util.h \
33 priv/ir_match.h \
34 priv/ir_opt.h \
35 priv/guest_generic_bb_to_IR.h \
36 priv/guest_generic_x87.h \
37 priv/guest_x86_defs.h \
38 priv/guest_amd64_defs.h \
39 priv/guest_ppc_defs.h \
40 priv/guest_arm_defs.h \
41 priv/host_generic_regs.h \
42 priv/host_generic_simd64.h \
sewardjb823b852010-06-18 08:18:38 +000043 priv/host_generic_simd128.h \
sewardj27824a72009-07-02 12:23:16 +000044 priv/host_x86_defs.h \
45 priv/host_amd64_defs.h \
46 priv/host_ppc_defs.h \
47 priv/host_arm_defs.h
njn8b68b642009-06-24 00:37:09 +000048
49BUILT_SOURCES = pub/libvex_guest_offsets.h
50CLEANFILES = pub/libvex_guest_offsets.h
51
52# This is very uggerly. Need to sed out both "xyzzyN" and
53# "xyzzy$N" since gcc on different targets emits the constants
54# differently -- with a leading $ on x86/amd64 but none on ppc32/64.
55pub/libvex_guest_offsets.h:
56 rm -f auxprogs/genoffsets.s
sewardj76cd8d72010-08-22 11:51:26 +000057 $(CC) $(LIBVEX_CFLAGS) \
58 $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) \
59 -O -S -o auxprogs/genoffsets.s \
60 auxprogs/genoffsets.c
njn8b68b642009-06-24 00:37:09 +000061 grep xyzzy auxprogs/genoffsets.s | grep define \
sewardj59570ff2010-01-01 11:59:33 +000062 | sed "s/xyzzy\\$$//g" \
63 | sed "s/xyzzy#//g" \
64 | sed "s/xyzzy//g" \
njn8b68b642009-06-24 00:37:09 +000065 > pub/libvex_guest_offsets.h
66 rm -f auxprogs/genoffsets.s
67
68#----------------------------------------------------------------------------
njn8b68b642009-06-24 00:37:09 +000069# libvex-<platform>.a
70#----------------------------------------------------------------------------
71
72pkglib_LIBRARIES = libvex-@VGCONF_ARCH_PRI@-@VGCONF_OS@.a
73if VGCONF_HAVE_PLATFORM_SEC
74pkglib_LIBRARIES += libvex-@VGCONF_ARCH_SEC@-@VGCONF_OS@.a
75endif
76
njn8b68b642009-06-24 00:37:09 +000077LIBVEX_SOURCES_COMMON = \
sewardj27824a72009-07-02 12:23:16 +000078 priv/main_globals.c \
79 priv/main_main.c \
80 priv/main_util.c \
81 priv/ir_defs.c \
82 priv/ir_match.c \
83 priv/ir_opt.c \
84 priv/guest_generic_bb_to_IR.c \
85 priv/guest_generic_x87.c \
86 priv/guest_x86_helpers.c \
87 priv/guest_x86_toIR.c \
88 priv/guest_amd64_helpers.c \
89 priv/guest_amd64_toIR.c \
90 priv/guest_ppc_helpers.c \
91 priv/guest_ppc_toIR.c \
92 priv/guest_arm_helpers.c \
93 priv/guest_arm_toIR.c \
94 priv/host_generic_regs.c \
95 priv/host_generic_simd64.c \
sewardjb823b852010-06-18 08:18:38 +000096 priv/host_generic_simd128.c \
sewardj27824a72009-07-02 12:23:16 +000097 priv/host_generic_reg_alloc2.c \
98 priv/host_x86_defs.c \
99 priv/host_x86_isel.c \
100 priv/host_amd64_defs.c \
101 priv/host_amd64_isel.c \
102 priv/host_ppc_defs.c \
103 priv/host_ppc_isel.c \
104 priv/host_arm_defs.c \
105 priv/host_arm_isel.c
njn8b68b642009-06-24 00:37:09 +0000106
107LIBVEX_CFLAGS = \
108 -Wbad-function-cast \
109 -Wcast-qual \
110 -Wcast-align \
111 -fstrict-aliasing
112
113libvex_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_SOURCES = $(LIBVEX_SOURCES_COMMON)
114libvex_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CPPFLAGS = \
115 $(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) -Ipriv
116libvex_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CFLAGS = \
117 $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) $(LIBVEX_CFLAGS)
118if VGCONF_HAVE_PLATFORM_SEC
119libvex_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_SOURCES = $(LIBVEX_SOURCES_COMMON)
120libvex_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CPPFLAGS = \
121 $(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) -Ipriv
122libvex_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CFLAGS = \
123 $(AM_CFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) $(LIBVEX_CFLAGS)
124endif
125