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