39 lines
1.4 KiB
Diff
39 lines
1.4 KiB
Diff
--- Makefile.orig
|
|
+++ Makefile
|
|
@@ -30,7 +30,7 @@
|
|
JANET_BUILD?="\"$(shell git log --pretty=format:'%h' -n 1 || 'local')\""
|
|
CLIBS=-lm -lpthread
|
|
JANET_TARGET=build/janet
|
|
-JANET_LIBRARY=build/libjanet.so
|
|
+JANET_LIBRARY=build/libjanet.so.$(JANET_SONAME)
|
|
JANET_STATIC_LIBRARY=build/libjanet.a
|
|
JANET_PATH?=$(LIBDIR)/janet
|
|
MANPATH?=$(PREFIX)/share/man/man1/
|
|
--- Makefile.orig
|
|
+++ Makefile
|
|
@@ -161,11 +161,11 @@
|
|
build/shell.o: build/shell.c build/janet.h build/janetconf.h
|
|
$(CC) $(CFLAGS) -c $< -o $@ -I build
|
|
|
|
-$(JANET_TARGET): build/janet.o build/shell.o
|
|
- $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(CLIBS)
|
|
+$(JANET_TARGET): $(JANET_LIBRARY) build/shell.o
|
|
+ $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(CLIBS) $(JANET_LIBRARY)
|
|
|
|
$(JANET_LIBRARY): build/janet.o build/shell.o
|
|
- $(CC) $(LDFLAGS) $(CFLAGS) -shared -o $@ $^ $(CLIBS)
|
|
+ $(CC) $(LDFLAGS) $(CFLAGS) -shared -Wl,-soname=libjanet.so.$(JANET_SONAME) -o $@ $^ $(CLIBS)
|
|
|
|
$(JANET_STATIC_LIBRARY): build/janet.o build/shell.o
|
|
$(AR) rcs $@ $^
|
|
--- Makefile.orig
|
|
+++ Makefile
|
|
@@ -240,7 +240,7 @@
|
|
echo "Name: janet" >> $@
|
|
echo "Url: https://janet-lang.org" >> $@
|
|
echo "Description: Library for the Janet programming language." >> $@
|
|
- $(JANET_TARGET) -e '(print "Version: " janet/version)' >> $@
|
|
+ echo "Version: $(JANET_VERSION)" >> $@
|
|
echo 'Cflags: -I$${includedir}' >> $@
|
|
echo 'Libs: -L$${libdir} -ljanet $(LDFLAGS)' >> $@
|
|
echo 'Libs.private: $(CLIBS)' >> $@
|