edit env.sh
This commit is contained in:
6
Makefile
6
Makefile
@@ -55,7 +55,7 @@ LIBS := -l$(LIB) -lreadline -lncurses
|
||||
|
||||
##################################### pre-processor flags
|
||||
CPPFLAGS := -I$(INCDIR)
|
||||
CPPFLAGS += -DDEBUG # global
|
||||
#CPPFLAGS += -DDEBUG # global
|
||||
CPPFLAGS += -DDEBUG_DEBUG # enable log() functions
|
||||
#CPPFLAGS += -DDEBUG_DEBUG_C # enable verbose log() settings
|
||||
CPPFLAGS += -DDEBUG_POOL # memory pools management
|
||||
@@ -70,7 +70,7 @@ CPPFLAGS := $(strip $(CPPFLAGS))
|
||||
|
||||
##################################### compiler flags
|
||||
CFLAGS := -std=gnu11
|
||||
#CFLAGS += -O2
|
||||
#CFLAGS += -O2
|
||||
CFLAGS += -g
|
||||
CFLAGS += -Wall
|
||||
CFLAGS += -Wextra
|
||||
@@ -89,7 +89,7 @@ LDFLAGS := -L$(LIBDIR)
|
||||
DEPFLAGS = -MMD -MP -MF $(DEPDIR)/$*.d
|
||||
|
||||
##################################### General targets
|
||||
.PHONY: all clean cleanall
|
||||
.PHONY: all compile clean cleanall
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
|
26
scripts/env.sh
Executable file
26
scripts/env.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# env.sh - set environment for brchess developer.
|
||||
#
|
||||
# Copyright (C) 2023 Bruno Raoult ("br")
|
||||
# Licensed under the GNU General Public License v3.0 or later.
|
||||
# Some rights reserved. See COPYING.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with this
|
||||
# program. If not, see <https://www.gnu.org/licenses/gpl-3.0-standalone.html>.
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later <https://spdx.org/licenses/GPL-3.0-or-later.html>
|
||||
#
|
||||
# USAGE: source env.sh [arg]
|
||||
#
|
||||
# This file will actually be sourced if it was never sourced in current bash
|
||||
# environment.
|
||||
|
||||
if [[ ! -v _BRCHESS_ENV_ ]]; then
|
||||
export _BRCHESS_ENV_=1 BRCHESS_ROOT BRLIB_DIR LD_LIBRARY_PATH
|
||||
BRCHESS_ROOT=$(realpath -L "$(dirname "${BASH_SOURCE[0]}")/..")
|
||||
BRLIB_DIR="$BRCHESS_ROOT/brlib/lib"
|
||||
LD_LIBRARY_PATH=/mypath${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
|
||||
#printf "R=%s L=%s LD=%s\n" "$BRCHESS_ROOT" "$BRLIB_DIR" "$LD_LIBRARY_PATH"
|
||||
printf "Chess environment complete.\n"
|
||||
fi
|
Reference in New Issue
Block a user