From 05f565cdb55d3265a40e5a23d335a72346d2f032 Mon Sep 17 00:00:00 2001 From: q-posev Date: Fri, 30 Apr 2021 15:53:11 +0200 Subject: [PATCH] Makefile for tests --- tests/Makefile.in | 77 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 tests/Makefile.in diff --git a/tests/Makefile.in b/tests/Makefile.in new file mode 100644 index 0000000..759bfad --- /dev/null +++ b/tests/Makefile.in @@ -0,0 +1,77 @@ +# @configure_input@ + +# Package-specific substitution variables +package = @PACKAGE_NAME@ +version = @PACKAGE_VERSION@ +tarname = @PACKAGE_TARNAME@ +distdir = $(tarname)-$(version) + +# Prefix-specific substitution variables +prefix = @prefix@ +includedir = @includedir@ +docdir = @docdir@ +htmldir = @htmldir@ +libdir = @libdir@ +# Supplementary +exec_prefix = @exec_prefix@ +libexecdir = @libexecdir@ +lispdir = @lispdir@ +# VPATH-specific substitution variables +srcdir = @srcdir@ +VPATH = @srcdir@ + +# Tool-specific substitution variables +CC = @CC@ +CFLAGS = @CFLAGS@ +CPPFLAGS = @CPPFLAGS@ +FC = @FC@ +FCFLAGS = @FCFLAGS@ +LIBS = @LIBS@ +LDFLAGS = @LDFLAGS@ +INSTALL = @INSTALL@ + +# Temporary solution to obtain compiled TREXIO from src directory +trexio_src = $(PWD)/../src + +.PHONY: clean +.POSIX: + + +check: test_c test_f + $(RM) -r -- trexio_test + $(RM) -r -- trexio_test_fort + ./test_c + ./test_f + + +test_c: upd_trexio test.c + $(CC) $(CPPFLAGS) -I$(includedir) $(CFLAGS) -Wl,-rpath,$(PWD) -L. test.c -ltrexio $(LDFLAGS) $(LIBS) -o test_c + + +test_f: upd_trexio test.f90 + $(FC) $(CPPFLAGS) -I$(includedir) $(FCFLAGS) -Wl,-rpath,$(PWD) -L. test.f90 trexio_f.o -ltrexio $(LDFLAGS) $(LIBS) -o test_f + + +upd_trexio: $(trexio_src)/libtrexio.so $(trexio_src)/trexio_f.o + cp $(trexio_src)/libtrexio.so . + cp $(trexio_src)/trexio_f.o . + cp $(trexio_src)/trexio.mod $(includedir) + + +clean: + $(RM) -- *.h5 test_f test_c + $(RM) -r -- trexio_test/ trexio_test_fort/ + + +clean-all: + $(RM) -- trexio_f.o libtrexio.so test_*.h5 test_f test_c + $(RM) -r -- trexio_test/ trexio_test_fort/ + + +Makefile: Makefile.in ../config.status + cd .. && ./config.status tests/$@ + + +../config.status: ../configure + cd .. && ./config.status --recheck +