From 424f23f27622076390309857723ca056cdce4916 Mon Sep 17 00:00:00 2001 From: Aleksey Veresov Date: Sat, 21 Mar 2020 00:23:24 +0300 Subject: [magi] --- Makefile | 8 +++++--- 1 file 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 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # -- cgit v1.2.3