asterisk/third-party/Makefile
George Joseph 393d8cb947 Add libjwt to third-party
The current STIR/SHAKEN implementation is not currently usable due
to encryption issues. Rather than trying to futz with OpenSSL and
the the current code, we can take advantage of the existing
capabilities of libjwt but we first need to add it to the
third-party infrastructure already in place for jansson and
pjproject.

A few tweaks were also made to the third-party infrastructure as
a whole.  The jansson "dest" install directory was renamed "dist"
to better match convention, and the third-party Makefile was updated
to clean all product directories not just the ones currently in
use.

Resolves: #349
(cherry picked from commit a9d4175e1d)
2024-01-12 18:29:18 +00:00

49 lines
1.2 KiB
Makefile

-include ../makeopts
include Makefile.rules
TP_ALL_SUBDIRS := jansson pjproject libjwt
TP_SUBDIRS :=
# Sub directories that contain special install/uninstall targets must be explicitly listed
# to prevent accidentally running the package's default install target.
TP_INSTALL_SUBDIRS :=
ifeq ($(PJPROJECT_BUNDLED),yes)
TP_SUBDIRS += pjproject
TP_INSTALL_SUBDIRS += pjproject
endif
ifeq ($(JANSSON_BUNDLED),yes)
TP_SUBDIRS += jansson
TP_INSTALL_SUBDIRS += jansson
endif
ifeq ($(LIBJWT_BUNDLED),yes)
TP_SUBDIRS += libjwt
TP_INSTALL_SUBDIRS += libjwt
libjwt: jansson
export JANSSON_CFLAGS=$(JANSSON_INCLUDE)
export JANSSON_LIBS=$(JANSSON_LIB)
endif
override MAKECMDGOALS?=all
MAKECMDGOALS:=$(subst dist-clean,distclean,$(MAKECMDGOALS))
.PHONY: all dist-clean distclean install clean moduleinfo makeopts uninstall $(TP_ALL_SUBDIRS)
ifeq ($(findstring clean,$(MAKECMDGOALS)),clean)
distclean dist-clean clean : $(TP_ALL_SUBDIRS)
TP_RUN_SUBDIRS := $(TP_ALL_SUBDIRS)
else
all install uninstall : $(TP_SUBDIRS)
install uninstall: $(TP_INSTALL_SUBDIRS)
TP_RUN_SUBDIRS := $(TP_SUBDIRS)
endif
ifneq ($(TP_RUN_SUBDIRS),)
$(TP_RUN_SUBDIRS):
+$(CMD_PREFIX) $(SUBMAKE) -C $@ $(MAKECMDGOALS)
endif