From a22c78c7cbe45338a0bf4725241a510f07061720 Mon Sep 17 00:00:00 2001 From: Petra Date: Mon, 27 Nov 2023 21:09:46 +1300 Subject: [PATCH] Working makefile --- 2019/Makefile | 19 +++++++++++++++++++ 2019/src/test.f90 | 3 +++ README.MD | 2 +- 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 2019/Makefile create mode 100644 2019/src/test.f90 diff --git a/2019/Makefile b/2019/Makefile new file mode 100644 index 0000000..bde9b35 --- /dev/null +++ b/2019/Makefile @@ -0,0 +1,19 @@ +FC:=gfortran +FFLAGS:=-Wall +BIN:=./bin +SRC:=./src +BINS:=./bin/test.bin + +all: aoc19 + +$(SRC)/%.o: $(SRC)/%.f90 + $(FC) $(FFLAGS) -c -o $@ $< + +$(BIN)/%.bin: $(SRC)/%.o + $(FC) $(FFLAGS) -o $@ $< + +aoc19: $(BINS) + +clean: + rm -f $(BINS) + diff --git a/2019/src/test.f90 b/2019/src/test.f90 new file mode 100644 index 0000000..d659186 --- /dev/null +++ b/2019/src/test.f90 @@ -0,0 +1,3 @@ +program test + print *, 'Hellord!' +end program test diff --git a/README.MD b/README.MD index 56c660a..a8db1a1 100644 --- a/README.MD +++ b/README.MD @@ -3,7 +3,7 @@ Files for Advent of Code 2023, and related stuff. Hoping to work with Fortran as Structure: * 2019 + * Makefile * src/ - * obj/ * bin/