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