| 1 |
## Process this file with automake to produce Makefile.in |
| 2 |
# by Michal Trojnara 1998-2026 |
| 3 |
|
| 4 |
############################################################################### |
| 5 |
# File lists # |
| 6 |
############################################################################### |
| 7 |
|
| 8 |
common_headers = common.h prototypes.h version.h |
| 9 |
common_sources = tls.c str.c file.c client.c log.c options.c protocol.c |
| 10 |
common_sources += network.c resolver.c ssl.c ctx.c verify.c sthreads.c |
| 11 |
common_sources += ocsp.c fd.c dhparam.c cron.c stunnel.c |
| 12 |
unix_sources = pty.c libwrap.c ui_unix.c |
| 13 |
shared_sources = env.c |
| 14 |
win32_gui_sources = ui_win_gui.c resources.h resources.rc |
| 15 |
win32_gui_sources += stunnel.ico active.ico error.ico idle.ico |
| 16 |
win32_cli_sources = ui_win_cli.c |
| 17 |
|
| 18 |
############################################################################### |
| 19 |
# Unix executables and shared library # |
| 20 |
############################################################################### |
| 21 |
|
| 22 |
bin_PROGRAMS = stunnel |
| 23 |
stunnel_SOURCES = $(common_headers) $(common_sources) $(unix_sources) |
| 24 |
bin_SCRIPTS = stunnel3 |
| 25 |
|
| 26 |
EXTRA_DIST = stunnel3.in |
| 27 |
CLEANFILES = stunnel3 |
| 28 |
|
| 29 |
# Red Hat "by design" bug #82369 |
| 30 |
stunnel_CPPFLAGS = -I$(SYSROOT)/usr/kerberos/include |
| 31 |
|
| 32 |
# Additional preprocessor definitions |
| 33 |
stunnel_CPPFLAGS += -I$(SSLDIR)/include |
| 34 |
stunnel_CPPFLAGS += -DLIBDIR='"$(pkglibdir)"' |
| 35 |
stunnel_CPPFLAGS += -DCONFDIR='"$(sysconfdir)/stunnel"' |
| 36 |
|
| 37 |
# TLS library |
| 38 |
stunnel_LDFLAGS = -L$(SSLDIR)/lib64 -L$(SSLDIR)/lib -lssl -lcrypto |
| 39 |
|
| 40 |
# Apply substitutions |
| 41 |
edit = sed \ |
| 42 |
-e 's|@bindir[@]|$(bindir)|g' \ |
| 43 |
-e 's|@PACKAGE_VERSION[@]|$(PACKAGE_VERSION)|g' |
| 44 |
stunnel3 os2.mak: Makefile |
| 45 |
$(edit) '$(srcdir)/[email protected]' >$@ |
| 46 |
stunnel3: $(srcdir)/stunnel3.in |
| 47 |
os2.mak: $(srcdir)/os2.mak.in |
| 48 |
|
| 49 |
# Unix shared library |
| 50 |
pkglib_LTLIBRARIES = libstunnel.la |
| 51 |
libstunnel_la_SOURCES = $(shared_sources) |
| 52 |
libstunnel_la_LDFLAGS = -avoid-version |
| 53 |
|
| 54 |
############################################################################### |
| 55 |
# Win32 executables # |
| 56 |
############################################################################### |
| 57 |
|
| 58 |
mingw: |
| 59 |
$(MAKE) -f $(srcdir)/mingw.mk srcdir=$(srcdir) win32_arch=win32 win32_targetcpu=i686 win32_mingw=mingw |
| 60 |
|
| 61 |
mingw64: |
| 62 |
$(MAKE) -f $(srcdir)/mingw.mk srcdir=$(srcdir) win32_arch=win64 win32_targetcpu=x86_64 win32_mingw=mingw64 |
| 63 |
|
| 64 |
.PHONY: mingw mingw64 |
| 65 |
|
| 66 |
clean-local: |
| 67 |
rm -rf ../obj ../bin |
| 68 |
|
| 69 |
############################################################################### |
| 70 |
# Remaining files to be included # |
| 71 |
############################################################################### |
| 72 |
|
| 73 |
dist_noinst_DATA = os2.mak |
| 74 |
EXTRA_DIST += os2.mak.in |
| 75 |
CLEANFILES += os2.mak |
| 76 |
|
| 77 |
EXTRA_DIST += $(win32_gui_sources) $(win32_cli_sources) |
| 78 |
EXTRA_DIST += make.bat makece.bat makew32.bat |
| 79 |
EXTRA_DIST += mingw.mk mingw.mak evc.mak vc.mak |