2019-03-26 16:39:57 +00:00
|
|
|
SHELL := bash # the shell used internally by "make"
|
|
|
|
|
2019-04-19 18:17:50 +00:00
|
|
|
CC := gcc
|
|
|
|
LD := $(CC)
|
|
|
|
|
2019-03-26 16:39:57 +00:00
|
|
|
#- extra parameters for the Nim compiler
|
|
|
|
#- NIMFLAGS should come from the environment or make's command line
|
|
|
|
NIM_PARAMS := $(NIMFLAGS)
|
2019-03-29 17:08:39 +00:00
|
|
|
|
2019-03-26 16:39:57 +00:00
|
|
|
# verbosity level
|
2019-03-29 17:08:39 +00:00
|
|
|
V := 0
|
2019-03-26 16:39:57 +00:00
|
|
|
NIM_PARAMS := $(NIM_PARAMS) --verbosity:$(V)
|
|
|
|
HANDLE_OUTPUT :=
|
2019-03-29 17:08:39 +00:00
|
|
|
SILENT_TARGET_PREFIX := disabled
|
2019-03-26 16:39:57 +00:00
|
|
|
ifeq ($(V), 0)
|
|
|
|
NIM_PARAMS := $(NIM_PARAMS) --hints:off --warnings:off
|
|
|
|
HANDLE_OUTPUT := &>/dev/null
|
2019-03-29 17:08:39 +00:00
|
|
|
SILENT_TARGET_PREFIX :=
|
2019-03-26 16:39:57 +00:00
|
|
|
endif
|
2019-03-29 17:08:39 +00:00
|
|
|
|
2019-03-26 16:39:57 +00:00
|
|
|
# Chronicles log level
|
|
|
|
LOG_LEVEL :=
|
|
|
|
ifdef LOG_LEVEL
|
|
|
|
NIM_PARAMS := $(NIM_PARAMS) -d:chronicles_log_level=$(LOG_LEVEL)
|
|
|
|
endif
|
|
|
|
|
2019-08-03 13:38:22 +00:00
|
|
|
# avoid a "libpcre.so.3: cannot open shared object file: No such file or directory" message, where possible
|
|
|
|
ifneq ($(OS), Windows_NT)
|
|
|
|
NIM_PARAMS := $(NIM_PARAMS) -d:usePcreHeader --passL:\"-lpcre\"
|
|
|
|
endif
|
|
|
|
|
2019-03-26 16:39:57 +00:00
|
|
|
# guess who does parsing before variable expansion
|
|
|
|
COMMA := ,
|
|
|
|
EMPTY :=
|
|
|
|
SPACE := $(EMPTY) $(EMPTY)
|
|
|
|
|
2019-03-29 17:08:39 +00:00
|
|
|
# coloured messages
|
|
|
|
BUILD_MSG := "\\e[92mBuilding:\\e[39m"
|
|
|
|
|