aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-04-03 03:04:42 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-04-03 03:04:42 -0400
commit5fc433e7146f3aebaf9d3dc1f61d0ccfb5df55bb (patch)
treec953303661104777090caef62780ddf6853f74c1
parentc3a47751a529c1047a55fb1898e6b0c292f809e7 (diff)
Dynamically link against .so file instead of statically linking against
object files
-rw-r--r--Makefile6
1 files changed, 3 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 2262b3e7..15b9d52e 100644
--- a/Makefile
+++ b/Makefile
@@ -23,16 +23,16 @@ EXTRA=
G=-ggdb
O=-Og
CFLAGS=$(CCONFIG) $(EXTRA) $(CWARN) $(G) $(O) $(OSFLAGS)
-LDLIBS=-lgc -lcord -lm -lunistring -ldl
+LDLIBS=-lgc -lcord -lm -lunistring -ldl -L. -ltomo
BUILTIN_OBJS=builtins/array.o builtins/bool.o builtins/color.o builtins/nums.o builtins/functions.o builtins/integers.o \
builtins/pointer.o builtins/memory.o builtins/text.o builtins/table.o builtins/types.o builtins/util.o builtins/files.o
all: libtomo.so tomo
-tomo: tomo.c SipHash/halfsiphash.o ast.o parse.o environment.o types.o typecheck.o structs.o enums.o compile.o repl.o $(BUILTIN_OBJS)
+tomo: tomo.c SipHash/halfsiphash.o ast.o parse.o environment.o types.o typecheck.o structs.o enums.o compile.o repl.o
libtomo.so: $(BUILTIN_OBJS) SipHash/halfsiphash.o
- $(CC) $^ $(CFLAGS) $(EXTRA) $(CWARN) $(G) $(O) $(OSFLAGS) $(LDLIBS) -Wl,-soname,libtomo.so -shared -o $@
+ $(CC) $^ $(CFLAGS) $(EXTRA) $(CWARN) $(G) $(O) $(OSFLAGS) -lgc -lcord -lm -lunistring -ldl -Wl,-soname,libtomo.so -shared -o $@
SipHash/halfsiphash.c:
git submodule update --init --recursive