From 867ca0c1d0e82f57409947496453b48e150e80d6 Mon Sep 17 00:00:00 2001 From: wlthr Date: Wed, 5 Jul 2023 16:22:55 +0200 Subject: [PATCH] added makefile to compile sp3mm source code --- base/serial/impl/Makefile | 2 ++ base/serial/impl/sp3mm4amg/Makefile | 42 +++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 base/serial/impl/sp3mm4amg/Makefile diff --git a/base/serial/impl/Makefile b/base/serial/impl/Makefile index 8875b3df..61aa40ef 100644 --- a/base/serial/impl/Makefile +++ b/base/serial/impl/Makefile @@ -39,6 +39,7 @@ LIBFILE=$(LIBDIR)/$(LIBNAME) objs: $(OBJS) lib: objs + $(MAKE) -C sp3mm4amg lib $(AR) $(LIBDIR)/$(LIBNAME) $(OBJS) $(RANLIB) $(LIBDIR)/$(LIBNAME) @@ -46,6 +47,7 @@ lib: objs $(OBJS): $(MODDIR)/psb_base_mod.o clean: cleanobjs + ($(MAKE) -C sp3mm4amg clean) veryclean: cleanobjs diff --git a/base/serial/impl/sp3mm4amg/Makefile b/base/serial/impl/sp3mm4amg/Makefile new file mode 100644 index 00000000..2f4a0585 --- /dev/null +++ b/base/serial/impl/sp3mm4amg/Makefile @@ -0,0 +1,42 @@ +include ../../../../Make.inc + +CC=gcc +CWALL =-Wall -Wextra +#extra to reduce useless warnings +CWALL+=-Wno-pointer-sign -Wno-unused-parameter -Wno-unused-but-set-variable -Wno-switch +CWALL+=-Wno-unused-function -Wno-unused-variable #TODO CLEAN USELESS FUNCTIONS / VARIABLES +CWALL+=-Wno-unused-label -Wfatal-errors + +CINCL = -Iinclude/ +CFLAGS = -O2 $(CWALL) $(CINCL) -fopenmp $(RUNTIME) +LDFLAGS = -lm + +LIBDIR=../../../ +LIBFILE=$(LIBDIR)/$(LIBNAME) + +SP3MM_CORE_OBJS=commons/ompGetICV.o \ + commons/sparseUtilsMulti.o \ + commons/utils.o \ + lib/linuxK_rbtree_minimalized.o \ + lib/mmio.o \ + lib/parser.o + +CBIND_OBJS=fbind/psb_f_spmm_ub.o + +OBJS= $(SP3MM_CORE_OBJS) $(CBIND_OBJS) + +%.o : %.c + $(CC) -c -o $@ $(CFLAGS) $^ $(LDFLAGS) + +objs: $(OBJS) + +lib: objs + $(AR) $(LIBDIR)/$(LIBNAME) $(OBJS) + $(RANLIB) $(LIBDIR)/$(LIBNAME) + +clean: cleanobjs + +veryclean: cleanobjs + +cleanobjs: + /bin/rm -f $(OBJS)