blob: e3ca02d3adbea1b2ab1e3a690bfca4433272a2ad (
plain) (
blame)
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
|
TARGET := $(shell $(CC) -dumpmachine)
# Get 'uname -m'-like architecture description for target
TARGET_ARCH := $(shell echo $(TARGET) | cut -f1 -d- | tr [A-Z] [a-z])
TARGET_ARCH := $(shell echo $(TARGET_ARCH) | sed 's/powerpc/ppc/')
AUDIT_ARCH := $(shell echo $(TARGET_ARCH) | tr [a-z] [A-Z] | sed 's/^ARM.*/ARM/')
AUDIT_ARCH := $(shell echo $(AUDIT_ARCH) | sed 's/I[456]86/I386/')
AUDIT_ARCH := $(shell echo $(AUDIT_ARCH) | sed 's/PPC64/PPC/')
AUDIT_ARCH := $(shell echo $(AUDIT_ARCH) | sed 's/PPCLE/PPC64LE/')
CFLAGS += -DSEITAN_AUDIT_ARCH=AUDIT_ARCH_$(AUDIT_ARCH)
CFLAGS += -Wall -Wextra -pedantic
export CFLAGS
all: seitan-eater seitan
build: build.c filter.c filter.h numbers.h
$(CC) $(CFLAGS) -o build filter.c build.c
bpf_dbg: disasm.c disasm.h bpf_dbg.c
$(CC) $(CFLAGS) -o bpf_dbg bpf_dbg.c disasm.c
seitan-eater: eater.c
$(CC) $(CFLAGS) -o seitan-eater eater.c
seitan: seitan.c transform.h
$(CC) $(CFLAGS) -o seitan seitan.c
numbers.h:
./nr_syscalls.sh
test-unit:
$(MAKE) -C tests/unit
transform.h: qemu_filter
./transform.sh qemu_filter
clean:
rm -f filter.h numbers.h transform.h bpf.out build seitan-eater seitan
|