-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
58 lines (47 loc) · 824 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#
# CTF Tests
#
CTFDIFF = ctfdiff
FILES = \
array.o \
bare1.o \
bitfields.o \
dedup.o \
empty.o \
enum.o \
extern.o \
file.o \
int.o \
float.o \
func.o \
fptr.o \
negative-offset.o \
packstruct.o \
starr.o \
static.o \
stack.o \
siginfo.o \
struct.o \
typedef.o \
union.o \
union-bits.o \
vla.o \
weak.o
CFLAGS = -g -Werror
CTFFILES = $(FILES:%.o=%.ctf) $(FILES:%.o=%.ctf.orig)
DIFFFILES = $(FILES:%.o=%.diff)
DIFFFLAGS = -t -o -f
CC = gcc
stack.o := CFLAGS += -m64
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
%.ctf: %.o
$(CTFCONVERT)-altexec -L VERSION -o $@ $<
%.ctf.orig: %.o
$(CTFCONVERT) -L VERSION -o $@ $<
%.diff: %.ctf %.ctf.orig
$(CTFDIFF) $(DIFFFLAGS) $$(basename $@ .diff).ctf $$(basename $@ .diff).ctf.orig
all: $(CTFFILES)
diff: $(DIFFFILES)
clobber:
rm -f $(FILES) $(CTFFILES)