-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Compile the quadruple precision loadtxt * Implement "make test" to run tests and run them at the CI * Create a static libstdlib.a library and use it in tests * Use more modern syntax and simplify * Pass in the FC/FCFLAGS variables automatically * Consolidate stdlib tests targets
- Loading branch information
Showing
6 changed files
with
63 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
LIB = libstdlib.a | ||
|
||
OBJS = stdlib_experimental_ascii.o \ | ||
stdlib_experimental_error.o \ | ||
stdlib_experimental_io.o \ | ||
f18estop.o | ||
|
||
.PHONY: all clean | ||
.SUFFIXES: .f90 .o | ||
|
||
all: $(OBJS) | ||
|
||
.f90.o: | ||
$(FC) $(FCFLAGS) -c $< | ||
.SUFFIXES: $(SUFFIXES) .f90 .o | ||
|
||
%.o: %.mod | ||
all: $(LIB) | ||
|
||
stdlib_experimental_ascii.o: stdlib_experimental_ascii.f90 | ||
stdlib_experimental_error.o: stdlib_experimental_error.f90 | ||
stdlib_experimental_io.o: stdlib_experimental_io.f90 | ||
$(LIB): $(OBJS) | ||
ar rcs $@ $(OBJS) | ||
|
||
clean: | ||
$(RM) *.o *.mod | ||
$(RM) $(LIB) $(OBJS) *.mod | ||
|
||
%.o: %.f90 | ||
$(FC) $(FCFLAGS) -c $< |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
.PHONY: all clean | ||
.PHONY: all clean test | ||
|
||
all: ascii/test_ascii loadtxt/test_loadtxt | ||
|
||
ascii/test_ascii: | ||
all: | ||
$(MAKE) -f Makefile.manual --directory=ascii | ||
|
||
loadtxt/test_loadtxt: | ||
$(MAKE) -f Makefile.manual --directory=loadtxt | ||
|
||
test: | ||
$(MAKE) -f Makefile.manual --directory=ascii test | ||
$(MAKE) -f Makefile.manual --directory=loadtxt test | ||
|
||
clean: | ||
$(MAKE) -f Makefile.manual --directory=ascii clean | ||
$(MAKE) -f Makefile.manual --directory=loadtxt clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,22 @@ | ||
PROG = test_ascii | ||
OBJS = test_ascii.o | ||
|
||
CPPFLAGS = -I../.. | ||
OBJS = ../../stdlib_experimental_ascii.o \ | ||
../../stdlib_experimental_error.o | ||
LDFLAGS = -L../.. -lstdlib | ||
|
||
.PHONY: all clean | ||
.SUFFIXES: .f90 .o | ||
.PHONY: all clean test | ||
.SUFFIXES: $(SUFFIXES) .f90 .o | ||
|
||
all: test_ascii | ||
all: $(PROG) | ||
|
||
test_ascii: test_ascii.f90 $(OBJS) | ||
$(FC) $(FCFLAGS) $(CPPFLAGS) $< -o $@ $(OBJS) | ||
$(PROG): $(OBJS) | ||
$(FC) $(FCFLAGS) $(CPPFLAGS) -o $@ $(OBJS) $(LDFLAGS) | ||
|
||
%.o: %.mod | ||
test: | ||
./$(PROG) | ||
|
||
clean: | ||
$(RM) test_ascii | ||
$(RM) *.o *.mod | ||
$(RM) $(PROG) $(OBJS) *.mod | ||
|
||
%.o: %.f90 | ||
$(FC) $(FCFLAGS) $(CPPFLAGS) -c $< |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,26 @@ | ||
CPPFLAGS = -I../.. | ||
OBJS = ../../stdlib_experimental_error.o \ | ||
../../stdlib_experimental_io.o | ||
LDFLAGS = -L../.. -lstdlib | ||
|
||
.PHONY: all clean | ||
.SUFFIXES: .f90 .o | ||
.PHONY: all clean test | ||
.SUFFIXES: $(SUFFIXES) .f90 .o | ||
|
||
all: test_loadtxt test_savetxt | ||
PROGS = test_loadtxt test_savetxt test_loadtxt_qp test_savetxt_qp | ||
OBJS = $(PROGS:=.o) | ||
|
||
test_loadtxt: test_loadtxt.f90 $(OBJS) | ||
$(FC) $(FCFLAGS) $(CPPFLAGS) $< -o $@ $(OBJS) | ||
|
||
test_savetxt: test_savetxt.f90 $(OBJS) | ||
$(FC) $(FCFLAGS) $(CPPFLAGS) $< -o $@ $(OBJS) | ||
all: $(PROGS) | ||
|
||
%.o: %.mod | ||
$(PROGS): %: %.o | ||
$(FC) $(FCFLAGS) $(CPPFLAGS) -o $@ $^ $(LDFLAGS) | ||
|
||
test: | ||
./test_loadtxt | ||
./test_loadtxt_qp | ||
./test_savetxt | ||
./test_savetxt_qp | ||
|
||
clean: | ||
$(RM) test_loadtxt test_savetxt | ||
$(RM) *.o *.mod | ||
$(RM) $(PROGS) $(OBJS) tmp.dat tmp_qp.dat | ||
|
||
%.o: %.f90 | ||
$(FC) $(FCFLAGS) $(CPPFLAGS) -c $< |