From ab9c2cf0f935d6d97e319fbd4d177d7f8679a58f Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Wed, 17 Jan 2024 18:28:34 +0300 Subject: [PATCH] liboppc: introduce simple check --- src/liboppc/.gitignore | 2 ++ src/liboppc/Makefile | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 src/liboppc/.gitignore create mode 100644 src/liboppc/Makefile diff --git a/src/liboppc/.gitignore b/src/liboppc/.gitignore new file mode 100644 index 00000000..2809ef09 --- /dev/null +++ b/src/liboppc/.gitignore @@ -0,0 +1,2 @@ +oppc.o +oppc.c diff --git a/src/liboppc/Makefile b/src/liboppc/Makefile new file mode 100644 index 00000000..4fa2dc9c --- /dev/null +++ b/src/liboppc/Makefile @@ -0,0 +1,36 @@ +CC?=gcc +CFLAGS?=-O0 -g -Werror -Wall -Wextra +PYTHON?=python3 + + +GENS:=oppc.c +SRCS:=$(GENS) +OBJS:=oppc.o + + +.SUFFIX: .so .a .o .c + + +.PHONY: all +all: build + + +.PHONY: build +build: $(OBJS) + + +.PHONY: clean +clean: + rm -f $(GENS) + rm -f $(OBJS) + + +oppc.o: oppc.c + + +oppc.c: + $(PYTHON) -m openpower.oppc > $@ + + +.c.o: + $(CC) $(CPPFLAGS) -I. $(CFLAGS) -std=c11 -fPIC -c $< -o $@ -- 2.30.2