diff options
author | Brad Richardson <everythingfunctional@protonmail.com> | 2020-10-14 09:24:55 -0500 |
---|---|---|
committer | Brad Richardson <everythingfunctional@protonmail.com> | 2020-10-14 09:24:55 -0500 |
commit | b5b16cf826d468e79b4087500192a4a9e07c140f (patch) | |
tree | 1f615ee9ed6500bb1f6964ef2af0478b2fe51e4e /example_packages/with_makefile | |
parent | d3a65e36b28808c2c51ae41fc107f1179e27a08c (diff) | |
download | fpm-b5b16cf826d468e79b4087500192a4a9e07c140f.tar.gz fpm-b5b16cf826d468e79b4087500192a4a9e07c140f.zip |
Better organize example packages and bootstrap tests
Diffstat (limited to 'example_packages/with_makefile')
-rw-r--r-- | example_packages/with_makefile/.gitignore | 1 | ||||
-rw-r--r-- | example_packages/with_makefile/Makefile | 9 | ||||
-rw-r--r-- | example_packages/with_makefile/fpm.toml | 5 | ||||
-rw-r--r-- | example_packages/with_makefile/src/hello_makefile.f90 | 10 |
4 files changed, 25 insertions, 0 deletions
diff --git a/example_packages/with_makefile/.gitignore b/example_packages/with_makefile/.gitignore new file mode 100644 index 0000000..a007fea --- /dev/null +++ b/example_packages/with_makefile/.gitignore @@ -0,0 +1 @@ +build/* diff --git a/example_packages/with_makefile/Makefile b/example_packages/with_makefile/Makefile new file mode 100644 index 0000000..51e72d4 --- /dev/null +++ b/example_packages/with_makefile/Makefile @@ -0,0 +1,9 @@ +INCLUDE_FLAGS = $(addprefix -I,$(INCLUDE_DIRS)) + +$(BUILD_DIR)/libwith_makefile.a: $(BUILD_DIR)/hello_makefile.o + ar rs $(@) $(^) + +$(BUILD_DIR)/hello_makefile.mod: src/hello_makefile.f90 + +$(BUILD_DIR)/hello_makefile.o: src/hello_makefile.f90 + $(FC) -c -J$(BUILD_DIR) $(INCLUDE_FLAGS) $(FFLAGS) -o $(@) $(<) diff --git a/example_packages/with_makefile/fpm.toml b/example_packages/with_makefile/fpm.toml new file mode 100644 index 0000000..81dd02a --- /dev/null +++ b/example_packages/with_makefile/fpm.toml @@ -0,0 +1,5 @@ +name = "with_makefile" + +[library] +source-dir = "src" +build-script = "Makefile" diff --git a/example_packages/with_makefile/src/hello_makefile.f90 b/example_packages/with_makefile/src/hello_makefile.f90 new file mode 100644 index 0000000..2d4d1a2 --- /dev/null +++ b/example_packages/with_makefile/src/hello_makefile.f90 @@ -0,0 +1,10 @@ +module hello_makefile + implicit none + private + + public :: say_hello_from_makefile +contains + subroutine say_hello_from_makefile() + print *, "Hello from Makefile library!" + end subroutine say_hello_from_makefile +end module hello_makefile |