Commit 09a61723 authored by Wolfgang Kilian's avatar Wolfgang Kilian
Browse files

Mehr Kommentare im Makefile

parent 51911a2a
########################################################################
### Variables
### Variables: platform-dependent
# Compiler
FC = gfortran
FCFLAGS = -fcheck=all
LDFLAGS =
########################################################################
### Variables: project-dependent
# Program
MAIN = nnet
# Source code
# Source-code files
MAIN_SRC = $(MAIN).f90
MODULES_SRC = kinds.f90 neurons.f90
# Test output and reference
# Test output and reference data files
OUTPUT = $(MAIN).out
REFERENCE = $(MAIN).ref
########################################################################
### Variables: standard
# Module and object file names
MAIN_OBJ = $(MAIN_SRC:.f90=.o)
OBJECTS = $(MODULES_SRC:.f90=.o) $(MAIN_OBJ)
......@@ -38,6 +44,7 @@ clean:
rm -f $(OBJECTS)
rm -f $(OUTPUT)
# Full cleanup: also remove main program executable
realclean: clean
rm -f $(MAIN)
......@@ -46,9 +53,11 @@ realclean: clean
########################################################################
### Further rules and dependencies
# Output depends on and is generated by main program
$(OUTPUT): $(MAIN)
./$(MAIN)
# Main program is linked using all object files
$(MAIN): $(OBJECTS)
$(FC) $(FCFLAGS) $(LDFLAGS) $^ -o $@
......@@ -57,6 +66,7 @@ $(MAIN): $(OBJECTS)
$(FC) $(FCFLAGS) -c $<
########################################################################
### Module dependencies
### Explicit dependencies (depend on module content)
$(MAIN_OBJ): kinds.mod neurons.mod
neurons.o: kinds.mod
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment