diff options
author | Alice Frosi <afrosi@redhat.com> | 2023-03-24 10:07:48 +0100 |
---|---|---|
committer | Alice Frosi <afrosi@redhat.com> | 2023-03-24 15:38:07 +0100 |
commit | 069009f8e39238ec1a67fba6cfb287b9a0cac83e (patch) | |
tree | 77f817eb7b96178b71f3d573a83cec19f7fba09c /src/debug/Makefile | |
parent | 06b0f6d323c396ca1df000af96fdd07cc69b06e0 (diff) | |
download | seitan-069009f8e39238ec1a67fba6cfb287b9a0cac83e.tar seitan-069009f8e39238ec1a67fba6cfb287b9a0cac83e.tar.gz seitan-069009f8e39238ec1a67fba6cfb287b9a0cac83e.tar.bz2 seitan-069009f8e39238ec1a67fba6cfb287b9a0cac83e.tar.lz seitan-069009f8e39238ec1a67fba6cfb287b9a0cac83e.tar.xz seitan-069009f8e39238ec1a67fba6cfb287b9a0cac83e.tar.zst seitan-069009f8e39238ec1a67fba6cfb287b9a0cac83e.zip |
Re-organize project and add license header
Diffstat (limited to 'src/debug/Makefile')
-rw-r--r-- | src/debug/Makefile | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/debug/Makefile b/src/debug/Makefile new file mode 100644 index 0000000..6ef7900 --- /dev/null +++ b/src/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 |