From a83f951d10662f225228b8858b9e5f4555c46a44 Mon Sep 17 00:00:00 2001 From: Milan Skocic Date: Tue, 14 Nov 2023 07:05:11 +0100 Subject: [PATCH] BLD: Completed the transition to generator in pure Fortran. --- Makefile | 5 ++++- srcgen/Makefile | 6 +++--- srcgen/{fmain.f90 => main.f90} | 2 ++ 3 files changed, 9 insertions(+), 4 deletions(-) rename srcgen/{fmain.f90 => main.f90} (98%) diff --git a/Makefile b/Makefile index b9428b6..41432d9 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,10 @@ endif .PHONY: all clean install uninstall copy_h copy_a shared_linux shared_windows shared_darwin -all: $(LIBNAME) +all: generator $(LIBNAME) + +generator: + make -C ./srcgen $(LIBNAME): build copy_h copy_a shared copy_shared diff --git a/srcgen/Makefile b/srcgen/Makefile index 196c440..c908f79 100644 --- a/srcgen/Makefile +++ b/srcgen/Makefile @@ -4,13 +4,13 @@ FFLAGS=-std=f2008 -Wall -Wextra -pedantic .PHONY: generate -all: srcgen srcgenf +all: srcgen srcgen: generator ./generator -generator: utilities.o fortran_code.o c_code.o py_code.o cpy_code.o fmain.o - $(FC) $^ -o generatorf +generator: utilities.o fortran_code.o c_code.o py_code.o cpy_code.o main.o + $(FC) $^ -o generator %.o: %.f90 $(FC) -c $(FFLAGS) $< -o $@ diff --git a/srcgen/fmain.f90 b/srcgen/main.f90 similarity index 98% rename from srcgen/fmain.f90 rename to srcgen/main.f90 index 49d5d23..31d7e17 100644 --- a/srcgen/fmain.f90 +++ b/srcgen/main.f90 @@ -91,5 +91,7 @@ program generator close(fcheader) print *, "Closing python as txt header file..." close(fpython) + print *, "Closing cpython file..." + close(fcpython) end program \ No newline at end of file