Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1292,13 +1292,18 @@ install: $(LIB_NAME) $(PC_FILE)
install -m 755 tools/cli/cwist $(DESTDIR)$(BINDIR)/cwist
@echo "Installation complete. Compile with: pkg-config --cflags --libs cwist"

# libusrsctp.a is installed with the other external archives when
# CWIST_WEBRTC=1; list it in Libs so programs using the WebRTC API link.
PC_WEBRTC_LIBS = $(if $(filter 1,$(CWIST_WEBRTC)),-lusrsctp,)

$(PC_FILE): cwist.pc.in
sed -e 's|@PREFIX@|$(PREFIX)|g' -e 's|@VERSION@|$(VERSION)|g' cwist.pc.in > $@
sed -e 's|@PREFIX@|$(PREFIX)|g' -e 's|@VERSION@|$(VERSION)|g' \
-e 's|@WEBRTC_LIBS@ |$(if $(PC_WEBRTC_LIBS),$(PC_WEBRTC_LIBS) ,)|g' cwist.pc.in > $@

uninstall:
@echo "Uninstalling cwist..."
rm -f $(DESTDIR)$(LIBDIR)/$(LIB_NAME)
rm -f $(DESTDIR)$(DEPSDIR)/liburiparser.a $(DESTDIR)$(DEPSDIR)/libcjson.a $(DESTDIR)$(DEPSDIR)/libttak.a $(DESTDIR)$(DEPSDIR)/libnats_static.a $(DESTDIR)$(DEPSDIR)/liblsquic.a $(DESTDIR)$(DEPSDIR)/libssl.a $(DESTDIR)$(DEPSDIR)/libcrypto.a
rm -f $(DESTDIR)$(DEPSDIR)/liburiparser.a $(DESTDIR)$(DEPSDIR)/libcjson.a $(DESTDIR)$(DEPSDIR)/libttak.a $(DESTDIR)$(DEPSDIR)/libnats_static.a $(DESTDIR)$(DEPSDIR)/liblsquic.a $(DESTDIR)$(DEPSDIR)/libssl.a $(DESTDIR)$(DEPSDIR)/libcrypto.a $(DESTDIR)$(DEPSDIR)/libusrsctp.a
rmdir $(DESTDIR)$(DEPSDIR) 2>/dev/null || true
rm -rf $(DESTDIR)$(INCLUDEDIR)/cwist
rm -f $(INSTALL_PCDIR)/$(PC_FILE)
Expand Down
2 changes: 1 addition & 1 deletion cwist.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ Name: cwist
Description: C17 web framework and application server (HTTP/1.1, HTTP/2, HTTP/3, WebSocket, PQC TLS)
URL: https://github.com/c4punks/CWIST
Version: @VERSION@
Libs: -L${libdir} -L${depsdir} -lcwist -lnats_static -lttak -lcjson -luriparser -llsquic -lssl -lcrypto -lz -lzstd -lbrotlienc -lbrotlicommon -lbrotlidec -ldl -lpthread -lm -lstdc++
Libs: -L${libdir} -L${depsdir} -lcwist @WEBRTC_LIBS@ -lnats_static -lttak -lcjson -luriparser -llsquic -lssl -lcrypto -lz -lzstd -lbrotlienc -lbrotlicommon -lbrotlidec -ldl -lpthread -lm -lstdc++
Libs.private: -lcurl -lnghttp2
Cflags: -I${includedir} -I${includedir}/cwist/vendor
Loading