From: Dmitry Selyutin Date: Wed, 17 Jan 2024 15:28:34 +0000 (+0300) Subject: liboppc: introduce simple check X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=refs%2Fheads%2Foppc;p=openpower-isa.git liboppc: introduce simple check --- 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 $@