aboutgitcodelistschat:MatrixIRC
diff options
context:
space:
mode:
authorAlice Frosi <afrosi@redhat.com>2023-03-29 13:59:20 +0200
committerAlice Frosi <afrosi@redhat.com>2023-03-29 14:03:11 +0200
commitb389f10f4dbabb9fd13ae238252e7d1a9ce64174 (patch)
tree39a0fd0fec806ac9bcde0337edc232f860f522e3
parentb6c964fb5a00c8b8ab26a4678cdde24c3e9b1d9c (diff)
downloadseitan-b389f10f4dbabb9fd13ae238252e7d1a9ce64174.tar
seitan-b389f10f4dbabb9fd13ae238252e7d1a9ce64174.tar.gz
seitan-b389f10f4dbabb9fd13ae238252e7d1a9ce64174.tar.bz2
seitan-b389f10f4dbabb9fd13ae238252e7d1a9ce64174.tar.lz
seitan-b389f10f4dbabb9fd13ae238252e7d1a9ce64174.tar.xz
seitan-b389f10f4dbabb9fd13ae238252e7d1a9ce64174.tar.zst
seitan-b389f10f4dbabb9fd13ae238252e7d1a9ce64174.zip
cooker: add filter.c/.h to the Makefile
Integration of filter part in cooker. The filter requires the AUDIT_ARCH variable.
-rw-r--r--cooker/Makefile20
1 files changed, 17 insertions, 3 deletions
diff --git a/cooker/Makefile b/cooker/Makefile
index 737a217..4f72448 100644
--- a/cooker/Makefile
+++ b/cooker/Makefile
@@ -8,12 +8,26 @@
# Author: Stefano Brivio <sbrivio@redhat.com>
COMMON_DIR := ../common
-SRCS := calls.c emit.c gluten.c main.c parse.c parson.c $(COMMON_DIR)/util.c calls/net.c
-HEADERS := calls.h cooker.h emit.h gluten.h parse.h parson.h calls/net.h $(COMMON_DIR)/util.h
+SRCS := calls.c emit.c filter.c gluten.c main.c parse.c parson.c \
+ $(COMMON_DIR)/util.c calls/net.c
+HEADERS := calls.h cooker.h emit.h filter.h \
+ gluten.h parse.h parson.h calls/net.h \
+ $(COMMON_DIR)/util.h
BIN := $(OUTDIR)seitan-cooker
+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/')
+
+CFLAGS += -DSEITAN_AUDIT_ARCH=AUDIT_ARCH_$(AUDIT_ARCH)
+CFLAGS += -O0 -g -Wall -Wextra -pedantic -std=c99 -I$(COMMON_DIR)
cooker: $(SRCS) $(HEADERS)
- $(CC) -O0 -g -Wall -Wextra -pedantic -std=c99 -I$(COMMON_DIR) -o $(BIN) $(SRCS)
+ $(CC) $(CFLAGS) -o $(BIN) $(SRCS)
all: cooker