blob: 0843b8947837c00dce33a12de7e1ad1baab3f2dc [file] [log] [blame]
sewardj20e56c12004-03-31 22:08:37 +00001
sewardj887a11a2004-07-05 17:26:47 +00002PUB_HEADERS = pub/libvex_basictypes.h \
3 pub/libvex_ir.h \
sewardj7d0960d2004-09-06 23:22:55 +00004 pub/libvex.h \
5 pub/libvex_guest_x86.h
sewardj5cf515f2004-06-26 20:10:35 +00006
sewardjc0ee2ed2004-07-27 10:29:41 +00007PRIV_HEADERS = priv/host-x86/hdefs.h \
8 priv/host-generic/h_generic_regs.h \
sewardj887a11a2004-07-05 17:26:47 +00009 priv/main/vex_globals.h \
sewardjc9a65702004-07-07 16:32:57 +000010 priv/main/vex_util.h \
sewardj00ec7072004-08-18 13:58:59 +000011 priv/guest-x86/gdefs.h \
12 priv/ir/iropt.h
sewardj5cf515f2004-06-26 20:10:35 +000013
sewardjc0ee2ed2004-07-27 10:29:41 +000014LIB_OBJS = priv/ir/irdefs.o \
sewardja1a370f2004-08-17 13:31:55 +000015 priv/ir/iropt.o \
sewardj887a11a2004-07-05 17:26:47 +000016 priv/main/vex_main.o \
17 priv/main/vex_globals.o \
sewardj35421a32004-07-05 13:12:34 +000018 priv/main/vex_util.o \
sewardjc0ee2ed2004-07-27 10:29:41 +000019 priv/host-x86/hdefs.o \
20 priv/host-x86/isel.o \
21 priv/host-generic/h_generic_regs.o \
sewardjc9a65702004-07-07 16:32:57 +000022 priv/host-generic/reg_alloc.o \
sewardjc0ee2ed2004-07-27 10:29:41 +000023 priv/guest-x86/ghelpers.o \
24 priv/guest-x86/toIR.o
sewardj5cf515f2004-06-26 20:10:35 +000025
sewardjac9af022004-07-05 01:15:34 +000026PUB_INCLUDES = -Ipub
27
sewardjc0ee2ed2004-07-27 10:29:41 +000028# 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).
31PRIV_INCLUDES = -Ipriv
sewardjac9af022004-07-05 01:15:34 +000032
33
sewardje05c42c2004-07-08 20:25:10 +000034CC = gcc341
sewardj8b3495d2004-09-21 23:38:04 +000035CCFLAGS = -g -O -Wall -Wshadow -Winline $(EXTRA_CFLAGS)
sewardj41f43bc2004-07-08 14:23:22 +000036
sewardje05c42c2004-07-08 20:25:10 +000037#CC = icc
38#CCFLAGS = -g -Wbrief -Wall -wd981 -wd279 -wd1287 -wd869 \
39# -wd810 -wd1419 -wd181 -wd111 -wd167
sewardj41f43bc2004-07-08 14:23:22 +000040# 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
sewardje05c42c2004-07-08 20:25:10 +000048# (the above are for icc 8.0 -- 8.0.0.55 I think)
sewardjac9af022004-07-05 01:15:34 +000049
sewardjbf31abd2004-07-25 00:07:35 +000050all: libvex.a
51 rm -f hacked104/valgrind.so
52 (cd hacked104 && make install)
53
sewardjc0ee2ed2004-07-27 10:29:41 +000054vex: libvex.a test_main.o
sewardj80424fe2004-07-27 10:43:34 +000055 $(CC) $(CCFLAGS) -o vex test_main.o libvex.a
sewardjac9af022004-07-05 01:15:34 +000056
sewardj887a11a2004-07-05 17:26:47 +000057libvex.a: $(LIB_OBJS)
58 rm -f libvex.a
59 ar clq libvex.a $(LIB_OBJS)
sewardjac9af022004-07-05 01:15:34 +000060
sewardj5cf515f2004-06-26 20:10:35 +000061clean:
sewardjc0ee2ed2004-07-27 10:29:41 +000062 rm -f $(LIB_OBJS) libvex.a vex test_main.o
sewardjbf31abd2004-07-25 00:07:35 +000063 (cd hacked104 && make clean)
sewardjc97096c2004-06-30 09:28:04 +000064
sewardjce605f92004-07-05 14:39:15 +000065
66
sewardj35421a32004-07-05 13:12:34 +000067ALL_HEADERS = $(PUB_HEADERS) $(PRIV_HEADERS)
68ALL_INCLUDES = $(PUB_INCLUDES) $(PRIV_INCLUDES)
69
sewardjce605f92004-07-05 14:39:15 +000070test_main.o: $(PUB_HEADERS) test_main.c
71 $(CC) $(CCFLAGS) $(PUB_INCLUDES) -o test_main.o \
72 -c test_main.c
73
sewardjc0ee2ed2004-07-27 10:29:41 +000074priv/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
sewardj35421a32004-07-05 13:12:34 +000077
sewardja1a370f2004-08-17 13:31:55 +000078priv/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
sewardj887a11a2004-07-05 17:26:47 +000082priv/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
sewardj35421a32004-07-05 13:12:34 +000085
sewardj887a11a2004-07-05 17:26:47 +000086priv/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
sewardj35421a32004-07-05 13:12:34 +000089
90priv/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
sewardj5a820d92004-07-27 09:50:39 +000094priv/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
sewardj35421a32004-07-05 13:12:34 +000097
sewardj5a820d92004-07-27 09:50:39 +000098priv/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
sewardj35421a32004-07-05 13:12:34 +0000101
sewardjc0ee2ed2004-07-27 10:29:41 +0000102priv/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
sewardj35421a32004-07-05 13:12:34 +0000105
106priv/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
sewardj96b22392004-06-26 18:46:47 +0000109
sewardjc0ee2ed2004-07-27 10:29:41 +0000110priv/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
sewardj36ca5132004-07-24 13:12:23 +0000113
sewardjc0ee2ed2004-07-27 10:29:41 +0000114priv/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