Skip to content

Commit

Permalink
Improve variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
minhqdao committed Feb 27, 2024
1 parent 0a16725 commit 106afb0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ OBJ-DIR = $(BUILD-DIR)/obj
TEST-DIR = $(BUILD-DIR)/test

ifeq ($(FC),nvfortran)
MOD-OUT-OPTION = -module $(MOD-DIR)
MOD-OUTPUT = -module $(MOD-DIR)
else
MOD-OUT-OPTION = -J$(MOD-DIR)
MOD-OUTPUT = -J$(MOD-DIR)
endif

ifeq ($(FC),nvfortran)
MOD-IN-OPTION = -module $(MOD-DIR)
MOD-INPUT = -module $(MOD-DIR)
else
MOD-IN-OPTION = -I$(MOD-DIR)
MOD-INPUT = -I$(MOD-DIR)
endif

.PHONY: all test clean
Expand All @@ -32,12 +32,12 @@ all: $(STATIC)

$(STATIC): $(SRC)
mkdir -p $(MOD-DIR) $(OBJ-DIR)
$(FC) $(FFLAGS) -c $(SRC) $(MOD-OUT-OPTION) -o $(OBJ-DIR)/$(FILENAME).o
$(FC) $(FFLAGS) -c $(SRC) $(MOD-OUTPUT) -o $(OBJ-DIR)/$(FILENAME).o
$(AR) $(ARFLAGS) $(STATIC) $(OBJ-DIR)/$(FILENAME).o

test: $(TEST-SRC) $(STATIC)
mkdir -p $(TEST-DIR)
$(FC) $(FFLAGS) $(TEST-SRC) $(MOD-IN-OPTION) -o $(TEST-DIR)/test.out $(STATIC)
$(FC) $(FFLAGS) $(TEST-SRC) $(MOD-INPUT) -o $(TEST-DIR)/test.out $(STATIC)
$(TEST-DIR)/test.out

clean:
Expand Down

0 comments on commit 106afb0

Please sign in to comment.