From: Dmitry Selyutin Date: Wed, 6 Sep 2023 18:55:17 +0000 (+0300) Subject: libsvp64: introduce Makefile sketch X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3ecb3cfe7b2e51d9fae95f9bba60b11bc9371d05;p=openpower-isa.git libsvp64: introduce Makefile sketch --- diff --git a/src/libsvp64/Makefile b/src/libsvp64/Makefile new file mode 100644 index 00000000..8121b9ff --- /dev/null +++ b/src/libsvp64/Makefile @@ -0,0 +1,50 @@ +CC?=gcc +AR?=ar +CFLAGS?=-O3 -Werror -Wall -Wextra +PYTHON?=python3 + + +GENS:=\ + svp64-dis-gen.c \ + svp64-opc-gen.c \ + +SRCS:=$(GENS) + +OBJS:=\ + svp64-dis-gen.o \ + svp64-opc-gen.o \ + + +.SUFFIX: .so .a .o .c + + +.PHONY: all +all: build + + +.PHONY: build +build: libsvp64.so + + +.PHONY: clean +clean: + rm -f $(GENS) + rm -f $(OBJS) + rm -f libsvp64.so + rm -f libsvp64.a + + +libsvp64.so: libsvp64.a + $(CC) -fPIC -shared -o $@ -L. -Wl,--whole-archive libsvp64.a -Wl,--no-whole-archive + + +libsvp64.a: $(OBJS) + $(AR) rcs $@ $^ + + + $(GENS): codegen.py + SILENCELOG=true $(PYTHON) codegen.py $@ > $@ + + +.c.o: + $(CC) $(CFLAGS) -fPIC -c $< -o $@