aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile8
-rw-r--r--src/tomo.c5
2 files changed, 7 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 0a83241a..53d14e97 100644
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,12 @@
PREFIX=$(HOME)/.local
VERSION=0.0.1
CC=cc
-CCONFIG=-std=c2x -Werror -D_XOPEN_SOURCE=700 -D_POSIX_C_SOURCE=200809L -fPIC -I. \
+CCONFIG=-std=c2x -Werror -D_XOPEN_SOURCE=700 -D_POSIX_C_SOURCE=200809L -fPIC -I/usr/local/include \
-fno-signed-zeros -fno-finite-math-only -fno-signaling-nans -fno-trapping-math \
-fsanitize=signed-integer-overflow -fno-sanitize-recover -fvisibility=hidden -fdollars-in-identifiers \
-DGC_THREADS
LTO=-flto=auto -fno-fat-lto-objects -Wl,-flto
-LDFLAGS=
+LDFLAGS=-L/usr/local/lib
# MAKEFLAGS := --jobs=$(shell nproc) --output-sync=target
CWARN=-Wall -Wextra -Wno-format -Wshadow \
-Wno-pedantic \
@@ -43,8 +43,8 @@ build/tomo: $(STDLIB_OBJS) $(COMPILER_OBJS)
build/libtomo.so: $(STDLIB_OBJS)
@mkdir -p build
- @echo $(CC) $^ $(CFLAGS_PLACEHOLDER) $(OSFLAGS) -lgc -lcord -lm -lunistring -lgmp -Wl,-soname,libtomo.so -shared -o $@
- @$(CC) $^ $(CFLAGS) $(OSFLAGS) -lgc -lcord -lm -lunistring -lgmp -Wl,-soname,libtomo.so -shared -o $@
+ @echo $(CC) $^ $(CFLAGS_PLACEHOLDER) $(OSFLAGS) $(LDLIBS) -Wl,-soname,libtomo.so -shared -o $@
+ @$(CC) $^ $(CFLAGS) $(OSFLAGS) $(LDLIBS) -Wl,-soname,libtomo.so -shared -o $@
tags:
ctags src/*.[ch] src/stdlib/*.[ch]
diff --git a/src/tomo.c b/src/tomo.c
index b3f2db77..8cb0f18f 100644
--- a/src/tomo.c
+++ b/src/tomo.c
@@ -64,9 +64,10 @@ static OptionalText_t
" -fno-signed-zeros -fno-finite-math-only -fno-signaling-nans -fno-trapping-math"
" -D_XOPEN_SOURCE=700 -D_POSIX_C_SOURCE=200809L -D_DEFAULT_SOURCE -fPIC -ggdb"
" -DGC_THREADS"
- " -I$HOME/.local/include -I$HOME/.local/share/tomo/installed"),
+ " -I$HOME/.local/include -I$HOME/.local/share/tomo/installed -I/usr/local/include"),
ldlibs = Text("-lgc -lgmp -lm -ltomo"),
- ldflags = Text("-Wl,-rpath='$ORIGIN',-rpath=$HOME/.local/share/tomo/lib,-rpath=$HOME/.local/lib -L$HOME/.local/lib -L$HOME/.local/share/tomo/lib"),
+ ldflags = Text("-Wl,-rpath='$ORIGIN',-rpath=$HOME/.local/share/tomo/lib,-rpath=$HOME/.local/lib,-rpath=/usr/local/lib "
+ "-L$HOME/.local/lib -L$HOME/.local/share/tomo/lib -L/usr/local/lib"),
optimization = Text("2"),
cc = Text("cc");