File tree Expand file tree Collapse file tree 4 files changed +0
-33
lines changed
Expand file tree Collapse file tree 4 files changed +0
-33
lines changed Original file line number Diff line number Diff line change 1- TARGET = tourexec
21
3- CC = gfortran
4- CFLAGS = -fno-automatic
5-
6- LINKER = gfortran
7-
8- SRC_DIR = src
9- BIN_DIR = bin
10- OBJ_DIR = obj
11-
12- SOURCES := $(wildcard $(SRC_DIR ) /* .f)
13- OBJECTS := $(SOURCES:$(SRC_DIR ) /%.f=$(OBJ_DIR ) /%.o )
14- rm = rm -rf
15-
16- $(BIN_DIR ) /$(TARGET ) : $(OBJECTS )
17- @mkdir -p $(@D )
18- @$(LINKER ) $(OBJECTS ) -o $@
19- @echo " Linking complete"
20-
21- $(OBJECTS ) : $(OBJ_DIR ) /% .o : $(SRC_DIR ) /% .f
22- @mkdir -p $(@D )
23- @$(CC ) $(CFLAGS ) -c $< -o $@
24- @echo " Compiled " $< " successfully"
25-
26- .PHONY : clean
27- clean :
28- @$(rm ) $(OBJ_DIR )
29- @echo " Cleanup complete"
30-
31- .PHONY : remove
32- remove : clean
33- @$(rm ) $(BIN_DIR )
34- @echo " Executable removed"
File renamed without changes.
File renamed without changes.
File renamed without changes.
You can’t perform that action at this time.
0 commit comments