Browse code

Fix test_project

Used the obsolete Makefile variable $(_f90_moddir), replaced with
explicit directories for the Fortran mod files for each target.

Also, added a library target as additional test

Lorenz Hüdepohl authored on21/05/2015 17:22:16
Showing2 changed files
... ...
@@ -7,14 +7,22 @@ bin_PROGRAMS = foo test_bar test_baz
7 7
 
8 8
 foo_SOURCES = src/foo.F90 src2/baz.F90 src/bar.F90
9 9
 foo_CPPFLAGS = -DPROGRAM_foo
10
-foo_FCFLAGS = $(FC_MODOUT)$(_f90_moddir)/foo $(FC_MODINC)$(_f90_moddir)/foo
10
+foo_FCFLAGS = $(FC_MODOUT)./fortran_mod_files/foo $(FC_MODINC)./fortran_mod_files/foo
11 11
 
12 12
 test_bar_SOURCES = src/bar.F90
13 13
 test_bar_CPPFLAGS = -DPROGRAM_test_bar
14
-test_bar_FCFLAGS = $(FC_MODOUT)$(_f90_moddir)/test_bar $(FC_MODINC)$(_f90_moddir)/test_bar
14
+test_bar_FCFLAGS = $(FC_MODOUT)./fortran_mod_files/test_bar $(FC_MODINC)./fortran_mod_files/test_bar
15 15
 
16 16
 test_baz_SOURCES = src2/baz.F90 src/bar.F90
17 17
 test_baz_CPPFLAGS = -DPROGRAM_test_baz
18
-test_baz_FCFLAGS = $(FC_MODOUT)$(_f90_moddir)/test_baz $(FC_MODINC)$(_f90_moddir)/test_baz
18
+test_baz_FCFLAGS = $(FC_MODOUT)./fortran_mod_files/test_baz $(FC_MODINC)./fortran_mod_files/test_baz
19
+
20
+# a library
21
+lib_LTLIBRARIES = libdings.la
22
+
23
+libdings_la_SOURCES = src2/baz.F90 src/bar.F90
24
+libdings_la_FCFLAGS = $(FC_MODOUT)./fortran_mod_files/libdings.la $(FC_MODINC)./fortran_mod_files/libdings.la
25
+
26
+CLEANFILES = fortran_mod_files/*/*
19 27
 
20 28
 @FORTRAN_MODULE_DEPS@
... ...
@@ -14,6 +14,7 @@ FDEP_F90_GNU_MAKE_DEPS
14 14
 AC_PROG_FC
15 15
 AC_PROG_INSTALL
16 16
 AM_PROG_CC_C_O
17
+AM_PROG_AR
17 18
 
18 19
 # fortran stuff
19 20
 AC_FC_MODULE_FLAG
... ...
@@ -30,3 +31,7 @@ AC_SUBST([FC_MODOUT])
30 31
 
31 32
 AC_CONFIG_FILES([Makefile])
32 33
 AC_OUTPUT
34
+
35
+for target in foo test_bar test_baz libdings.la; do
36
+	mkdir -p fortran_mod_files/$target
37
+done