diff --git a/.gitignore b/.gitignore index 608b1d4..e524d79 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ .vscode/ -build/ \ No newline at end of file +build/ diff --git a/Makefile b/Makefile index f9ac81e..33b1565 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,22 @@ FC=gfortran +FFLAGS= BUILD_DIR=build SRC_DIR=src +LIBS_DIR=libs .phony: all main clean always all: always main main: - $(FC) $(SRC_DIR)/main.f90 -o $(BUILD_DIR)/fcc + cd $(LIBS_DIR)/f90getopt; $(FC) -c f90getopt.F90 + $(FC) $(FFLAGS) $(SRC_DIR)/main.f90 -o $(BUILD_DIR)/fcc -I./$(LIBS_DIR)/f90getopt/ + + always: mkdir -p $(BUILD_DIR) + mkdir -p $(BUILD_DIR)/include clean: rm -rf $(BUILD_DIR) \ No newline at end of file