blob: 720a4cf9eb010eb354bc5f86fbff7ec813f6867c [file] [log] [blame]
sewardjc5bfaee2004-07-22 17:25:03 +00001
2PUB_HEADERS = pub/libvex_basictypes.h \
3 pub/libvex_ir.h \
4 pub/libvex.h
5
6PRIV_HEADERS = priv/host-x86/x86host_defs.h \
7 priv/host-generic/host_regs.h \
8 priv/main/vex_globals.h \
9 priv/main/vex_util.h \
10 priv/guest-x86/x86guest_defs.h
11
12LIB_OBJS = priv/ir/ir_defs.o \
13 priv/main/vex_main.o \
14 priv/main/vex_globals.o \
15 priv/main/vex_util.o \
16 priv/host-x86/x86host_defs.o \
17 priv/host-x86/isel_x86.o \
18 priv/host-generic/host_regs.o \
19 priv/host-generic/reg_alloc.o \
sewardj36ca5132004-07-24 13:12:23 +000020 priv/guest-x86/x86helpers.o \
sewardjc5bfaee2004-07-22 17:25:03 +000021 priv/guest-x86/x86toIR.o
22
23PUB_INCLUDES = -Ipub
24
25PRIV_INCLUDES = -Ipriv/ir -Ipriv/main -Ipriv/host-generic \
26 -Ipriv/host-x86 -Ipriv/guest-x86
27
28APP_OBJS = test_main.o
29
30
31#CC = gcc341
32#CCFLAGS = -g -Wall -Wshadow
33
34CC = icc
35CCFLAGS = -g -Wbrief -Wall -wd981 -wd279 -wd1287 -wd869 \
36 -wd810 -wd1419 -wd181 -wd111 -wd167
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
47all: libvex.a $(APP_OBJS)
48 $(CC) $(CCFLAGS) -o vex $(APP_OBJS) libvex.a
49
50libvex.a: $(LIB_OBJS)
51 rm -f libvex.a
52 ar clq libvex.a $(LIB_OBJS)
53
54clean:
55 rm -f $(APP_OBJS) $(LIB_OBJS) libvex.a vex
56
57
58
59
60ALL_HEADERS = $(PUB_HEADERS) $(PRIV_HEADERS)
61ALL_INCLUDES = $(PUB_INCLUDES) $(PRIV_INCLUDES)
62
63test_main.o: $(PUB_HEADERS) test_main.c
64 $(CC) $(CCFLAGS) $(PUB_INCLUDES) -o test_main.o \
65 -c test_main.c
66
67priv/ir/ir_defs.o: $(ALL_HEADERS) priv/ir/ir_defs.c
68 $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/ir/ir_defs.o \
69 -c priv/ir/ir_defs.c
70
71priv/main/vex_main.o: $(ALL_HEADERS) priv/main/vex_main.c
72 $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/main/vex_main.o \
73 -c priv/main/vex_main.c
74
75priv/main/vex_globals.o: $(ALL_HEADERS) priv/main/vex_globals.c
76 $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/main/vex_globals.o \
77 -c priv/main/vex_globals.c
78
79priv/main/vex_util.o: $(ALL_HEADERS) priv/main/vex_util.c
80 $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/main/vex_util.o \
81 -c priv/main/vex_util.c
82
83priv/host-x86/x86host_defs.o: $(ALL_HEADERS) priv/host-x86/x86host_defs.c
84 $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/host-x86/x86host_defs.o \
85 -c priv/host-x86/x86host_defs.c
86
87priv/host-x86/isel_x86.o: $(ALL_HEADERS) priv/host-x86/isel_x86.c
88 $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/host-x86/isel_x86.o \
89 -c priv/host-x86/isel_x86.c
90
91priv/host-generic/host_regs.o: $(ALL_HEADERS) priv/host-generic/host_regs.c
92 $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/host-generic/host_regs.o \
93 -c priv/host-generic/host_regs.c
94
95priv/host-generic/reg_alloc.o: $(ALL_HEADERS) priv/host-generic/reg_alloc.c
96 $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/host-generic/reg_alloc.o \
97 -c priv/host-generic/reg_alloc.c
98
99priv/guest-x86/x86toIR.o: $(ALL_HEADERS) priv/guest-x86/x86toIR.c
100 $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/guest-x86/x86toIR.o \
sewardj36ca5132004-07-24 13:12:23 +0000101 -c priv/guest-x86/x86toIR.c
102
103priv/guest-x86/x86helpers.o: $(ALL_HEADERS) priv/guest-x86/x86helpers.c
104 $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/guest-x86/x86helpers.o \
105 -c priv/guest-x86/x86helpers.c