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 \ |
| 5 | pub/libvex_guest_x86.h |
sewardj | 5cf515f | 2004-06-26 20:10:35 +0000 | [diff] [blame] | 6 | |
sewardj | c0ee2ed | 2004-07-27 10:29:41 +0000 | [diff] [blame] | 7 | PRIV_HEADERS = priv/host-x86/hdefs.h \ |
| 8 | priv/host-generic/h_generic_regs.h \ |
sewardj | 887a11a | 2004-07-05 17:26:47 +0000 | [diff] [blame] | 9 | priv/main/vex_globals.h \ |
sewardj | c9a6570 | 2004-07-07 16:32:57 +0000 | [diff] [blame] | 10 | priv/main/vex_util.h \ |
sewardj | 00ec707 | 2004-08-18 13:58:59 +0000 | [diff] [blame] | 11 | priv/guest-x86/gdefs.h \ |
| 12 | priv/ir/iropt.h |
sewardj | 5cf515f | 2004-06-26 20:10:35 +0000 | [diff] [blame] | 13 | |
sewardj | c0ee2ed | 2004-07-27 10:29:41 +0000 | [diff] [blame] | 14 | LIB_OBJS = priv/ir/irdefs.o \ |
sewardj | a1a370f | 2004-08-17 13:31:55 +0000 | [diff] [blame] | 15 | priv/ir/iropt.o \ |
sewardj | 887a11a | 2004-07-05 17:26:47 +0000 | [diff] [blame] | 16 | priv/main/vex_main.o \ |
| 17 | priv/main/vex_globals.o \ |
sewardj | 35421a3 | 2004-07-05 13:12:34 +0000 | [diff] [blame] | 18 | priv/main/vex_util.o \ |
sewardj | c0ee2ed | 2004-07-27 10:29:41 +0000 | [diff] [blame] | 19 | priv/host-x86/hdefs.o \ |
| 20 | priv/host-x86/isel.o \ |
| 21 | priv/host-generic/h_generic_regs.o \ |
sewardj | c9a6570 | 2004-07-07 16:32:57 +0000 | [diff] [blame] | 22 | priv/host-generic/reg_alloc.o \ |
sewardj | 432b1c9 | 2004-10-30 13:00:55 +0000 | [diff] [blame] | 23 | priv/host-generic/reg_alloc2.o \ |
sewardj | c0ee2ed | 2004-07-27 10:29:41 +0000 | [diff] [blame] | 24 | priv/guest-x86/ghelpers.o \ |
| 25 | priv/guest-x86/toIR.o |
sewardj | 5cf515f | 2004-06-26 20:10:35 +0000 | [diff] [blame] | 26 | |
sewardj | ac9af02 | 2004-07-05 01:15:34 +0000 | [diff] [blame] | 27 | PUB_INCLUDES = -Ipub |
| 28 | |
sewardj | c0ee2ed | 2004-07-27 10:29:41 +0000 | [diff] [blame] | 29 | # Do not add any priv/host-ARCH or priv/guest-ARCH directories to this |
| 30 | # list, as they contain duplicate file names (each host has a hdefs.h, |
| 31 | # for example). |
| 32 | PRIV_INCLUDES = -Ipriv |
sewardj | ac9af02 | 2004-07-05 01:15:34 +0000 | [diff] [blame] | 33 | |
| 34 | |
sewardj | c584170 | 2004-10-27 09:15:47 +0000 | [diff] [blame] | 35 | CC = gcc |
sewardj | 8b3495d | 2004-09-21 23:38:04 +0000 | [diff] [blame] | 36 | CCFLAGS = -g -O -Wall -Wshadow -Winline $(EXTRA_CFLAGS) |
sewardj | 41f43bc | 2004-07-08 14:23:22 +0000 | [diff] [blame] | 37 | |
sewardj | e05c42c | 2004-07-08 20:25:10 +0000 | [diff] [blame] | 38 | #CC = icc |
| 39 | #CCFLAGS = -g -Wbrief -Wall -wd981 -wd279 -wd1287 -wd869 \ |
| 40 | # -wd810 -wd1419 -wd181 -wd111 -wd167 |
sewardj | 41f43bc | 2004-07-08 14:23:22 +0000 | [diff] [blame] | 41 | # 981: operands are evaluated in unspecified order |
| 42 | # 279: controlling expression is constant |
| 43 | # 1287: invalid attribute for parameter |
| 44 | # 869: parameter "..." was never referenced |
| 45 | # 810: conversion from "int" to "Char={char}" may lose significant bits |
| 46 | # 181: argument is incompatible with corresponding format string conversion |
| 47 | # 111: statement is unreachable |
| 48 | # 167: argument of type unsigned char incompatible with formal of type char |
sewardj | e05c42c | 2004-07-08 20:25:10 +0000 | [diff] [blame] | 49 | # (the above are for icc 8.0 -- 8.0.0.55 I think) |
sewardj | ac9af02 | 2004-07-05 01:15:34 +0000 | [diff] [blame] | 50 | |
sewardj | bf31abd | 2004-07-25 00:07:35 +0000 | [diff] [blame] | 51 | all: libvex.a |
sewardj | b52c1a5 | 2004-11-06 12:31:16 +0000 | [diff] [blame] | 52 | rm -f head20041019/coregrind/stage2 |
sewardj | 066aba5 | 2004-11-06 13:50:54 +0000 | [diff] [blame] | 53 | (cd head20041019/coregrind && make --quiet install) |
| 54 | (cd head20041019/none && make --quiet install) |
| 55 | (cd head20041019/lackey && make --quiet install) |
| 56 | (cd head20041019/addrcheck && make --quiet install) |
| 57 | (cd head20041019/memcheck && make --quiet install) |
sewardj | bf31abd | 2004-07-25 00:07:35 +0000 | [diff] [blame] | 58 | |
sewardj | c0ee2ed | 2004-07-27 10:29:41 +0000 | [diff] [blame] | 59 | vex: libvex.a test_main.o |
sewardj | 80424fe | 2004-07-27 10:43:34 +0000 | [diff] [blame] | 60 | $(CC) $(CCFLAGS) -o vex test_main.o libvex.a |
sewardj | ac9af02 | 2004-07-05 01:15:34 +0000 | [diff] [blame] | 61 | |
sewardj | 887a11a | 2004-07-05 17:26:47 +0000 | [diff] [blame] | 62 | libvex.a: $(LIB_OBJS) |
| 63 | rm -f libvex.a |
| 64 | ar clq libvex.a $(LIB_OBJS) |
sewardj | ac9af02 | 2004-07-05 01:15:34 +0000 | [diff] [blame] | 65 | |
sewardj | 5cf515f | 2004-06-26 20:10:35 +0000 | [diff] [blame] | 66 | clean: |
sewardj | c0ee2ed | 2004-07-27 10:29:41 +0000 | [diff] [blame] | 67 | rm -f $(LIB_OBJS) libvex.a vex test_main.o |
sewardj | b0b47c9 | 2004-11-06 16:10:08 +0000 | [diff] [blame] | 68 | (cd head20041019 && make --quiet clean) |
sewardj | ce605f9 | 2004-07-05 14:39:15 +0000 | [diff] [blame] | 69 | |
| 70 | |
sewardj | 35421a3 | 2004-07-05 13:12:34 +0000 | [diff] [blame] | 71 | ALL_HEADERS = $(PUB_HEADERS) $(PRIV_HEADERS) |
| 72 | ALL_INCLUDES = $(PUB_INCLUDES) $(PRIV_INCLUDES) |
| 73 | |
sewardj | abe017e | 2004-10-29 23:42:36 +0000 | [diff] [blame] | 74 | test_main.o: $(PUB_HEADERS) test_main.c test_main.h |
sewardj | ce605f9 | 2004-07-05 14:39:15 +0000 | [diff] [blame] | 75 | $(CC) $(CCFLAGS) $(PUB_INCLUDES) -o test_main.o \ |
| 76 | -c test_main.c |
| 77 | |
sewardj | c0ee2ed | 2004-07-27 10:29:41 +0000 | [diff] [blame] | 78 | priv/ir/irdefs.o: $(ALL_HEADERS) priv/ir/irdefs.c |
| 79 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/ir/irdefs.o \ |
| 80 | -c priv/ir/irdefs.c |
sewardj | 35421a3 | 2004-07-05 13:12:34 +0000 | [diff] [blame] | 81 | |
sewardj | a1a370f | 2004-08-17 13:31:55 +0000 | [diff] [blame] | 82 | priv/ir/iropt.o: $(ALL_HEADERS) priv/ir/iropt.c |
| 83 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/ir/iropt.o \ |
| 84 | -c priv/ir/iropt.c |
| 85 | |
sewardj | 887a11a | 2004-07-05 17:26:47 +0000 | [diff] [blame] | 86 | priv/main/vex_main.o: $(ALL_HEADERS) priv/main/vex_main.c |
| 87 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/main/vex_main.o \ |
| 88 | -c priv/main/vex_main.c |
sewardj | 35421a3 | 2004-07-05 13:12:34 +0000 | [diff] [blame] | 89 | |
sewardj | 887a11a | 2004-07-05 17:26:47 +0000 | [diff] [blame] | 90 | priv/main/vex_globals.o: $(ALL_HEADERS) priv/main/vex_globals.c |
| 91 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/main/vex_globals.o \ |
| 92 | -c priv/main/vex_globals.c |
sewardj | 35421a3 | 2004-07-05 13:12:34 +0000 | [diff] [blame] | 93 | |
| 94 | priv/main/vex_util.o: $(ALL_HEADERS) priv/main/vex_util.c |
| 95 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/main/vex_util.o \ |
| 96 | -c priv/main/vex_util.c |
| 97 | |
sewardj | 5a820d9 | 2004-07-27 09:50:39 +0000 | [diff] [blame] | 98 | priv/host-x86/hdefs.o: $(ALL_HEADERS) priv/host-x86/hdefs.c |
| 99 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/host-x86/hdefs.o \ |
| 100 | -c priv/host-x86/hdefs.c |
sewardj | 35421a3 | 2004-07-05 13:12:34 +0000 | [diff] [blame] | 101 | |
sewardj | 5a820d9 | 2004-07-27 09:50:39 +0000 | [diff] [blame] | 102 | priv/host-x86/isel.o: $(ALL_HEADERS) priv/host-x86/isel.c |
| 103 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/host-x86/isel.o \ |
| 104 | -c priv/host-x86/isel.c |
sewardj | 35421a3 | 2004-07-05 13:12:34 +0000 | [diff] [blame] | 105 | |
sewardj | c0ee2ed | 2004-07-27 10:29:41 +0000 | [diff] [blame] | 106 | priv/host-generic/h_generic_regs.o: $(ALL_HEADERS) priv/host-generic/h_generic_regs.c |
| 107 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/host-generic/h_generic_regs.o \ |
| 108 | -c priv/host-generic/h_generic_regs.c |
sewardj | 35421a3 | 2004-07-05 13:12:34 +0000 | [diff] [blame] | 109 | |
| 110 | priv/host-generic/reg_alloc.o: $(ALL_HEADERS) priv/host-generic/reg_alloc.c |
| 111 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/host-generic/reg_alloc.o \ |
| 112 | -c priv/host-generic/reg_alloc.c |
sewardj | 96b2239 | 2004-06-26 18:46:47 +0000 | [diff] [blame] | 113 | |
sewardj | 432b1c9 | 2004-10-30 13:00:55 +0000 | [diff] [blame] | 114 | priv/host-generic/reg_alloc2.o: $(ALL_HEADERS) priv/host-generic/reg_alloc2.c |
| 115 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/host-generic/reg_alloc2.o \ |
| 116 | -c priv/host-generic/reg_alloc2.c |
| 117 | |
sewardj | c0ee2ed | 2004-07-27 10:29:41 +0000 | [diff] [blame] | 118 | priv/guest-x86/toIR.o: $(ALL_HEADERS) priv/guest-x86/toIR.c |
| 119 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/guest-x86/toIR.o \ |
| 120 | -c priv/guest-x86/toIR.c |
sewardj | 36ca513 | 2004-07-24 13:12:23 +0000 | [diff] [blame] | 121 | |
sewardj | c0ee2ed | 2004-07-27 10:29:41 +0000 | [diff] [blame] | 122 | priv/guest-x86/ghelpers.o: $(ALL_HEADERS) priv/guest-x86/ghelpers.c |
| 123 | $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/guest-x86/ghelpers.o \ |
| 124 | -c priv/guest-x86/ghelpers.c |