Skip to content

Commit 230465d

Browse files
committed
update manual Makefiles so they build the library and tests
1 parent 6b0282a commit 230465d

File tree

5 files changed

+53
-19
lines changed

5 files changed

+53
-19
lines changed

Makefile.manual

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ FCFLAGS=-O0
88
all: stdlib tests
99

1010
stdlib:
11-
$(MAKE) -f Makefile.manual FC=${FC} FCFLAGS=${FCFLAGS} --directory=src/lib
11+
$(MAKE) -f Makefile.manual FC=${FC} FCFLAGS=${FCFLAGS} --directory=src
1212

1313
tests: stdlib
1414
$(MAKE) -f Makefile.manual FC=${FC} FCFLAGS=${FCFLAGS} --directory=src/tests
1515

1616
clean:
17-
$(MAKE) -f Makefile.manual clean --directory=src/lib
17+
$(MAKE) -f Makefile.manual clean --directory=src
1818
$(MAKE) -f Makefile.manual clean --directory=src/tests

src/Makefile.manual

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
1-
# Fortran stdlib Makefile
2-
3-
OBJS = mod_stdlib.o
1+
OBJS = stdlib_experimental_ascii.o \
2+
stdlib_experimental_error.o \
3+
stdlib_experimental_io.o \
44

55
.PHONY: all clean
66
.SUFFIXES: .f90 .o
77

8-
all: mod_stdlib.o
8+
all: $(OBJS)
99

1010
.f90.o:
1111
$(FC) $(FCFLAGS) -c $<
1212

1313
%.o: %.mod
1414

15-
mod_stdlib.o: mod_stdlib.f90
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
1618

1719
clean:
1820
$(RM) *.o *.mod

src/tests/Makefile.manual

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
1-
# Fortran stdlib Makefile
2-
3-
CPPFLAGS=-I../lib
4-
OBJS = ../lib/mod_stdlib.o
5-
61
.PHONY: all clean
7-
.SUFFIXES: .f90 .o
82

9-
all: test_dummy
3+
all: ascii/test_ascii loadtxt/test_loadtxt
104

11-
test_dummy: test_dummy.f90 $(OBJS)
12-
$(FC) $(FCFLAGS) $(CPPFLAGS) $< -o $@ $(OBJS)
5+
ascii/test_ascii:
6+
$(MAKE) -f Makefile.manual --directory=ascii
137

14-
%.o: %.mod
8+
loadtxt/test_loadtxt:
9+
$(MAKE) -f Makefile.manual --directory=loadtxt
1510

1611
clean:
17-
$(RM) test_dummy
18-
$(RM) *.o *.mod
12+
$(MAKE) -f Makefile.manual --directory=ascii clean
13+
$(MAKE) -f Makefile.manual --directory=loadtxt clean

src/tests/ascii/Makefile.manual

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
CPPFLAGS = -I../..
2+
OBJS = ../../stdlib_experimental_ascii.o \
3+
../../stdlib_experimental_error.o
4+
5+
.PHONY: all clean
6+
.SUFFIXES: .f90 .o
7+
8+
all: test_ascii
9+
10+
test_ascii: test_ascii.f90 $(OBJS)
11+
$(FC) $(FCFLAGS) $(CPPFLAGS) $< -o $@ $(OBJS)
12+
13+
%.o: %.mod
14+
15+
clean:
16+
$(RM) test_ascii
17+
$(RM) *.o *.mod

src/tests/loadtxt/Makefile.manual

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
CPPFLAGS = -I../..
2+
OBJS = ../../stdlib_experimental_error.o \
3+
../../stdlib_experimental_io.o
4+
5+
.PHONY: all clean
6+
.SUFFIXES: .f90 .o
7+
8+
all: test_loadtxt test_savetxt
9+
10+
test_loadtxt: test_loadtxt.f90 $(OBJS)
11+
$(FC) $(FCFLAGS) $(CPPFLAGS) $< -o $@ $(OBJS)
12+
13+
test_savetxt: test_savetxt.f90 $(OBJS)
14+
$(FC) $(FCFLAGS) $(CPPFLAGS) $< -o $@ $(OBJS)
15+
16+
%.o: %.mod
17+
18+
clean:
19+
$(RM) test_loadtxt test_savetxt
20+
$(RM) *.o *.mod

0 commit comments

Comments
 (0)