sewardj | c5bfaee | 2004-07-22 17:25:03 +0000 | [diff] [blame] | 1 | |
| 2 | PUB_HEADERS = pub/libvex_basictypes.h \ |
| 3 | pub/libvex_ir.h \ |
sewardj | 37a47aa | 2005-01-21 20:54:33 +0000 | [diff] [blame] | 4 | pub/libvex.h \ |
| 5 | pub/libvex_trc_values.h \ |
| 6 | pub/libvex_emwarn.h \ |
| 7 | pub/libvex_guest_x86.h \ |
| 8 | pub/libvex_guest_amd64.h \ |
sewardj | 4206584 | 2005-01-27 16:04:08 +0000 | [diff] [blame] | 9 | pub/libvex_guest_arm.h \ |
sewardj | 600deec | 2005-03-21 01:03:49 +0000 | [diff] [blame] | 10 | pub/libvex_guest_ppc32.h \ |
| 11 | pub/libvex_guest_offsets.h |
sewardj | c5bfaee | 2004-07-22 17:25:03 +0000 | [diff] [blame] | 12 | |
sewardj | d7383ba | 2004-07-27 10:54:21 +0000 | [diff] [blame] | 13 | PRIV_HEADERS = priv/host-x86/hdefs.h \ |
sewardj | b7a0a11 | 2005-02-01 16:06:14 +0000 | [diff] [blame] | 14 | priv/host-amd64/hdefs.h \ |
sewardj | 37a47aa | 2005-01-21 20:54:33 +0000 | [diff] [blame] | 15 | priv/host-arm/hdefs.h \ |
cerion | bcf8c3e | 2005-02-04 16:17:07 +0000 | [diff] [blame] | 16 | priv/host-ppc32/hdefs.h \ |
sewardj | d7383ba | 2004-07-27 10:54:21 +0000 | [diff] [blame] | 17 | priv/host-generic/h_generic_regs.h \ |
sewardj | 37a47aa | 2005-01-21 20:54:33 +0000 | [diff] [blame] | 18 | priv/host-generic/h_generic_simd64.h \ |
sewardj | c5bfaee | 2004-07-22 17:25:03 +0000 | [diff] [blame] | 19 | priv/main/vex_globals.h \ |
| 20 | priv/main/vex_util.h \ |
sewardj | 52ff4cc | 2005-03-26 20:33:38 +0000 | [diff] [blame] | 21 | priv/guest-generic/g_generic_x87.h \ |
sewardj | db36c0f | 2005-07-03 00:05:31 +0000 | [diff] [blame] | 22 | priv/guest-generic/bb_to_IR.h \ |
sewardj | 37a47aa | 2005-01-21 20:54:33 +0000 | [diff] [blame] | 23 | priv/guest-x86/gdefs.h \ |
| 24 | priv/guest-amd64/gdefs.h \ |
| 25 | priv/guest-arm/gdefs.h \ |
sewardj | 4206584 | 2005-01-27 16:04:08 +0000 | [diff] [blame] | 26 | priv/guest-ppc32/gdefs.h \ |
sewardj | 37a47aa | 2005-01-21 20:54:33 +0000 | [diff] [blame] | 27 | priv/ir/irmatch.h \ |
| 28 | priv/ir/iropt.h |
sewardj | c5bfaee | 2004-07-22 17:25:03 +0000 | [diff] [blame] | 29 | |
sewardj | d7383ba | 2004-07-27 10:54:21 +0000 | [diff] [blame] | 30 | LIB_OBJS = priv/ir/irdefs.o \ |
sewardj | 37a47aa | 2005-01-21 20:54:33 +0000 | [diff] [blame] | 31 | priv/ir/irmatch.o \ |
| 32 | priv/ir/iropt.o \ |
sewardj | c5bfaee | 2004-07-22 17:25:03 +0000 | [diff] [blame] | 33 | priv/main/vex_main.o \ |
| 34 | priv/main/vex_globals.o \ |
| 35 | priv/main/vex_util.o \ |
sewardj | d7383ba | 2004-07-27 10:54:21 +0000 | [diff] [blame] | 36 | priv/host-x86/hdefs.o \ |
sewardj | b7a0a11 | 2005-02-01 16:06:14 +0000 | [diff] [blame] | 37 | priv/host-amd64/hdefs.o \ |
sewardj | 37a47aa | 2005-01-21 20:54:33 +0000 | [diff] [blame] | 38 | priv/host-arm/hdefs.o \ |
cerion | bcf8c3e | 2005-02-04 16:17:07 +0000 | [diff] [blame] | 39 | priv/host-ppc32/hdefs.o \ |
sewardj | d7383ba | 2004-07-27 10:54:21 +0000 | [diff] [blame] | 40 | priv/host-x86/isel.o \ |
sewardj | b7a0a11 | 2005-02-01 16:06:14 +0000 | [diff] [blame] | 41 | priv/host-amd64/isel.o \ |
sewardj | 37a47aa | 2005-01-21 20:54:33 +0000 | [diff] [blame] | 42 | priv/host-arm/isel.o \ |
cerion | bcf8c3e | 2005-02-04 16:17:07 +0000 | [diff] [blame] | 43 | priv/host-ppc32/isel.o \ |
sewardj | d7383ba | 2004-07-27 10:54:21 +0000 | [diff] [blame] | 44 | priv/host-generic/h_generic_regs.o \ |
sewardj | 37a47aa | 2005-01-21 20:54:33 +0000 | [diff] [blame] | 45 | priv/host-generic/h_generic_simd64.o \ |
| 46 | priv/host-generic/reg_alloc2.o \ |
sewardj | 52ff4cc | 2005-03-26 20:33:38 +0000 | [diff] [blame] | 47 | priv/guest-generic/g_generic_x87.o \ |
sewardj | db36c0f | 2005-07-03 00:05:31 +0000 | [diff] [blame] | 48 | priv/guest-generic/bb_to_IR.o \ |
sewardj | d7383ba | 2004-07-27 10:54:21 +0000 | [diff] [blame] | 49 | priv/guest-x86/ghelpers.o \ |
sewardj | 37a47aa | 2005-01-21 20:54:33 +0000 | [diff] [blame] | 50 | priv/guest-amd64/ghelpers.o \ |
| 51 | priv/guest-arm/ghelpers.o \ |
sewardj | 4206584 | 2005-01-27 16:04:08 +0000 | [diff] [blame] | 52 | priv/guest-ppc32/ghelpers.o \ |
sewardj | 37a47aa | 2005-01-21 20:54:33 +0000 | [diff] [blame] | 53 | priv/guest-x86/toIR.o \ |
| 54 | priv/guest-amd64/toIR.o \ |
sewardj | 4206584 | 2005-01-27 16:04:08 +0000 | [diff] [blame] | 55 | priv/guest-arm/toIR.o \ |
| 56 | priv/guest-ppc32/toIR.o |
sewardj | c5bfaee | 2004-07-22 17:25:03 +0000 | [diff] [blame] | 57 | |
| 58 | PUB_INCLUDES = -Ipub |
| 59 | |
sewardj | d7383ba | 2004-07-27 10:54:21 +0000 | [diff] [blame] | 60 | # Do not add any priv/host-ARCH or priv/guest-ARCH directories to this |
| 61 | # list, as they contain duplicate file names (each host has a hdefs.h, |
| 62 | # for example). |
| 63 | PRIV_INCLUDES = -Ipriv |
sewardj | c5bfaee | 2004-07-22 17:25:03 +0000 | [diff] [blame] | 64 | |
| 65 | |
sewardj | 37a47aa | 2005-01-21 20:54:33 +0000 | [diff] [blame] | 66 | #CC = gcc |
sewardj | 4206584 | 2005-01-27 16:04:08 +0000 | [diff] [blame] | 67 | #CCFLAGS = -g -O -Wall -Wmissing-prototypes -Wshadow -Winline \ |
| 68 | # -Wpointer-arith -Wbad-function-cast -Wcast-qual \ |
sewardj | 600deec | 2005-03-21 01:03:49 +0000 | [diff] [blame] | 69 | # -Wcast-align -Wmissing-declarations \ |
sewardj | 4206584 | 2005-01-27 16:04:08 +0000 | [diff] [blame] | 70 | # $(EXTRA_CFLAGS) |
sewardj | c5bfaee | 2004-07-22 17:25:03 +0000 | [diff] [blame] | 71 | |
| 72 | CC = icc |
sewardj | 62d0543 | 2005-10-29 22:30:47 +0000 | [diff] [blame] | 73 | CCFLAGS = -g -Wall -wd981 -wd279 -wd1287 -wd869 -wd111 -wd188 -wd186 -wd810 |
sewardj | c5bfaee | 2004-07-22 17:25:03 +0000 | [diff] [blame] | 74 | # 981: operands are evaluated in unspecified order |
| 75 | # 279: controlling expression is constant |
| 76 | # 1287: invalid attribute for parameter |
| 77 | # 869: parameter "..." was never referenced |
sewardj | c5bfaee | 2004-07-22 17:25:03 +0000 | [diff] [blame] | 78 | # 111: statement is unreachable |
sewardj | 43e336c | 2005-01-28 01:53:38 +0000 | [diff] [blame] | 79 | # 188: enumerated type mixed with another type |
sewardj | c5bfaee | 2004-07-22 17:25:03 +0000 | [diff] [blame] | 80 | # (the above are for icc 8.0 -- 8.0.0.55 I think) |
sewardj | 52ff4cc | 2005-03-26 20:33:38 +0000 | [diff] [blame] | 81 | # 186: pointless comparison of unsigned integer with zero |
sewardj | 62d0543 | 2005-10-29 22:30:47 +0000 | [diff] [blame] | 82 | # 810: conversion from ... to ... may lose significant bits |
sewardj | b7a0a11 | 2005-02-01 16:06:14 +0000 | [diff] [blame] | 83 | |
sewardj | 37a47aa | 2005-01-21 20:54:33 +0000 | [diff] [blame] | 84 | all: vex |
sewardj | d7383ba | 2004-07-27 10:54:21 +0000 | [diff] [blame] | 85 | |
cerion | e1106f7 | 2005-02-16 09:09:46 +0000 | [diff] [blame] | 86 | scratch: clean version all |
| 87 | |
sewardj | d7383ba | 2004-07-27 10:54:21 +0000 | [diff] [blame] | 88 | vex: libvex.a test_main.o |
| 89 | $(CC) $(CCFLAGS) -o vex test_main.o libvex.a |
sewardj | c5bfaee | 2004-07-22 17:25:03 +0000 | [diff] [blame] | 90 | |
| 91 | libvex.a: $(LIB_OBJS) |
| 92 | rm -f libvex.a |
| 93 | ar clq libvex.a $(LIB_OBJS) |
| 94 | |
| 95 | clean: |
sewardj | 600deec | 2005-03-21 01:03:49 +0000 | [diff] [blame] | 96 | rm -f $(LIB_OBJS) libvex.a vex test_main.o \ |
| 97 | priv/main/vex_svnversion.h \ |
| 98 | pub/libvex_guest_offsets.h |
sewardj | c5bfaee | 2004-07-22 17:25:03 +0000 | [diff] [blame] | 99 | |
sewardj | 37a47aa | 2005-01-21 20:54:33 +0000 | [diff] [blame] | 100 | version: |
| 101 | rm -f priv/main/vex_svnversion.h |
| 102 | echo -n "\"" > priv/main/vex_svnversion.h |
| 103 | svnversion -n . >> priv/main/vex_svnversion.h |
| 104 | echo "\"" >> priv/main/vex_svnversion.h |
| 105 | |
| 106 | minidist: version |
| 107 | rm -f vex--minidist-2005MMDD.tar |
| 108 | tar cf vex--minidist-2005MMDD.tar $(PUB_HEADERS) $(PRIV_HEADERS) \ |
| 109 | priv/main/vex_svnversion.h \ |
| 110 | test_main.c test_main.h \ |
| 111 | Makefile \ |
| 112 | `echo $(LIB_OBJS) | sed "s/\.o/\.c/g"` |
| 113 | @echo |
| 114 | @echo minidist done, size and svnversion follow: |
| 115 | @ls -l vex--minidist-2005MMDD.tar |
| 116 | @cat priv/main/vex_svnversion.h |
| 117 | @echo |
sewardj | c5bfaee | 2004-07-22 17:25:03 +0000 | [diff] [blame] | 118 | |
sewardj | 600deec | 2005-03-21 01:03:49 +0000 | [diff] [blame] | 119 | pub/libvex_guest_offsets.h: |
| 120 | gcc -Wall -g -o auxprogs/genoffsets auxprogs/genoffsets.c |
| 121 | ./auxprogs/genoffsets > pub/libvex_guest_offsets.h |
| 122 | |
sewardj | c5bfaee | 2004-07-22 17:25:03 +0000 | [diff] [blame] | 123 | |
| 124 | ALL_HEADERS = $(PUB_HEADERS) $(PRIV_HEADERS) |
| 125 | ALL_INCLUDES = $(PUB_INCLUDES) $(PRIV_INCLUDES) |
| 126 | |
sewardj | 37a47aa | 2005-01-21 20:54:33 +0000 | [diff] [blame] | 127 | test_main.o: $(PUB_HEADERS) test_main.c test_main.h |
sewardj | c5bfaee | 2004-07-22 17:25:03 +0000 | [diff] [blame] | 128 | $(CC) $(CCFLAGS) $(PUB_INCLUDES) -o test_main.o \ |
| 129 | -c test_main.c |
| 130 | |
sewardj | d7383ba | 2004-07-27 10:54:21 +0000 | [diff] [blame] | 131 | priv/ir/irdefs.o: $(ALL_HEADERS) priv/ir/irdefs.c |
| 132 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/ir/irdefs.o \ |
| 133 | -c priv/ir/irdefs.c |
sewardj | c5bfaee | 2004-07-22 17:25:03 +0000 | [diff] [blame] | 134 | |
sewardj | 37a47aa | 2005-01-21 20:54:33 +0000 | [diff] [blame] | 135 | priv/ir/irmatch.o: $(ALL_HEADERS) priv/ir/irmatch.c |
| 136 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/ir/irmatch.o \ |
| 137 | -c priv/ir/irmatch.c |
| 138 | |
| 139 | priv/ir/iropt.o: $(ALL_HEADERS) priv/ir/iropt.c |
| 140 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/ir/iropt.o \ |
| 141 | -c priv/ir/iropt.c |
| 142 | |
| 143 | priv/main/vex_main.o: $(ALL_HEADERS) priv/main/vex_main.c \ |
| 144 | priv/main/vex_svnversion.h |
sewardj | c5bfaee | 2004-07-22 17:25:03 +0000 | [diff] [blame] | 145 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/main/vex_main.o \ |
| 146 | -c priv/main/vex_main.c |
| 147 | |
| 148 | priv/main/vex_globals.o: $(ALL_HEADERS) priv/main/vex_globals.c |
| 149 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/main/vex_globals.o \ |
| 150 | -c priv/main/vex_globals.c |
| 151 | |
| 152 | priv/main/vex_util.o: $(ALL_HEADERS) priv/main/vex_util.c |
| 153 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/main/vex_util.o \ |
| 154 | -c priv/main/vex_util.c |
| 155 | |
sewardj | d7383ba | 2004-07-27 10:54:21 +0000 | [diff] [blame] | 156 | priv/host-x86/hdefs.o: $(ALL_HEADERS) priv/host-x86/hdefs.c |
| 157 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/host-x86/hdefs.o \ |
| 158 | -c priv/host-x86/hdefs.c |
sewardj | c5bfaee | 2004-07-22 17:25:03 +0000 | [diff] [blame] | 159 | |
sewardj | b7a0a11 | 2005-02-01 16:06:14 +0000 | [diff] [blame] | 160 | priv/host-amd64/hdefs.o: $(ALL_HEADERS) priv/host-amd64/hdefs.c |
| 161 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/host-amd64/hdefs.o \ |
| 162 | -c priv/host-amd64/hdefs.c |
| 163 | |
sewardj | 37a47aa | 2005-01-21 20:54:33 +0000 | [diff] [blame] | 164 | priv/host-arm/hdefs.o: $(ALL_HEADERS) priv/host-arm/hdefs.c |
| 165 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/host-arm/hdefs.o \ |
| 166 | -c priv/host-arm/hdefs.c |
| 167 | |
cerion | bcf8c3e | 2005-02-04 16:17:07 +0000 | [diff] [blame] | 168 | priv/host-ppc32/hdefs.o: $(ALL_HEADERS) priv/host-ppc32/hdefs.c |
| 169 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/host-ppc32/hdefs.o \ |
| 170 | -c priv/host-ppc32/hdefs.c |
| 171 | |
sewardj | d7383ba | 2004-07-27 10:54:21 +0000 | [diff] [blame] | 172 | priv/host-x86/isel.o: $(ALL_HEADERS) priv/host-x86/isel.c |
| 173 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/host-x86/isel.o \ |
| 174 | -c priv/host-x86/isel.c |
sewardj | c5bfaee | 2004-07-22 17:25:03 +0000 | [diff] [blame] | 175 | |
sewardj | b7a0a11 | 2005-02-01 16:06:14 +0000 | [diff] [blame] | 176 | priv/host-amd64/isel.o: $(ALL_HEADERS) priv/host-amd64/isel.c |
| 177 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/host-amd64/isel.o \ |
| 178 | -c priv/host-amd64/isel.c |
| 179 | |
sewardj | 37a47aa | 2005-01-21 20:54:33 +0000 | [diff] [blame] | 180 | priv/host-arm/isel.o: $(ALL_HEADERS) priv/host-arm/isel.c |
| 181 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/host-arm/isel.o \ |
| 182 | -c priv/host-arm/isel.c |
| 183 | |
cerion | bcf8c3e | 2005-02-04 16:17:07 +0000 | [diff] [blame] | 184 | priv/host-ppc32/isel.o: $(ALL_HEADERS) priv/host-ppc32/isel.c |
| 185 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/host-ppc32/isel.o \ |
| 186 | -c priv/host-ppc32/isel.c |
| 187 | |
sewardj | d7383ba | 2004-07-27 10:54:21 +0000 | [diff] [blame] | 188 | priv/host-generic/h_generic_regs.o: $(ALL_HEADERS) priv/host-generic/h_generic_regs.c |
| 189 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/host-generic/h_generic_regs.o \ |
| 190 | -c priv/host-generic/h_generic_regs.c |
sewardj | c5bfaee | 2004-07-22 17:25:03 +0000 | [diff] [blame] | 191 | |
sewardj | 37a47aa | 2005-01-21 20:54:33 +0000 | [diff] [blame] | 192 | priv/host-generic/h_generic_simd64.o: $(ALL_HEADERS) priv/host-generic/h_generic_simd64.c |
| 193 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/host-generic/h_generic_simd64.o \ |
| 194 | -c priv/host-generic/h_generic_simd64.c |
| 195 | |
| 196 | priv/host-generic/reg_alloc2.o: $(ALL_HEADERS) priv/host-generic/reg_alloc2.c |
| 197 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/host-generic/reg_alloc2.o \ |
| 198 | -c priv/host-generic/reg_alloc2.c |
sewardj | c5bfaee | 2004-07-22 17:25:03 +0000 | [diff] [blame] | 199 | |
sewardj | d7383ba | 2004-07-27 10:54:21 +0000 | [diff] [blame] | 200 | priv/guest-x86/toIR.o: $(ALL_HEADERS) priv/guest-x86/toIR.c |
| 201 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/guest-x86/toIR.o \ |
| 202 | -c priv/guest-x86/toIR.c |
sewardj | 36ca513 | 2004-07-24 13:12:23 +0000 | [diff] [blame] | 203 | |
sewardj | 52ff4cc | 2005-03-26 20:33:38 +0000 | [diff] [blame] | 204 | priv/guest-generic/g_generic_x87.o: $(ALL_HEADERS) priv/guest-generic/g_generic_x87.c |
| 205 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/guest-generic/g_generic_x87.o \ |
| 206 | -c priv/guest-generic/g_generic_x87.c |
| 207 | |
sewardj | db36c0f | 2005-07-03 00:05:31 +0000 | [diff] [blame] | 208 | priv/guest-generic/bb_to_IR.o: $(ALL_HEADERS) priv/guest-generic/bb_to_IR.c |
| 209 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/guest-generic/bb_to_IR.o \ |
| 210 | -c priv/guest-generic/bb_to_IR.c |
| 211 | |
sewardj | d7383ba | 2004-07-27 10:54:21 +0000 | [diff] [blame] | 212 | priv/guest-x86/ghelpers.o: $(ALL_HEADERS) priv/guest-x86/ghelpers.c |
| 213 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/guest-x86/ghelpers.o \ |
| 214 | -c priv/guest-x86/ghelpers.c |
sewardj | 37a47aa | 2005-01-21 20:54:33 +0000 | [diff] [blame] | 215 | |
| 216 | priv/guest-amd64/ghelpers.o: $(ALL_HEADERS) priv/guest-amd64/ghelpers.c |
| 217 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/guest-amd64/ghelpers.o \ |
| 218 | -c priv/guest-amd64/ghelpers.c |
| 219 | |
| 220 | priv/guest-amd64/toIR.o: $(ALL_HEADERS) priv/guest-amd64/toIR.c |
| 221 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/guest-amd64/toIR.o \ |
| 222 | -c priv/guest-amd64/toIR.c |
| 223 | |
| 224 | priv/guest-arm/ghelpers.o: $(ALL_HEADERS) priv/guest-arm/ghelpers.c |
| 225 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/guest-arm/ghelpers.o \ |
| 226 | -c priv/guest-arm/ghelpers.c |
| 227 | |
| 228 | priv/guest-arm/toIR.o: $(ALL_HEADERS) priv/guest-arm/toIR.c |
| 229 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/guest-arm/toIR.o \ |
| 230 | -c priv/guest-arm/toIR.c |
sewardj | 4206584 | 2005-01-27 16:04:08 +0000 | [diff] [blame] | 231 | |
| 232 | priv/guest-ppc32/ghelpers.o: $(ALL_HEADERS) priv/guest-ppc32/ghelpers.c |
| 233 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/guest-ppc32/ghelpers.o \ |
| 234 | -c priv/guest-ppc32/ghelpers.c |
| 235 | |
| 236 | priv/guest-ppc32/toIR.o: $(ALL_HEADERS) priv/guest-ppc32/toIR.c |
| 237 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/guest-ppc32/toIR.o \ |
| 238 | -c priv/guest-ppc32/toIR.c |