aboutgitcodelistschat:MatrixIRC
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile56
1 files changed, 27 insertions, 29 deletions
diff --git a/Makefile b/Makefile
index 4b59853..10d1606 100644
--- a/Makefile
+++ b/Makefile
@@ -1,50 +1,48 @@
-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/')
+# SPDX-License-Identifier: GPL-3.0-or-later
+#
+# seitan - Syscall Expressive Interpreter, Transformer and Notifier
+#
+# Copyright 2023 Red Hat GmbH
+# Authors: Alice Frosi <afrosi@redhat.com>, Stefano Brivio <sbrivio@redhat.com>
-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/')
+DIR := $(shell pwd)
+OUTDIR ?= $(DIR)/
-CFLAGS += -DSEITAN_AUDIT_ARCH=AUDIT_ARCH_$(AUDIT_ARCH)
-CFLAGS += -DTMP_DATA_SIZE=1000
-CFLAGS += -Wall -Wextra -pedantic
+export OUTDIR
-export CFLAGS
+all: cooker eater seitan
-all: seitan-eater seitan
+cooker:
+ $(MAKE) -C src/cooker
-build: build.c filter.c filter.h numbers.h
- $(CC) $(CFLAGS) -o build filter.c build.c
+eater:
+ $(MAKE) -C src/eater
-bpf_dbg: disasm.c disasm.h bpf_dbg.c
- $(CC) $(CFLAGS) -o bpf_dbg bpf_dbg.c disasm.c
+seitan:
+ $(MAKE) -C src/seitan
-seitan-eater: eater.c common.h common.c
- $(CC) $(CFLAGS) -o seitan-eater eater.c common.c
+debug:
+ $(MAKE) -C src/debug
-seitan: seitan.c transform.h common.h common.c operations.c
- $(CC) $(CFLAGS) -o seitan seitan.c common.c operations.c
+clean:
+ $(MAKE) -C src/cooker clean
+ $(MAKE) -C src/seitan clean
+ $(MAKE) -C src/eater clean
+ $(MAKE) -C src/debug clean
numbers.h:
- ./nr_syscalls.sh
+ ./scripts/nr_syscalls.sh
test-unit:
$(MAKE) -C tests/unit
-build-test-images: build seitan seitan-eater
+# TODO: remove the build binary when cooker is ready
+build-test-images: seitan eater
$(MAKE) -C tests-utils
+ $(MAKE) -C debug build
./build test.bpf
sudo podman build -t test-seitan -f containerfiles/tests/seitan/Containerfile .
sudo podman build -t test-eater -f containerfiles/tests/eater/Containerfile .
test-integration:
python -m pytest tests/integration/seitan_containers.py
-
-transform.h: qemu_filter
- ./transform.sh qemu_filter
-
-clean:
- rm -f filter.h numbers.h transform.h bpf.out build seitan-eater seitan