1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-28 11:09:54 +00:00

Update Makefile for pkg-config issues and soname.

This commit is contained in:
Calvin Rose 2020-04-04 13:09:59 -05:00
parent f089b2001f
commit 1d0e862129

View File

@ -146,6 +146,8 @@ build/janet.c: build/janet_boot src/boot/boot.janet
##### Amalgamation ##### ##### Amalgamation #####
######################## ########################
SONAME=libjanet.so.1
build/shell.c: src/mainclient/shell.c build/shell.c: src/mainclient/shell.c
cp $< $@ cp $< $@
@ -165,7 +167,7 @@ $(JANET_TARGET): build/janet.o build/shell.o
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(CLIBS) $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(CLIBS)
$(JANET_LIBRARY): build/janet.o build/shell.o $(JANET_LIBRARY): build/janet.o build/shell.o
$(CC) $(LDFLAGS) $(CFLAGS) -shared -o $@ $^ $(CLIBS) $(CC) $(LDFLAGS) $(CFLAGS) -Wl,-soname,$(SONAME) -shared -o $@ $^ $(CLIBS)
$(JANET_STATIC_LIBRARY): build/janet.o build/shell.o $(JANET_STATIC_LIBRARY): build/janet.o build/shell.o
$(AR) rcs $@ $^ $(AR) rcs $@ $^
@ -228,8 +230,6 @@ build/doc.html: $(JANET_TARGET) tools/gendoc.janet
##### Installation ##### ##### Installation #####
######################## ########################
SONAME=libjanet.so.1
.INTERMEDIATE: build/janet.pc .INTERMEDIATE: build/janet.pc
build/janet.pc: $(JANET_TARGET) build/janet.pc: $(JANET_TARGET)
echo 'prefix=$(PREFIX)' > $@ echo 'prefix=$(PREFIX)' > $@
@ -242,7 +242,7 @@ build/janet.pc: $(JANET_TARGET)
echo "Description: Library for the Janet programming language." >> $@ echo "Description: Library for the Janet programming language." >> $@
$(JANET_TARGET) -e '(print "Version: " janet/version)' >> $@ $(JANET_TARGET) -e '(print "Version: " janet/version)' >> $@
echo 'Cflags: -I$${includedir}' >> $@ echo 'Cflags: -I$${includedir}' >> $@
echo 'Libs: -L$${libdir} -ljanet $(LDFLAGS)' >> $@ echo 'Libs: -L$${libdir} -ljanet' >> $@
echo 'Libs.private: $(CLIBS)' >> $@ echo 'Libs.private: $(CLIBS)' >> $@
install: $(JANET_TARGET) build/janet.pc install: $(JANET_TARGET) build/janet.pc