aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAleksey Veresov <aleksey@veresov.pro>2020-03-21 00:23:24 +0300
committerAleksey Veresov <aleksey@veresov.pro>2020-03-21 00:23:24 +0300
commit424f23f27622076390309857723ca056cdce4916 (patch)
tree379954ccded837ece9df208b3347df0a3ceb5c8f /Makefile
parent339ae11aae1d23edd5bed4ab9c6b1a72dd998a66 (diff)
downloadmagi-424f23f27622076390309857723ca056cdce4916.tar
magi-424f23f27622076390309857723ca056cdce4916.tar.xz
magi-424f23f27622076390309857723ca056cdce4916.zip
[magi]
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 5 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index d8abf44..1162053 100644
--- a/Makefile
+++ b/Makefile
@@ -12,11 +12,14 @@ CC ?= gcc
# Preparations
# Compile under the most strict conditions:
CFLAGS = -xc -ansi -pedantic -Wall -Wextra -MMD
-# Debug and optimisation are not compatible:
+# Specify linker to use the library:
+LFLAGS = -L$(BUILD) -lmagi
+# Debug and optimisation (as well as -static for valgrind) are not compatible:
ifeq '$(DEBUG)' 'yes'
CFLAGS += -g -O0
else
CFLAGS += -O3
+LFLAGS += -static
endif
# Directories definitions:
@@ -45,10 +48,9 @@ EXAMPLES = $(foreach x,$(EXASRC:.c=),$(BUILD)/$(x))
# Dependency files:
DEPS = $(OBJ:.o=.d) $(EXAMPLES:=.d)
-# Flags collections:
+# Adding special include paths to corresponding flags:
SRCFLAGS = $(CFLAGS) -I$(INCLUDE)/magi
EXAFLAGS = $(CFLAGS) -I$(INCLUDE)
-LFLAGS = -static -L$(BUILD) -lmagi
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #