• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# 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 = \
31	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 \
43	priv/host_generic_simd128.h \
44	priv/host_x86_defs.h \
45	priv/host_amd64_defs.h \
46	priv/host_ppc_defs.h \
47	priv/host_arm_defs.h
48
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: auxprogs/genoffsets.c \
56			    pub/libvex_basictypes.h \
57			    pub/libvex_guest_x86.h \
58			    pub/libvex_guest_amd64.h \
59			    pub/libvex_guest_ppc32.h \
60			    pub/libvex_guest_ppc64.h \
61			    pub/libvex_guest_arm.h
62	rm -f auxprogs/genoffsets.s
63	$(CC) $(LIBVEX_CFLAGS) \
64	      $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) \
65				-O -S -o auxprogs/genoffsets.s \
66					 auxprogs/genoffsets.c
67	grep xyzzy auxprogs/genoffsets.s | grep define \
68	   | sed "s/xyzzy\\$$//g" \
69	   | sed "s/xyzzy#//g" \
70	   | sed "s/xyzzy//g" \
71	   > pub/libvex_guest_offsets.h
72	rm -f auxprogs/genoffsets.s
73
74#----------------------------------------------------------------------------
75# libvex-<platform>.a
76#----------------------------------------------------------------------------
77
78pkglib_LIBRARIES  = libvex-@VGCONF_ARCH_PRI@-@VGCONF_OS@.a
79if VGCONF_HAVE_PLATFORM_SEC
80pkglib_LIBRARIES += libvex-@VGCONF_ARCH_SEC@-@VGCONF_OS@.a
81endif
82
83LIBVEX_SOURCES_COMMON = \
84	priv/main_globals.c \
85	priv/main_main.c \
86	priv/main_util.c \
87	priv/ir_defs.c \
88	priv/ir_match.c \
89	priv/ir_opt.c \
90	priv/guest_generic_bb_to_IR.c \
91	priv/guest_generic_x87.c \
92	priv/guest_x86_helpers.c \
93	priv/guest_x86_toIR.c \
94	priv/guest_amd64_helpers.c \
95	priv/guest_amd64_toIR.c \
96	priv/guest_ppc_helpers.c \
97	priv/guest_ppc_toIR.c \
98	priv/guest_arm_helpers.c \
99	priv/guest_arm_toIR.c \
100	priv/host_generic_regs.c \
101	priv/host_generic_simd64.c \
102	priv/host_generic_simd128.c \
103	priv/host_generic_reg_alloc2.c \
104	priv/host_x86_defs.c \
105	priv/host_x86_isel.c \
106	priv/host_amd64_defs.c \
107	priv/host_amd64_isel.c \
108	priv/host_ppc_defs.c \
109	priv/host_ppc_isel.c \
110	priv/host_arm_defs.c \
111	priv/host_arm_isel.c
112
113LIBVEX_CFLAGS = \
114	-Wbad-function-cast \
115	-Wcast-qual \
116	-Wcast-align \
117	-fstrict-aliasing
118
119libvex_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_SOURCES  = $(LIBVEX_SOURCES_COMMON)
120libvex_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CPPFLAGS = \
121        $(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) -Ipriv
122libvex_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CFLAGS   = \
123        $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) $(LIBVEX_CFLAGS)
124if VGCONF_HAVE_PLATFORM_SEC
125libvex_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_SOURCES  = $(LIBVEX_SOURCES_COMMON)
126libvex_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CPPFLAGS = \
127        $(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) -Ipriv
128libvex_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CFLAGS   = \
129        $(AM_CFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) $(LIBVEX_CFLAGS)
130endif
131
132