-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
49 lines (39 loc) · 1.34 KB
/
Copy pathMakefile
File metadata and controls
49 lines (39 loc) · 1.34 KB
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
ifndef XED_PATH
$(error "must provide XED_PATH")
endif
CFLAGS = -O1 -g -Wall
%.o: %.c
$(CC) $(CFLAGS) -I ${XED_PATH}/kits/xed-install/include/ -c $< -o $@
peepopt: main.o peepopt.o
$(CC) $(CFLAGS) peepopt.o main.o ${XED_PATH}/obj/libxed.a -o peepopt
peepopt_test: peepopt.o peepopt_test.o
$(CC) $(CFLAGS) peepopt.o peepopt_test.o ${XED_PATH}/obj/libxed.a -o peepopt_test
all: peepopt peepopt_test
test: peepopt_test
./peepopt_test
test-apx-fixture: test-apx-fixture.S test-apx-driver.c
$(CC) $(CFLAGS) -O0 -o $@ test-apx-fixture.S test-apx-driver.c
# Runs the rewritten fixture under Intel SDE's APX emulation; requires
# SDE_PATH (and optionally SDE_CHIP, default -dmr).
test-apx: peepopt test-apx-fixture
@test -n "$(SDE_PATH)" || { echo "must provide SDE_PATH" >&2; exit 1; }
SDE_PATH="$(SDE_PATH)" SDE_CHIP="$(SDE_CHIP)" ./test-apx.sh
# Rewrites a copy of a real system binary (gawk) and compares its behavior
# under SDE against the original; requires SDE_PATH (and optionally
# SDE_CHIP and AWK_BIN).
test-awk: peepopt
@test -n "$(SDE_PATH)" || { echo "must provide SDE_PATH" >&2; exit 1; }
SDE_PATH="$(SDE_PATH)" SDE_CHIP="$(SDE_CHIP)" ./test-awk.sh
clean:
rm -f \
peepopt \
peepopt_test \
test-apx-fixture \
test-apx-fixture.opt \
apx-*.out \
apx-*.log \
test-awk-bin.opt \
awk-input.txt \
awk-*.out \
awk-*.log \
*.o