File tree Expand file tree Collapse file tree 6 files changed +60
-46
lines changed Expand file tree Collapse file tree 6 files changed +60
-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+ FFLAGS = -Wall -Wextra -Wimplicit-interface -fPIC -g -fcheck=all
55
6- .PHONY: all clean
6+ export FC
7+ export FFLAGS
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)
99
10- .f90.o:
11- $(FC) $(FCFLAGS) -c $<
10+ all: $(LIB)
1211
13- %.o: %.mod
14-
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
12+ $(LIB): $(OBJS)
13+ ar rcs $@ $(OBJS)
1814
1915clean:
20- $(RM) *.o *.mod
16+ $(RM) $(LIB) $(OBJS) *.mod
17+
18+ %.o: %.f90
19+ $(FC) $(FFLAGS) -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
78
8- all: test_ascii
9+ all: $(PROG)
910
10- test_ascii: test_ascii.f90 $(OBJS)
11- $(FC) $(FCFLAGS ) $(CPPFLAGS) $< -o $@ $(OBJS)
11+ $(PROG): $(OBJS)
12+ $(FC) $(FFLAGS ) $(CPPFLAGS) -o $@ $(OBJS) $(LDFLAGS )
1213
13- %.o: %.mod
14+ test:
15+ ./$(PROG)
1416
1517clean:
16- $(RM) test_ascii
17- $(RM) *.o *.mod
18+ $(RM) $(PROG) $(OBJS) *.mod
19+
20+ %.o: %.f90
21+ $(FC) $(FFLAGS) $(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
75
8- all: test_loadtxt test_savetxt
6+ PROGS = test_loadtxt test_savetxt test_loadtxt_qp test_savetxt_qp
7+ OBJS = $(PROGS:=.o)
98
10- test_loadtxt: test_loadtxt.f90 $(OBJS)
11- $(FC) $(FCFLAGS) $(CPPFLAGS) $< -o $@ $(OBJS)
129
13- test_savetxt: test_savetxt.f90 $(OBJS)
14- $(FC) $(FCFLAGS) $(CPPFLAGS) $< -o $@ $(OBJS)
10+ all: $(PROGS)
1511
16- %.o: %.mod
12+ $(PROGS): %: %.o
13+ $(FC) $(FFLAGS) $(CPPFLAGS) -o $@ $^ $(LDFLAGS)
14+
15+ test:
16+ ./test_loadtxt
17+ ./test_loadtxt_qp
18+ ./test_savetxt
19+ ./test_savetxt_qp
1720
1821clean:
19- $(RM) test_loadtxt test_savetxt
20- $(RM) *.o *.mod
22+ $(RM) $(PROGS) $(OBJS) tmp.dat tmp_qp.dat
23+
24+ %.o: %.f90
25+ $(FC) $(FFLAGS) $(CPPFLAGS) -c $<
You can’t perform that action at this time.
0 commit comments