libressl-portable/apps/nc/Makefile.am
Brent Cook fe42a8011b Configure libtls and nc(1) to statically link to libcrypto/ssl
An issue that Reyk Floeter noted while building a Debian package for
LibreSSL is that installing libtls along with OpenSSL causes linker
issues since it will often pick up the wrong libcrypto/libssl. This
change makes libtls statically link the object files it needs rather
than relying on the shared libraries, effectively making libtls
self-contained and able to be packaged independently.

This should make it possible for other projects that also use libtls to
be able to package support without requiring the target OS to ship
libcrypto / libssl from LibreSSL.

678278df55
2020-10-04 03:50:18 -05:00

47 lines
793 B
Makefile

include $(top_srcdir)/Makefile.am.common
if BUILD_NC
if ENABLE_NC
bin_PROGRAMS = nc
dist_man_MANS = nc.1
else
noinst_PROGRAMS = nc
endif
EXTRA_DIST = nc.1
EXTRA_DIST += CMakeLists.txt
nc_LDFLAGS = $(abs_top_builddir)/crypto/.libs/libcompat.a
nc_LDADD = $(abs_top_builddir)/tls/libtls.la
nc_LDADD += $(PLATFORM_LDADD) $(PROG_LDADD)
AM_CPPFLAGS += -I$(top_srcdir)/apps/nc/compat
nc_SOURCES = atomicio.c
nc_SOURCES += netcat.c
nc_SOURCES += socks.c
noinst_HEADERS = atomicio.h
noinst_HEADERS += compat/sys/socket.h
nc_SOURCES += compat/socket.c
if !HAVE_B64_NTOP
nc_SOURCES += compat/base64.c
endif
if !HAVE_ACCEPT4
nc_SOURCES += compat/accept4.c
endif
if !HAVE_READPASSPHRASE
nc_SOURCES += compat/readpassphrase.c
endif
if !HAVE_STRTONUM
nc_SOURCES += compat/strtonum.c
endif
endif