summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorFelix Perktold <Felix.Perktold@student.uibk.ac.at>2026-01-18 17:44:10 +0100
committerFelix Perktold <Felix.Perktold@student.uibk.ac.at>2026-01-18 17:44:10 +0100
commit07cd615c7e1cafccd6d46b3eb68d413f2a2dd9a5 (patch)
tree540292fc4029265628ea7e4d2d750c21c267a85b /Makefile
parenta2ab90cfb9e364a3de7157b2ea2905e4c944583d (diff)
start writing psql module, start writing exercise 1 with that module, small header file changes as needed for module programming
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 4 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index d574b4e..ad69623 100644
--- a/Makefile
+++ b/Makefile
@@ -5,8 +5,9 @@ CFLAGS = -DYYDEBUG=1 -fPIC
LIBS = -lreadline -lfl -lm
OBJS = lisp.o lisp.tab.o lex.yy.o
-MODULE_SRC = $(wildcard modules/*.c)
-MODULE_SO = $(MODULE_SRC:.c=.so)
+MODULE_LIBS = -lpq
+MODULE_SRC = $(wildcard modules/*.c)
+MODULE_SO = $(MODULE_SRC:.c=.so)
.SUFFIXES:
main: main.c $(OBJS)
@@ -48,7 +49,7 @@ modules: $(MODULE_SO)
modules/%.so: modules/%.c lisp.o
gcc -fPIC -c $< -o $*.o
- gcc -fPIC -shared $*.o lisp.o -o $@
+ gcc -fPIC -shared $*.o lisp.o -o $@ $(MODULE_LIBS)
rm $*.o
.PHONY: clean test run