--- /dev/null
+SUBDIRS = common
+
+if BUILD_WIN
+SUBDIRS += win
+else
+SUBDIRS += unix
+endif
+
;;
esac
+BUILD_WIN=
case "$host_os" in
mingw*)
CPPFLAGS="$CPPFLAGS -DWINVER=0x0500 -D_WIN32_IE=0x0500"
CXXFLAGS="$CXXFLAGS -mthreads"
+ BUILD_WIN=yes
;;
esac
+AM_CONDITIONAL([BUILD_WIN], [test "x$BUILD_WIN" = xyes])
dnl FIXME: Check for MIT-SHM properly, add a corresponding --with option.
if test "$USE_MITSHM" = yes; then
-SUBDIRS = ../common tx x0vncserver vncviewer vncpasswd po @VNCCONFIG_DIR@
+SUBDIRS = ../common tx x0vncserver vncviewer vncpasswd @VNCCONFIG_DIR@
dist_bin_SCRIPTS = vncserver
man1_MANS = vncserver.man
-ACLOCAL_AMFLAGS = -I m4
-
EXTRA_DIST = vncserver.man
libtx_la_SOURCES = $(HDRS) TXWindow.cxx TXScrollbar.cxx TXViewport.cxx \
TXImage.cxx TXMenu.cxx
-libtx_la_CPPFLAGS = -I$(COMMON_DIR) @X_CFLAGS@ # X_CFLAGS are really CPPFLAGS
+libtx_la_CPPFLAGS = -I$(top_srcdir)/common -I$(top_srcdir)/common/rfb \
+ @X_CFLAGS@ # X_CFLAGS are really CPPFLAGS
vncconfig_SOURCES = $(HDRS) vncExt.c vncconfig.cxx QueryConnectDialog.cxx \
buildtime.c
-vncconfig_CPPFLAGS = -I$(COMMON_DIR) -I$(top_srcdir)/tx @X_CFLAGS@ # X_CFLAGS are really CPPFLAGS
+# X_CFLAGS are really CPPFLAGS
+vncconfig_CPPFLAGS = -I$(top_srcdir)/common -I$(top_srcdir)/unix/tx @X_CFLAGS@
-vncconfig_LDADD = $(top_srcdir)/tx/libtx.la $(COMMON_DIR)/rfb/librfb.la \
- $(COMMON_DIR)/network/libnetwork.la $(COMMON_DIR)/rdr/librdr.la \
- @X_PRE_LIBS@ @X_LIBS@ -lX11 -lXext @X_EXTRA_LIBS@
+vncconfig_LDADD = $(top_srcdir)/unix/tx/libtx.la \
+ $(top_srcdir)/common/rfb/librfb.la \
+ $(top_srcdir)/common/network/libnetwork.la \
+ $(top_srcdir)/common/rdr/librdr.la @X_PRE_LIBS@ @X_LIBS@ -lX11 -lXext \
+ @X_EXTRA_LIBS@
EXTRA_DIST = vncconfig.man
vncpasswd_SOURCES = vncpasswd.cxx
-vncpasswd_CPPFLAGS = -I$(COMMON_DIR)
+vncpasswd_CPPFLAGS = -I$(top_srcdir)/common
-vncpasswd_LDADD = $(COMMON_DIR)/rfb/librfb.la $(COMMON_DIR)/rdr/librdr.la
+vncpasswd_LDADD = $(top_srcdir)/common/rfb/librfb.la \
+ $(top_srcdir)/common/rdr/librdr.la
EXTRA_DIST = vncpasswd.man
vncviewer_SOURCES = $(HDRS) DesktopWindow.cxx CConn.cxx vncviewer.cxx \
buildtime.c
+# X_CFLAGS are really CPPFLAGS
+vncviewer_CPPFLAGS = -I$(top_srcdir)/common -I$(top_srcdir)/unix \
+ -I$(top_srcdir)/unix/tx -I$(top_srcdir)/intl \
+ -DLOCALEDIR=\"$(localedir)\" @X_CFLAGS@
-vncviewer_CPPFLAGS = -I$(COMMON_DIR) -I$(top_srcdir) -I$(top_srcdir)/tx \
- -I$(top_srcdir)/intl -DLOCALEDIR=\"$(localedir)\" @X_CFLAGS@ # X_CFLAGS are really CPPFLAGS
-
-vncviewer_LDADD = $(top_srcdir)/tx/libtx.la $(COMMON_DIR)/rfb/librfb.la \
- $(COMMON_DIR)/network/libnetwork.la $(COMMON_DIR)/rdr/librdr.la \
+vncviewer_LDADD = $(top_srcdir)/unix/tx/libtx.la \
+ $(top_srcdir)/common/rfb/librfb.la \
+ $(top_srcdir)/common/network/libnetwork.la \
+ $(top_srcdir)/common/rdr/librdr.la \
@X_PRE_LIBS@ @X_LIBS@ -lXext -lX11 @X_EXTRA_LIBS@ # @LIBINTL@
EXTRA_DIST = vncviewer.man
../vncconfig/QueryConnectDialog.cxx buildtime.c
# X_CFLAGS are really CPPFLAGS
-x0vncserver_CPPFLAGS = -I$(COMMON_DIR) -I$(top_srcdir) -I$(top_srcdir)/tx \
- -I$(top_srcdir)/vncconfig @XTEST_DEFINE@ @READDISPLAY_DEFINE@ \
+x0vncserver_CPPFLAGS = -I$(top_srcdir)/common -I$(top_srcdir)/common/rfb \
+ -I$(top_srcdir)/unix/tx -I$(top_srcdir)/unix/vncconfig \
+ -I$(top_srcdir)/unix @XTEST_DEFINE@ @READDISPLAY_DEFINE@ \
@MITSHM_DEFINE@ @X_CFLAGS@
-x0vncserver_LDADD = $(COMMON_DIR)/rfb/librfb.la \
- $(COMMON_DIR)/network/libnetwork.la $(COMMON_DIR)/rdr/librdr.la \
- $(top_srcdir)/tx/libtx.la @INET_LIB@ @X_PRE_LIBS@ @X_LIBS@ \
+x0vncserver_LDADD = $(top_srcdir)/common/rfb/librfb.la \
+ $(top_srcdir)/common/network/libnetwork.la \
+ $(top_srcdir)/common/rdr/librdr.la \
+ $(top_srcdir)/unix/tx/libtx.la @INET_LIB@ @X_PRE_LIBS@ @X_LIBS@ \
@XTEST_LIB@ -lXext -lX11 @X_EXTRA_LIBS@
EXTRA_DIST = x0vncserver.man