sewardj | 20e56c1 | 2004-03-31 22:08:37 +0000 | [diff] [blame] | 1 | |
sewardj | 887a11a | 2004-07-05 17:26:47 +0000 | [diff] [blame] | 2 | PUB_HEADERS = pub/libvex_basictypes.h \ |
| 3 | pub/libvex_ir.h \ |
sewardj | 7d0960d | 2004-09-06 23:22:55 +0000 | [diff] [blame] | 4 | pub/libvex.h \ |
sewardj | c4278f4 | 2004-11-26 13:18:19 +0000 | [diff] [blame] | 5 | pub/libvex_trc_values.h \ |
sewardj | 893aada | 2004-11-29 19:57:54 +0000 | [diff] [blame] | 6 | pub/libvex_emwarn.h \ |
sewardj | d584f8f | 2004-11-22 16:02:34 +0000 | [diff] [blame] | 7 | pub/libvex_guest_x86.h \ |
sewardj | 33dba64 | 2004-11-25 13:07:51 +0000 | [diff] [blame] | 8 | pub/libvex_guest_amd64.h \ |
sewardj | d584f8f | 2004-11-22 16:02:34 +0000 | [diff] [blame] | 9 | pub/libvex_guest_arm.h |
sewardj | 5cf515f | 2004-06-26 20:10:35 +0000 | [diff] [blame] | 10 | |
sewardj | c0ee2ed | 2004-07-27 10:29:41 +0000 | [diff] [blame] | 11 | PRIV_HEADERS = priv/host-x86/hdefs.h \ |
cerion | 82edbb3 | 2004-12-16 14:06:34 +0000 | [diff] [blame] | 12 | priv/host-arm/hdefs.h \ |
sewardj | c0ee2ed | 2004-07-27 10:29:41 +0000 | [diff] [blame] | 13 | priv/host-generic/h_generic_regs.h \ |
sewardj | 887a11a | 2004-07-05 17:26:47 +0000 | [diff] [blame] | 14 | priv/main/vex_globals.h \ |
sewardj | c9a6570 | 2004-07-07 16:32:57 +0000 | [diff] [blame] | 15 | priv/main/vex_util.h \ |
sewardj | 00ec707 | 2004-08-18 13:58:59 +0000 | [diff] [blame] | 16 | priv/guest-x86/gdefs.h \ |
sewardj | 33dba64 | 2004-11-25 13:07:51 +0000 | [diff] [blame] | 17 | priv/guest-arm/gdefs.h \ |
sewardj | 69933ac | 2004-12-20 04:12:14 +0000 | [diff] [blame] | 18 | priv/ir/irmatch.h \ |
sewardj | 00ec707 | 2004-08-18 13:58:59 +0000 | [diff] [blame] | 19 | priv/ir/iropt.h |
sewardj | 5cf515f | 2004-06-26 20:10:35 +0000 | [diff] [blame] | 20 | |
sewardj | c0ee2ed | 2004-07-27 10:29:41 +0000 | [diff] [blame] | 21 | LIB_OBJS = priv/ir/irdefs.o \ |
sewardj | 69933ac | 2004-12-20 04:12:14 +0000 | [diff] [blame] | 22 | priv/ir/irmatch.o \ |
sewardj | a1a370f | 2004-08-17 13:31:55 +0000 | [diff] [blame] | 23 | priv/ir/iropt.o \ |
sewardj | 887a11a | 2004-07-05 17:26:47 +0000 | [diff] [blame] | 24 | priv/main/vex_main.o \ |
| 25 | priv/main/vex_globals.o \ |
sewardj | 35421a3 | 2004-07-05 13:12:34 +0000 | [diff] [blame] | 26 | priv/main/vex_util.o \ |
sewardj | c0ee2ed | 2004-07-27 10:29:41 +0000 | [diff] [blame] | 27 | priv/host-x86/hdefs.o \ |
cerion | 82edbb3 | 2004-12-16 14:06:34 +0000 | [diff] [blame] | 28 | priv/host-arm/hdefs.o \ |
sewardj | c0ee2ed | 2004-07-27 10:29:41 +0000 | [diff] [blame] | 29 | priv/host-x86/isel.o \ |
cerion | cee3031 | 2004-12-17 20:30:21 +0000 | [diff] [blame] | 30 | priv/host-arm/isel.o \ |
sewardj | c0ee2ed | 2004-07-27 10:29:41 +0000 | [diff] [blame] | 31 | priv/host-generic/h_generic_regs.o \ |
sewardj | 432b1c9 | 2004-10-30 13:00:55 +0000 | [diff] [blame] | 32 | priv/host-generic/reg_alloc2.o \ |
sewardj | c0ee2ed | 2004-07-27 10:29:41 +0000 | [diff] [blame] | 33 | priv/guest-x86/ghelpers.o \ |
njn | 9c6acb0 | 2004-11-30 15:56:47 +0000 | [diff] [blame] | 34 | priv/guest-amd64/ghelpers.o \ |
sewardj | 33dba64 | 2004-11-25 13:07:51 +0000 | [diff] [blame] | 35 | priv/guest-arm/ghelpers.o \ |
| 36 | priv/guest-x86/toIR.o \ |
| 37 | priv/guest-arm/toIR.o |
sewardj | 5cf515f | 2004-06-26 20:10:35 +0000 | [diff] [blame] | 38 | |
sewardj | ac9af02 | 2004-07-05 01:15:34 +0000 | [diff] [blame] | 39 | PUB_INCLUDES = -Ipub |
| 40 | |
sewardj | c0ee2ed | 2004-07-27 10:29:41 +0000 | [diff] [blame] | 41 | # Do not add any priv/host-ARCH or priv/guest-ARCH directories to this |
| 42 | # list, as they contain duplicate file names (each host has a hdefs.h, |
| 43 | # for example). |
| 44 | PRIV_INCLUDES = -Ipriv |
sewardj | ac9af02 | 2004-07-05 01:15:34 +0000 | [diff] [blame] | 45 | |
| 46 | |
sewardj | c584170 | 2004-10-27 09:15:47 +0000 | [diff] [blame] | 47 | CC = gcc |
sewardj | 70dff0c | 2004-11-30 13:37:21 +0000 | [diff] [blame] | 48 | CCFLAGS = -g -O -Wall -Wmissing-prototypes -Wshadow -Winline $(EXTRA_CFLAGS) |
sewardj | 41f43bc | 2004-07-08 14:23:22 +0000 | [diff] [blame] | 49 | |
sewardj | e05c42c | 2004-07-08 20:25:10 +0000 | [diff] [blame] | 50 | #CC = icc |
| 51 | #CCFLAGS = -g -Wbrief -Wall -wd981 -wd279 -wd1287 -wd869 \ |
| 52 | # -wd810 -wd1419 -wd181 -wd111 -wd167 |
sewardj | 41f43bc | 2004-07-08 14:23:22 +0000 | [diff] [blame] | 53 | # 981: operands are evaluated in unspecified order |
| 54 | # 279: controlling expression is constant |
| 55 | # 1287: invalid attribute for parameter |
| 56 | # 869: parameter "..." was never referenced |
| 57 | # 810: conversion from "int" to "Char={char}" may lose significant bits |
| 58 | # 181: argument is incompatible with corresponding format string conversion |
| 59 | # 111: statement is unreachable |
| 60 | # 167: argument of type unsigned char incompatible with formal of type char |
sewardj | e05c42c | 2004-07-08 20:25:10 +0000 | [diff] [blame] | 61 | # (the above are for icc 8.0 -- 8.0.0.55 I think) |
sewardj | ac9af02 | 2004-07-05 01:15:34 +0000 | [diff] [blame] | 62 | |
sewardj | b5d0f3d | 2004-12-31 17:21:28 +0000 | [diff] [blame] | 63 | all: vex |
sewardj | bf31abd | 2004-07-25 00:07:35 +0000 | [diff] [blame] | 64 | |
sewardj | c0ee2ed | 2004-07-27 10:29:41 +0000 | [diff] [blame] | 65 | vex: libvex.a test_main.o |
sewardj | 80424fe | 2004-07-27 10:43:34 +0000 | [diff] [blame] | 66 | $(CC) $(CCFLAGS) -o vex test_main.o libvex.a |
sewardj | ac9af02 | 2004-07-05 01:15:34 +0000 | [diff] [blame] | 67 | |
sewardj | 887a11a | 2004-07-05 17:26:47 +0000 | [diff] [blame] | 68 | libvex.a: $(LIB_OBJS) |
| 69 | rm -f libvex.a |
| 70 | ar clq libvex.a $(LIB_OBJS) |
sewardj | ac9af02 | 2004-07-05 01:15:34 +0000 | [diff] [blame] | 71 | |
sewardj | 5cf515f | 2004-06-26 20:10:35 +0000 | [diff] [blame] | 72 | clean: |
sewardj | 80f5fce | 2004-12-20 04:37:50 +0000 | [diff] [blame] | 73 | rm -f $(LIB_OBJS) libvex.a vex test_main.o priv/main/vex_svnversion.h |
sewardj | ce605f9 | 2004-07-05 14:39:15 +0000 | [diff] [blame] | 74 | |
sewardj | 80f5fce | 2004-12-20 04:37:50 +0000 | [diff] [blame] | 75 | version: |
| 76 | rm -f priv/main/vex_svnversion.h |
| 77 | echo -n "\"" > priv/main/vex_svnversion.h |
| 78 | svnversion -n . >> priv/main/vex_svnversion.h |
| 79 | echo "\"" >> priv/main/vex_svnversion.h |
| 80 | |
sewardj | eecde93 | 2005-01-05 19:11:09 +0000 | [diff] [blame^] | 81 | minidist: version |
| 82 | rm -f vex--minidist-2005MMDD.tar |
| 83 | tar cf vex--minidist-2005MMDD.tar $(PUB_HEADERS) $(PRIV_HEADERS) \ |
| 84 | priv/main/vex_svnversion.h \ |
| 85 | test_main.c test_main.h \ |
| 86 | Makefile \ |
| 87 | `echo $(LIB_OBJS) | sed "s/\.o/\.c/g"` |
| 88 | @echo |
| 89 | @echo minidist done, size and svnversion follow: |
| 90 | @ls -l vex--minidist-2005MMDD.tar |
| 91 | @cat priv/main/vex_svnversion.h |
| 92 | @echo |
| 93 | |
sewardj | ce605f9 | 2004-07-05 14:39:15 +0000 | [diff] [blame] | 94 | |
sewardj | 35421a3 | 2004-07-05 13:12:34 +0000 | [diff] [blame] | 95 | ALL_HEADERS = $(PUB_HEADERS) $(PRIV_HEADERS) |
| 96 | ALL_INCLUDES = $(PUB_INCLUDES) $(PRIV_INCLUDES) |
| 97 | |
sewardj | abe017e | 2004-10-29 23:42:36 +0000 | [diff] [blame] | 98 | test_main.o: $(PUB_HEADERS) test_main.c test_main.h |
sewardj | ce605f9 | 2004-07-05 14:39:15 +0000 | [diff] [blame] | 99 | $(CC) $(CCFLAGS) $(PUB_INCLUDES) -o test_main.o \ |
| 100 | -c test_main.c |
| 101 | |
sewardj | c0ee2ed | 2004-07-27 10:29:41 +0000 | [diff] [blame] | 102 | priv/ir/irdefs.o: $(ALL_HEADERS) priv/ir/irdefs.c |
| 103 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/ir/irdefs.o \ |
| 104 | -c priv/ir/irdefs.c |
sewardj | 35421a3 | 2004-07-05 13:12:34 +0000 | [diff] [blame] | 105 | |
sewardj | 69933ac | 2004-12-20 04:12:14 +0000 | [diff] [blame] | 106 | priv/ir/irmatch.o: $(ALL_HEADERS) priv/ir/irmatch.c |
| 107 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/ir/irmatch.o \ |
| 108 | -c priv/ir/irmatch.c |
| 109 | |
sewardj | a1a370f | 2004-08-17 13:31:55 +0000 | [diff] [blame] | 110 | priv/ir/iropt.o: $(ALL_HEADERS) priv/ir/iropt.c |
| 111 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/ir/iropt.o \ |
| 112 | -c priv/ir/iropt.c |
| 113 | |
sewardj | 1fec164 | 2004-12-20 04:42:49 +0000 | [diff] [blame] | 114 | priv/main/vex_main.o: $(ALL_HEADERS) priv/main/vex_main.c \ |
| 115 | priv/main/vex_svnversion.h |
sewardj | 887a11a | 2004-07-05 17:26:47 +0000 | [diff] [blame] | 116 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/main/vex_main.o \ |
| 117 | -c priv/main/vex_main.c |
sewardj | 35421a3 | 2004-07-05 13:12:34 +0000 | [diff] [blame] | 118 | |
sewardj | 887a11a | 2004-07-05 17:26:47 +0000 | [diff] [blame] | 119 | priv/main/vex_globals.o: $(ALL_HEADERS) priv/main/vex_globals.c |
| 120 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/main/vex_globals.o \ |
| 121 | -c priv/main/vex_globals.c |
sewardj | 35421a3 | 2004-07-05 13:12:34 +0000 | [diff] [blame] | 122 | |
| 123 | priv/main/vex_util.o: $(ALL_HEADERS) priv/main/vex_util.c |
| 124 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/main/vex_util.o \ |
| 125 | -c priv/main/vex_util.c |
| 126 | |
sewardj | 5a820d9 | 2004-07-27 09:50:39 +0000 | [diff] [blame] | 127 | priv/host-x86/hdefs.o: $(ALL_HEADERS) priv/host-x86/hdefs.c |
| 128 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/host-x86/hdefs.o \ |
| 129 | -c priv/host-x86/hdefs.c |
sewardj | 35421a3 | 2004-07-05 13:12:34 +0000 | [diff] [blame] | 130 | |
cerion | 82edbb3 | 2004-12-16 14:06:34 +0000 | [diff] [blame] | 131 | priv/host-arm/hdefs.o: $(ALL_HEADERS) priv/host-arm/hdefs.c |
| 132 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/host-arm/hdefs.o \ |
| 133 | -c priv/host-arm/hdefs.c |
| 134 | |
sewardj | 5a820d9 | 2004-07-27 09:50:39 +0000 | [diff] [blame] | 135 | priv/host-x86/isel.o: $(ALL_HEADERS) priv/host-x86/isel.c |
| 136 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/host-x86/isel.o \ |
| 137 | -c priv/host-x86/isel.c |
sewardj | 35421a3 | 2004-07-05 13:12:34 +0000 | [diff] [blame] | 138 | |
cerion | cee3031 | 2004-12-17 20:30:21 +0000 | [diff] [blame] | 139 | priv/host-arm/isel.o: $(ALL_HEADERS) priv/host-arm/isel.c |
| 140 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/host-arm/isel.o \ |
| 141 | -c priv/host-arm/isel.c |
| 142 | |
sewardj | c0ee2ed | 2004-07-27 10:29:41 +0000 | [diff] [blame] | 143 | priv/host-generic/h_generic_regs.o: $(ALL_HEADERS) priv/host-generic/h_generic_regs.c |
| 144 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/host-generic/h_generic_regs.o \ |
| 145 | -c priv/host-generic/h_generic_regs.c |
sewardj | 35421a3 | 2004-07-05 13:12:34 +0000 | [diff] [blame] | 146 | |
sewardj | 432b1c9 | 2004-10-30 13:00:55 +0000 | [diff] [blame] | 147 | priv/host-generic/reg_alloc2.o: $(ALL_HEADERS) priv/host-generic/reg_alloc2.c |
| 148 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/host-generic/reg_alloc2.o \ |
| 149 | -c priv/host-generic/reg_alloc2.c |
| 150 | |
sewardj | c0ee2ed | 2004-07-27 10:29:41 +0000 | [diff] [blame] | 151 | priv/guest-x86/toIR.o: $(ALL_HEADERS) priv/guest-x86/toIR.c |
| 152 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/guest-x86/toIR.o \ |
| 153 | -c priv/guest-x86/toIR.c |
sewardj | 36ca513 | 2004-07-24 13:12:23 +0000 | [diff] [blame] | 154 | |
sewardj | c0ee2ed | 2004-07-27 10:29:41 +0000 | [diff] [blame] | 155 | priv/guest-x86/ghelpers.o: $(ALL_HEADERS) priv/guest-x86/ghelpers.c |
| 156 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/guest-x86/ghelpers.o \ |
| 157 | -c priv/guest-x86/ghelpers.c |
sewardj | 33dba64 | 2004-11-25 13:07:51 +0000 | [diff] [blame] | 158 | |
njn | 9c6acb0 | 2004-11-30 15:56:47 +0000 | [diff] [blame] | 159 | priv/guest-amd64/ghelpers.o: $(ALL_HEADERS) priv/guest-amd64/ghelpers.c |
| 160 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/guest-amd64/ghelpers.o \ |
| 161 | -c priv/guest-amd64/ghelpers.c |
| 162 | |
sewardj | 33dba64 | 2004-11-25 13:07:51 +0000 | [diff] [blame] | 163 | priv/guest-arm/ghelpers.o: $(ALL_HEADERS) priv/guest-arm/ghelpers.c |
| 164 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/guest-arm/ghelpers.o \ |
| 165 | -c priv/guest-arm/ghelpers.c |
| 166 | |
| 167 | priv/guest-arm/toIR.o: $(ALL_HEADERS) priv/guest-arm/toIR.c |
| 168 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/guest-arm/toIR.o \ |
| 169 | -c priv/guest-arm/toIR.c |