Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Iker Martín Álvarez
Proteo
Commits
508ad3ba
Commit
508ad3ba
authored
Jun 04, 2024
by
iker_martin
Browse files
Modified rules of Makefile so it implies compilation as the default rule
parent
241e098e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Codes/Makefile
View file @
508ad3ba
...
...
@@ -13,9 +13,6 @@ ifeq ($(MAM_USE_SLURM),1)
endif
DEF
=
-DMAM_USE_SLURM
=
$(MAM_USE_SLURM)
-DMAM_USE_BARRIERS
=
$(MAM_USE_BARRIERS)
-DMAM_DEBUG
=
$(MAM_DEBUG)
.PHONY
:
clean clear install
# Final binary
BIN
=
a.out
CONFIG
=
config.txt
...
...
@@ -33,6 +30,20 @@ OBJ = $(C_FILES:%.c=$(BUILD_DIR)/%.o)
# Gcc will create these .d files containing dependencies.
DEP
=
$(OBJ:%.o=%.d)
# BASIC RULES
.PHONY
:
clean clear install
all
:
install
clean
:
-
rm
$(BUILD_DIR)
/
$(BIN)
$(BUILD_DIR)
/
$(CONFIG)
$(OBJ)
$(DEP)
clear
:
-
rm
-rf
$(BUILD_DIR)
install
:
$(BIN) $(CONFIG)
echo
"Done"
# SPECIFIC RULES
# Default configuration file
$(CONFIG)
:
$(BUILD_DIR)/$(CONFIG)
# Default target named after the binary.
...
...
@@ -60,14 +71,3 @@ $(BUILD_DIR)/$(BIN) : $(OBJ)
$(BUILD_DIR)/%.o
:
%.c
@
mkdir
-p
$
(
@D
)
$(MCC)
$(C_FLAGS)
$(DEF)
-MMD
-c
$<
-o
$@
clean
:
-
rm
$(BUILD_DIR)
/
$(BIN)
$(BUILD_DIR)
/
$(CONFIG)
$(OBJ)
$(DEP)
clear
:
-
rm
-rf
$(BUILD_DIR)
all
:
install
install
:
$(BIN) $(CONFIG)
echo
"Done"
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment