Files
lotherk 8169c04b38 mcde: a cross build makes no test programs; check-buildtools stopped on 28
build/logs/userland-2026-11-17f.log:22437: the 25 test programs of
libDtChat, dtchat-demo and McdeSys's test_audio/test_netwatch were
noinst_PROGRAMS, so the package build compiled them for NetBSD and
tools/check-buildtools.sh took them for build tools.  configure.ac has
MCDE_CROSS now; in a cross build they are check_PROGRAMS (dtchat-demo
EXTRA_PROGRAMS), in a native one noinst as before, so tools/mcde-tests.sh
still finds them in build/mcde-host.  autoreconf -fi of the tree: exit 0,
the Makefile.in lines are @MCDE_CROSS_TRUE@check_PROGRAMS /
@MCDE_CROSS_FALSE@noinst_PROGRAMS.
2026-11-17 16:55:45 +00:00

96 lines
3.5 KiB
Makefile

MAINTAINERCLEANFILES = Makefile.in
bin_PROGRAMS = dtchat dtchat-headless dtchat-irc dtchat-telegram
# the demo adapter dtchat finds next to itself in a build tree; not
# installed, so a cross build (the package) does not build it at all
if MCDE_CROSS
EXTRA_PROGRAMS = dtchat-demo
else
noinst_PROGRAMS = dtchat-demo
endif
# the manual pages of MCDE are documentation (PLIST: ${PLIST.docs}); a
# --disable-docs build installed this one alone, and pkgsrc's PLIST check
# stopped wm/mcde (build/logs/userland-2026-11-17e.log:22217)
EXTRA_DIST = dtchat.1
if BUILD_DOCS
man_MANS = dtchat.1
endif
dtchat_CPPFLAGS = -I$(top_srcdir)/include \
-I$(top_srcdir)/lib/libDtChat -I$(top_builddir)/lib/libDtChat \
-DCDE_INSTALLATION_TOP=\"$(CDE_INSTALLATION_TOP)\"
# The model and the JSON schema helpers live in libDtChat/libDtChatIpc;
# DtInitialize/DTCLIENTLIBS come with T2.7.
dtchat_LDADD = $(top_builddir)/lib/libDtChat/libDtChat.la \
$(top_builddir)/lib/libDtChat/libDtChatIpc.la \
$(top_builddir)/lib/McdeSys/libMcdeSys.la $(XTOOLLIB)
dtchat_SOURCES = main.c ui_main.c ui_accounts.c ui_request.c ui_peer.c \
ui_file.c localui.c ui_call.c demo.c accounts_run.c ui_main.h \
ui_accounts.h ui_request.h ui_peer.h ui_file.h localui.h ui_call.h \
demo.h accounts_run.h
dtchat_demo_SOURCES = demo_adapter.c
dtchat_demo_CPPFLAGS = -I$(top_srcdir)/include \
-I$(top_srcdir)/lib/libDtChat -I$(top_builddir)/lib/libDtChat
dtchat_demo_LDADD = $(top_builddir)/lib/libDtChat/libDtChatIpc.la
dtchat_irc_SOURCES = irc_adapter.c
dtchat_irc_CPPFLAGS = -I$(top_srcdir)/include \
-I$(top_srcdir)/lib/libDtChat -I$(top_builddir)/lib/libDtChat \
$(TLS_CPPFLAGS)
dtchat_irc_LDADD = $(top_builddir)/lib/libDtChat/libDtChat.la \
$(top_builddir)/lib/libDtChat/libDtChatIpc.la $(LIBTLS)
dtchat_headless_SOURCES = headless.c
dtchat_headless_CPPFLAGS = -I$(top_srcdir)/include \
-I$(top_srcdir)/lib/libDtChat -I$(top_builddir)/lib/libDtChat
dtchat_headless_LDADD = $(top_builddir)/lib/libDtChat/libDtChat.la \
$(top_builddir)/lib/libDtChat/libDtChatIpc.la $(LIBTLS) $(CRYPTOLIB)
dtchat_telegram_SOURCES = telegram_adapter.c
dtchat_telegram_CPPFLAGS = -I$(top_srcdir)/include \
-I$(top_srcdir)/lib/libDtChat -I$(top_builddir)/lib/libDtChat \
$(TDLIB_CPPFLAGS)
dtchat_telegram_LDADD = $(top_builddir)/lib/libDtChat/libDtChat.la \
$(top_builddir)/lib/libDtChat/libDtChatIpc.la $(TDLIBLIB) \
$(CRYPTOLIB)
if MCDE_GO
# whatsmeow is a Go library, so the WhatsApp adapter is a Go program built
# next to the others (no automake program: the sources are Go, not C).
all-local: dtchat-whatsapp
dtchat-whatsapp: $(srcdir)/whatsapp_adapter/main.go \
$(srcdir)/whatsapp_adapter/go.mod $(srcdir)/whatsapp_adapter/go.sum
cd $(srcdir)/whatsapp_adapter && \
GOFLAGS=-mod=mod GOSUMDB=off GOPROXY=off $(GO) build -o "$(abs_builddir)/dtchat-whatsapp" .
clean-local:
rm -f dtchat-whatsapp
install-exec-hook: dtchat-whatsapp
$(MKDIR_P) "$(DESTDIR)$(bindir)"
$(INSTALL_PROGRAM) dtchat-whatsapp \
"$(DESTDIR)$(bindir)/dtchat-whatsapp"
uninstall-hook:
rm -f "$(DESTDIR)$(bindir)/dtchat-whatsapp"
endif
if MCDE_STROPHE
bin_PROGRAMS += dtchat-xmpp
dtchat_xmpp_SOURCES = xmpp_adapter.c
dtchat_xmpp_CPPFLAGS = -I$(top_srcdir)/include \
-I$(top_srcdir)/lib/libDtChat -I$(top_builddir)/lib/libDtChat
dtchat_xmpp_LDADD = $(top_builddir)/lib/libDtChat/libDtChat.la \
$(top_builddir)/lib/libDtChat/libDtChatIpc.la $(STROPHELIB) \
$(CRYPTOLIB)
endif
appdefaultsdir = $(CDE_INSTALLATION_TOP)/app-defaults/C
dist_appdefaults_DATA = Dtchat
if SOLARIS
dtchat_LDADD += -lintl
endif