Skip to content

Commit b2db7bc

Browse files
authored
Merge pull request #46 from milancurcic/update-manual-makefiles
Update manual makefiles
2 parents f4b05ac + ee9881b commit b2db7bc

9 files changed

+85
-38
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

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,29 @@
22

33
## Getting started
44

5+
### Get the code
6+
57
```
68
git clone https://github.com/fortran-lang/stdlib
79
cd stdlib
10+
```
11+
12+
### Build with CMake
13+
14+
```
15+
mkdir build
16+
cd build
17+
cmake ..
818
make
19+
ctest
20+
```
21+
22+
### Build with make
23+
24+
Alternatively, you can build using provided Makefiles:
25+
26+
```
27+
make -f Makefile.manual
928
```
1029

1130
## Contributing

src/Makefile.manual

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
OBJS = stdlib_experimental_ascii.o \
2+
stdlib_experimental_error.o \
3+
stdlib_experimental_io.o \
4+
5+
.PHONY: all clean
6+
.SUFFIXES: .f90 .o
7+
8+
all: $(OBJS)
9+
10+
.f90.o:
11+
$(FC) $(FCFLAGS) -c $<
12+
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
18+
19+
clean:
20+
$(RM) *.o *.mod

src/lib/Makefile.manual

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/lib/mod_stdlib.f90

Lines changed: 0 additions & 2 deletions
This file was deleted.

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

src/tests/test_dummy.f90

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)