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