Skip to content

Update manual makefiles #46

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile.manual
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ FCFLAGS=-O0
all: stdlib tests

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

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

clean:
$(MAKE) -f Makefile.manual clean --directory=src/lib
$(MAKE) -f Makefile.manual clean --directory=src
$(MAKE) -f Makefile.manual clean --directory=src/tests
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,29 @@

## Getting started

### Get the code

```
git clone https://github.com/fortran-lang/stdlib
cd stdlib
```

### Build with CMake

```
mkdir build
cd build
cmake ..
make
ctest
```

### Build with make

Alternatively, you can build using provided Makefiles:

```
make -f Makefile.manual
```

## Contributing
Expand Down
20 changes: 20 additions & 0 deletions src/Makefile.manual
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
OBJS = stdlib_experimental_ascii.o \
stdlib_experimental_error.o \
stdlib_experimental_io.o \

.PHONY: all clean
.SUFFIXES: .f90 .o

all: $(OBJS)

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

%.o: %.mod

stdlib_experimental_ascii.o: stdlib_experimental_ascii.f90
stdlib_experimental_error.o: stdlib_experimental_error.f90
stdlib_experimental_io.o: stdlib_experimental_io.f90

clean:
$(RM) *.o *.mod
18 changes: 0 additions & 18 deletions src/lib/Makefile.manual

This file was deleted.

2 changes: 0 additions & 2 deletions src/lib/mod_stdlib.f90

This file was deleted.

19 changes: 7 additions & 12 deletions src/tests/Makefile.manual
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
# Fortran stdlib Makefile

CPPFLAGS=-I../lib
OBJS = ../lib/mod_stdlib.o

.PHONY: all clean
.SUFFIXES: .f90 .o

all: test_dummy
all: ascii/test_ascii loadtxt/test_loadtxt

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

%.o: %.mod
loadtxt/test_loadtxt:
$(MAKE) -f Makefile.manual --directory=loadtxt

clean:
$(RM) test_dummy
$(RM) *.o *.mod
$(MAKE) -f Makefile.manual --directory=ascii clean
$(MAKE) -f Makefile.manual --directory=loadtxt clean
17 changes: 17 additions & 0 deletions src/tests/ascii/Makefile.manual
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
CPPFLAGS = -I../..
OBJS = ../../stdlib_experimental_ascii.o \
../../stdlib_experimental_error.o

.PHONY: all clean
.SUFFIXES: .f90 .o

all: test_ascii

test_ascii: test_ascii.f90 $(OBJS)
$(FC) $(FCFLAGS) $(CPPFLAGS) $< -o $@ $(OBJS)

%.o: %.mod

clean:
$(RM) test_ascii
$(RM) *.o *.mod
20 changes: 20 additions & 0 deletions src/tests/loadtxt/Makefile.manual
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
CPPFLAGS = -I../..
OBJS = ../../stdlib_experimental_error.o \
../../stdlib_experimental_io.o

.PHONY: all clean
.SUFFIXES: .f90 .o

all: test_loadtxt test_savetxt

test_loadtxt: test_loadtxt.f90 $(OBJS)
$(FC) $(FCFLAGS) $(CPPFLAGS) $< -o $@ $(OBJS)

test_savetxt: test_savetxt.f90 $(OBJS)
$(FC) $(FCFLAGS) $(CPPFLAGS) $< -o $@ $(OBJS)

%.o: %.mod

clean:
$(RM) test_loadtxt test_savetxt
$(RM) *.o *.mod
4 changes: 0 additions & 4 deletions src/tests/test_dummy.f90

This file was deleted.