File tree Expand file tree Collapse file tree 6 files changed +63
-46
lines changed
Expand file tree Collapse file tree 6 files changed +63
-46
lines changed Original file line number Diff line number Diff line change 7171 if : contains(matrix.os, 'ubuntu') && contains(matrix.gcc_v, '9')
7272 run : |
7373 make -f Makefile.manual
74+ make -f Makefile.manual test
75+ make -f Makefile.manual clean
Original file line number Diff line number Diff line change 11# Fortran stdlib Makefile
22
33FC = gfortran
4- FCFLAGS=-O0
4+ FCFLAGS = -Wall -Wextra -Wimplicit-interface -fPIC -g -fcheck=all
55
6- .PHONY: all clean
6+ export FC
7+ export FCFLAGS
78
8- all: stdlib tests
9+ .PHONY: all clean test
910
10- stdlib:
11- $(MAKE) -f Makefile.manual FC=${FC} FCFLAGS=${FCFLAGS} --directory=src
11+ all:
12+ $(MAKE) -f Makefile.manual --directory=src
13+ $(MAKE) -f Makefile.manual --directory=src/tests
1214
13- tests: stdlib
14- $(MAKE) -f Makefile.manual FC=${FC} FCFLAGS=${FCFLAGS} --directory=src/tests
15+ test:
16+ $(MAKE) -f Makefile.manual --directory=src/tests test
17+ @echo
18+ @echo "All tests passed."
1519
1620clean:
1721 $(MAKE) -f Makefile.manual clean --directory=src
Original file line number Diff line number Diff line change 1+ LIB = libstdlib.a
2+
13OBJS = stdlib_experimental_ascii.o \
24 stdlib_experimental_error.o \
35 stdlib_experimental_io.o \
6+ f18estop.o
47
58.PHONY: all clean
6- .SUFFIXES: .f90 .o
7-
8- all: $(OBJS)
9-
10- .f90.o:
11- $(FC) $(FCFLAGS) -c $<
9+ .SUFFIXES: $(SUFFIXES) .f90 .o
1210
13- %.o: %.mod
11+ all: $(LIB)
1412
15- stdlib_experimental_ascii.o: stdlib_experimental_ascii.f90
16- stdlib_experimental_error.o: stdlib_experimental_error.f90
17- stdlib_experimental_io.o: stdlib_experimental_io.f90
13+ $(LIB): $(OBJS)
14+ ar rcs $@ $(OBJS)
1815
1916clean:
20- $(RM) *.o *.mod
17+ $(RM) $(LIB) $(OBJS) *.mod
18+
19+ %.o: %.f90
20+ $(FC) $(FCFLAGS) -c $<
Original file line number Diff line number Diff line change 1- .PHONY: all clean
1+ .PHONY: all clean test
22
3- all: ascii/test_ascii loadtxt/test_loadtxt
4-
5- ascii/test_ascii:
3+ all:
64 $(MAKE) -f Makefile.manual --directory=ascii
7-
8- loadtxt/test_loadtxt:
95 $(MAKE) -f Makefile.manual --directory=loadtxt
106
7+ test:
8+ $(MAKE) -f Makefile.manual --directory=ascii test
9+ $(MAKE) -f Makefile.manual --directory=loadtxt test
10+
1111clean:
1212 $(MAKE) -f Makefile.manual --directory=ascii clean
1313 $(MAKE) -f Makefile.manual --directory=loadtxt clean
Original file line number Diff line number Diff line change 1+ PROG = test_ascii
2+ OBJS = test_ascii.o
3+
14CPPFLAGS = -I../..
2- OBJS = ../../stdlib_experimental_ascii.o \
3- ../../stdlib_experimental_error.o
5+ LDFLAGS = -L../.. -lstdlib
46
5- .PHONY: all clean
6- .SUFFIXES: .f90 .o
7+ .PHONY: all clean test
8+ .SUFFIXES: $(SUFFIXES) .f90 .o
79
8- all: test_ascii
10+ all: $(PROG)
911
10- test_ascii: test_ascii.f90 $(OBJS)
11- $(FC) $(FCFLAGS) $(CPPFLAGS) $< -o $@ $(OBJS)
12+ $(PROG): $(OBJS)
13+ $(FC) $(FCFLAGS) $(CPPFLAGS) -o $@ $(OBJS) $(LDFLAGS )
1214
13- %.o: %.mod
15+ test:
16+ ./$(PROG)
1417
1518clean:
16- $(RM) test_ascii
17- $(RM) *.o *.mod
19+ $(RM) $(PROG) $(OBJS) *.mod
20+
21+ %.o: %.f90
22+ $(FC) $(FCFLAGS) $(CPPFLAGS) -c $<
Original file line number Diff line number Diff line change 11CPPFLAGS = -I../..
2- OBJS = ../../stdlib_experimental_error.o \
3- ../../stdlib_experimental_io.o
2+ LDFLAGS = -L../.. -lstdlib
43
5- .PHONY: all clean
6- .SUFFIXES: .f90 .o
4+ .PHONY: all clean test
5+ .SUFFIXES: $(SUFFIXES) .f90 .o
76
8- all: test_loadtxt test_savetxt
7+ PROGS = test_loadtxt test_savetxt test_loadtxt_qp test_savetxt_qp
8+ OBJS = $(PROGS:=.o)
99
10- test_loadtxt: test_loadtxt.f90 $(OBJS)
11- $(FC) $(FCFLAGS) $(CPPFLAGS) $< -o $@ $(OBJS)
1210
13- test_savetxt: test_savetxt.f90 $(OBJS)
14- $(FC) $(FCFLAGS) $(CPPFLAGS) $< -o $@ $(OBJS)
11+ all: $(PROGS)
1512
16- %.o: %.mod
13+ $(PROGS): %: %.o
14+ $(FC) $(FCFLAGS) $(CPPFLAGS) -o $@ $^ $(LDFLAGS)
15+
16+ test:
17+ ./test_loadtxt
18+ ./test_loadtxt_qp
19+ ./test_savetxt
20+ ./test_savetxt_qp
1721
1822clean:
19- $(RM) test_loadtxt test_savetxt
20- $(RM) *.o *.mod
23+ $(RM) $(PROGS) $(OBJS) tmp.dat tmp_qp.dat
24+
25+ %.o: %.f90
26+ $(FC) $(FCFLAGS) $(CPPFLAGS) -c $<
You can’t perform that action at this time.
0 commit comments