about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-12-09 23:40:31 +0100
committerbptato <nincsnevem662@gmail.com>2023-12-09 23:41:58 +0100
commitaacde45376669ecc398ec9680b79424f0898c0ee (patch)
tree6368706e6f5e4371abb4ebb14ca4b8701133c3fa
parent7c322c59499b7aee1decb0f6b3127003e105ea5f (diff)
downloadchawan-aacde45376669ecc398ec9680b79424f0898c0ee.tar.gz
Makefile: properly list QJS object file dependencies
-rw-r--r--Makefile13
1 files changed, 13 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 645a30ae..e2da6d32 100644
--- a/Makefile
+++ b/Makefile
@@ -26,6 +26,19 @@ $(OUTDIR)/$(TARGET)/bin/cha: lib/libquickjs.a src/*.nim src/**/*.nim res/* res/*
 
 CFLAGS = -g -Wall -O2 -DCONFIG_VERSION=\"$(shell cat lib/quickjs/VERSION)\"
 QJSOBJ = $(OBJDIR)/quickjs
+
+# Dependencies
+$(QJSOBJ)/cutils.o: lib/quickjs/cutils.h
+$(QJSOBJ)/libbf.o: lib/quickjs/cutils.h lib/quickjs/libbf.h
+$(QJSOBJ)/libregexp.o: lib/quickjs/cutils.h lib/quickjs/libregexp.h \
+	lib/quickjs/libunicode.h lib/quickjs/libregexp-opcode.h
+$(QJSOBJ)/libunicode.o: lib/quickjs/cutils.h lib/quickjs/libunicode.h \
+	lib/quickjs/libunicode-table.h
+$(QJSOBJ)/quickjs.o: lib/quickjs/cutils.h lib/quickjs/list.h \
+	lib/quickjs/quickjs.h lib/quickjs/libregexp.h \
+	lib/quickjs/libunicode.h lib/quickjs/libbf.h \
+	lib/quickjs/quickjs-atom.h lib/quickjs/quickjs-opcode.h
+
 $(QJSOBJ)/%.o: lib/quickjs/%.c
 	@mkdir -p "$(QJSOBJ)"
 	$(CC) $(CFLAGS) -c -o $@ $<