diff options
author | Alice Frosi <afrosi@redhat.com> | 2023-03-24 16:08:46 +0100 |
---|---|---|
committer | Alice Frosi <afrosi@redhat.com> | 2023-03-24 16:08:46 +0100 |
commit | e6562db0423e6019154baf05beb02ff3da02f3bb (patch) | |
tree | 07c17ea7d3c193c7cdf6b591422a1e6b7ba22a99 /debug/Makefile | |
parent | 2e4cab1ff7c9d8db278427d9dca6ccb62619ca18 (diff) | |
download | seitan-e6562db0423e6019154baf05beb02ff3da02f3bb.tar seitan-e6562db0423e6019154baf05beb02ff3da02f3bb.tar.gz seitan-e6562db0423e6019154baf05beb02ff3da02f3bb.tar.bz2 seitan-e6562db0423e6019154baf05beb02ff3da02f3bb.tar.lz seitan-e6562db0423e6019154baf05beb02ff3da02f3bb.tar.xz seitan-e6562db0423e6019154baf05beb02ff3da02f3bb.tar.zst seitan-e6562db0423e6019154baf05beb02ff3da02f3bb.zip |
Re-arrange repository structure
Diffstat (limited to 'debug/Makefile')
-rw-r--r-- | debug/Makefile | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/debug/Makefile b/debug/Makefile new file mode 100644 index 0000000..6ef7900 --- /dev/null +++ b/debug/Makefile @@ -0,0 +1,37 @@ +# SPDX-License-Identifier: GPL-3.0-or-later +# +# seitan - Syscall Expressive Interpreter, Transformer and Notifier +# +# debug/Makefile - Makefile for debug utilities: bpf_dbg +# +# Copyright 2023 Red Hat GmbH +# Author: Alice Frosi <afrosi@redhat.com> + +SRCS := bpf_dbg.c disasm.c +HEADERS := disasm.h +BIN := $(OUTDIR)bpf_dbg +CFLAGS += -Wall -Wextra -pedantic + +# TODO: remove this part together with the build binary +# when cooker is ready +TARGET := $(shell $(CC) -dumpmachine) +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/') + +bpf_dbg: $(SRCS) $(HEADERS) + $(CC) $(CFLAGS) -o $(BIN) $(SRCS) + +# TODO: remove when cooker is ready +build: build.c ../cooker/filter.c ../cooker/filter.h ../common/numbers.h + $(CC) $(CFLAGS) -I../common -I../cooker -DSEITAN_AUDIT_ARCH=AUDIT_ARCH_$(AUDIT_ARCH)\ + -o $(OUTDIR)build ../cooker/filter.c build.c + +all: $(BIN) + +clean: + rm -f $(BIN) build |