File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -29,3 +29,6 @@ unicode_gen
29
29
run_octane
30
30
run_sunspider_like
31
31
libwinpthread * .dll
32
+
33
+ libquickjs.so.2025.04.26
34
+ tags
Original file line number Diff line number Diff line change 35
35
# CONFIG_WIN32=y
36
36
# use link time optimization (smaller and faster executables but slower build)
37
37
# CONFIG_LTO=y
38
+ # also build libquickjs as a shared library
39
+ # CONFIG_SHARED=y
38
40
# consider warnings as errors (for development)
39
41
# CONFIG_WERROR=y
40
42
# force 32 bit build on x86_64
@@ -216,6 +218,10 @@ PROGS+=libquickjs.a
216
218
ifdef CONFIG_LTO
217
219
PROGS+ =libquickjs.lto.a
218
220
endif
221
+ ifdef CONFIG_SHARED
222
+ SO_VERSION =$(shell sed 's/-/./g' VERSION)
223
+ PROGS+ =libquickjs.so.$(SO_VERSION )
224
+ endif
219
225
220
226
# examples
221
227
ifeq ($(CROSS_PREFIX ) ,)
@@ -307,6 +313,11 @@ endif # CONFIG_LTO
307
313
libquickjs.fuzz.a : $(patsubst % .o, % .fuzz.o, $(QJS_LIB_OBJS ) )
308
314
$(AR ) rcs $@ $^
309
315
316
+ ifdef CONFIG_SHARED
317
+ libquickjs.so.$(SO_VERSION ) : $(patsubst % .o, % .pic.o, $(QJS_LIB_OBJS ) )
318
+ $(CC ) -shared -Wl,-soname,$@ $(LDFLAGS ) -o $@ $^
319
+ endif # CONFIG_SHARED
320
+
310
321
repl.c : $(QJSC ) repl.js
311
322
$(QJSC ) -s -c -o $@ -m repl.js
312
323
@@ -372,6 +383,10 @@ install: all
372
383
install -m644 libquickjs.a " $( DESTDIR) $( PREFIX) /lib/quickjs"
373
384
ifdef CONFIG_LTO
374
385
install -m644 libquickjs.lto.a "$(DESTDIR)$(PREFIX)/lib/quickjs"
386
+ endif
387
+ ifdef CONFIG_SHARED
388
+ install -Dm755 libquickjs.so.$(SO_VERSION) "$(DESTDIR)$(PREFIX)/lib"
389
+ ln -s libquickjs.so.$(SO_VERSION) "$(DESTDIR)$(PREFIX)/lib/libquickjs.so"
375
390
endif
376
391
mkdir -p "$(DESTDIR)$(PREFIX)/include/quickjs"
377
392
install -m644 quickjs.h quickjs-libc.h "$(DESTDIR)$(PREFIX)/include/quickjs"
You can’t perform that action at this time.
0 commit comments