diff --git a/Make-linux b/Make-linux deleted file mode 100644 index 8300b12d..00000000 --- a/Make-linux +++ /dev/null @@ -1,71 +0,0 @@ -# -# build tools -# -AR = /usr/bin/ar cru -CD = cd -CXX = /usr/bin/g++ -ECHO = echo -LD = /usr/bin/ld -MKDIR = /bin/mkdir -RM = /bin/rm -f -RMR = /bin/rm -rf - -# -# compiler options -# -GCXXDEFS = -D_XOPEN_SOURCE=600 -D_SVID_SOURCE -GCXXINCS = -I$(DEPTH)/include -I/usr/X11R6/include -GCXXOPTS = -Wall -W -fexceptions -CXXOPTIMIZER = -g -#CXXOPTIMIZER = -O2 -DNDEBUG - -# -# linker options -# -GLDLIBS = -L/usr/X11R6/lib -lX11 -lXext -lXtst -GLDOPTS = -L$(LIBDIR) - -# -# binary stuff -# -BINTARGET = $(BINDIR)/$(TARGET) - -# -# library stuff -# -LIBTARGET = $(LIBDIR)/lib$(TARGET).a - -# -# dependency generation stuff -# -MKDEP = $(DEPTH)/tools/depconv -MKDEPOPT = -MD -MKDEPPRE = -MKDEPPOST = $(MKDEP) -f $(MKDEPFILE) $*.d; $(RM) $*.d -MKDEPFILE = .depend - -# -# stuff to clean -# -DIRT = $(_FORCE) $(LDIRT) $(GDIRT) -GDIRT = *.[eoud] a.out core ar.tmp.* $(MKDEPFILE) - -# -# Rule macros for nonterminal makefiles that iterate over subdirectories, -# making the current target. Set SUBDIRS to the relevant list of kids. -# -# Set NOSUBMESG to any value to suppress a warning that subdirectories -# are not present. -# -SUBDIR_MAKERULE= \ - if test ! -d $$d; then \ - if test "$(NOSUBMESG)" = "" ; then \ - ${ECHO} "SKIPPING $$d: No such directory."; \ - fi \ - else \ - ${ECHO} "${CD} $$d; $(MAKE) $${RULE:=$@}"; \ - (${CD} $$d; ${MAKE} $${RULE:=$@}); \ - fi - -SUBDIRS_MAKERULE= \ - @for d in $(SUBDIRS); do $(SUBDIR_MAKERULE); done diff --git a/Make-solaris b/Make-solaris deleted file mode 100644 index 8730b63e..00000000 --- a/Make-solaris +++ /dev/null @@ -1,72 +0,0 @@ -# -# build tools -# -AR = /usr/ccs/bin/ar cru -CD = cd -CXX = g++ -ECHO = echo -LD = /usr/css/bin/ld -MKDIR = /bin/mkdir -RM = /bin/rm -f -RMR = /bin/rm -rf - -# -# compiler options -# -GCXXDEFS = -GCXXINCS = -I$(DEPTH)/include -I/usr/X11R6/include -GCXXOPTS = -Wall -W -fexceptions -fno-rtti -CXXOPTIMIZER = -g -#CXXOPTIMIZER = -O2 -DNDEBUG - -# -# linker options -# -#GLDLIBS = -L$(LIBDIR) -L/usr/X11R6/lib -lX11 -lXext -lXtst -GLDLIBS = -L$(LIBDIR) -lsocket -lnsl -lposix4 -GLDOPTS = -z muldefs - -# -# binary stuff -# -BINTARGET = $(BINDIR)/$(TARGET) - -# -# library stuff -# -LIBTARGET = $(LIBDIR)/lib$(TARGET).a - -# -# dependency generation stuff -# -MKDEP = $(DEPTH)/tools/depconv -MKDEPOPT = -MD -MKDEPPRE = -MKDEPPOST = $(MKDEP) -f $(MKDEPFILE) $*.d; $(RM) $*.d -MKDEPFILE = .depend - -# -# stuff to clean -# -DIRT = $(_FORCE) $(LDIRT) $(GDIRT) -GDIRT = *.[eoud] a.out core ar.tmp.* $(MKDEPFILE) - -# -# Rule macros for nonterminal makefiles that iterate over subdirectories, -# making the current target. Set SUBDIRS to the relevant list of kids. -# -# Set NOSUBMESG to any value to suppress a warning that subdirectories -# are not present. -# -SUBDIR_MAKERULE= \ - if test ! -d $$d; then \ - if test "$(NOSUBMESG)" = "" ; then \ - ${ECHO} "SKIPPING $$d: No such directory."; \ - fi \ - else \ - ${ECHO} "${CD} $$d; $(MAKE) $${RULE:=$@}"; \ - (${CD} $$d; ${MAKE} $${RULE:=$@}); \ - fi - -SUBDIRS_MAKERULE= \ - @for d in $(SUBDIRS); do $(SUBDIR_MAKERULE); done diff --git a/Makecommon b/Makecommon deleted file mode 100644 index a126b2da..00000000 --- a/Makecommon +++ /dev/null @@ -1,94 +0,0 @@ -# -# -# common definitions -# -# - -# -# empty define, used to terminate lists -# -NULL = - -# -# target directories -# -LIBDIR = $(DEPTH)/lib -BINDIR = $(DEPTH)/bin - -# -# compiler options -# -CXXFLAGS = $(LCXXFLAGS) $(GCXXFLAGS) $(CXXOPTIMIZER) $(MKDEPOPT) -LCXXFLAGS = $(LCXXDEFS) $(LCXXINCS) $(LCXXOPTS) -GCXXFLAGS = $(GCXXDEFS) $(GCXXINCS) $(GCXXOPTS) - -# -# linker options -# -LDFLAGS = $(LDOPTS) $(LDLIBS) -LDOPTS = $(LLDOPTS) $(GLDOPTS) -LDLIBS = $(LLDLIBS) $(GLDLIBS) - -# -# ar options -# -ARF = $(AR) - -# -# Convenience file list macros: -# -SOURCES = $(CXXFILES) -OBJECTS = $(CXXFILES:.cpp=.o) -TARGETS = $(BINTARGET) $(LIBTARGET) - -# -# always unsatisfied target -# -_FORCE = $(COMMONPREF)_force - -# -# -# common rules -# -# - -# -# default target. makefiles must define a target named `targets'. -# -$(COMMONPREF)default: targets - -# -# always unsatisfied target -# -$(_FORCE): - -# -# cleaners -# -COMMONTARGETS = clean clobber -$(COMMONPREF)clean: $(_FORCE) - $(RM) $(DIRT) - -$(COMMONPREF)clobber: clean $(_FORCE) - $(RM) $(TARGETS) - -# -# implicit target rules -# -.SUFFIXES: .cpp .o - -.cpp.o: - $(MKDEPPRE) - $(CXX) $(CXXFLAGS) -c $< - $(MKDEPPOST) - -# -# platform stuff -# -include $(DEPTH)/Make-linux -#include $(DEPTH)/Make-solaris - -# -# load dependencies -# -sinclude $(MKDEPFILE) diff --git a/Makefile b/Makefile deleted file mode 100644 index 29e61219..00000000 --- a/Makefile +++ /dev/null @@ -1,35 +0,0 @@ -DEPTH=. -COMMONPREF = root -include Makecommon - -# -# subdirectories -# -SUBDIRS = \ - base \ - mt \ - io \ - http \ - net \ - synergy \ - platform \ - client \ - server \ - $(NULL) - -# -# targets -# - -default: $(COMMONPREF)_force - $(SUBDIRS_MAKERULE) - -all targets: default - -clean: - $(RMR) $(LIBDIR) - $(SUBDIRS_MAKERULE) - -clobber: - $(RMR) $(LIBDIR) - $(SUBDIRS_MAKERULE) diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 00000000..52c2c014 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,16 @@ +## Process this file with automake to produce Makefile.in +NULL = +DEPTH = . + +EXTRA_DIST = +SUBDIRS = \ + base \ + mt \ + io \ + http \ + net \ + synergy \ + platform \ + client \ + server \ + $(NULL) diff --git a/acsite.m4 b/acsite.m4 new file mode 100644 index 00000000..4b02bee6 --- /dev/null +++ b/acsite.m4 @@ -0,0 +1,227 @@ +dnl The following macros are from http://www.gnu.org/software/ac-archive/ +dnl which distributes them under the following license: +dnl +dnl Every Autoconf macro presented on this web site is free software; you can +dnl redistribute it and/or modify it under the terms of the GNU General +dnl Public License as published by the Free Software Foundation; either +dnl version 2, or (at your option) any later version. +dnl +dnl They are distributed in the hope that they will be useful, but WITHOUT +dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +dnl FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +dnl more details. (You should have received a copy of the GNU General Public +dnl License along with this program; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place -- Suite 330, Boston, MA 02111-1307, +dnl USA.) +dnl +dnl As a special exception, the Free Software Foundation gives unlimited +dnl permission to copy, distribute and modify the configure scripts that are +dnl the output of Autoconf. You need not follow the terms of the GNU General +dnl Public License when using or distributing such scripts, even though +dnl portions of the text of Autoconf appear in them. The GNU General Public +dnl License (GPL) does govern all other use of the material that constitutes +dnl the Autoconf program. +dnl +dnl Certain portions of the Autoconf source text are designed to be copied +dnl (in certain cases, depending on the input) into the output of Autoconf. +dnl We call these the "data" portions. The rest of the Autoconf source text +dnl consists of comments plus executable code that decides which of the data +dnl portions to output in any given case. We call these comments and +dnl executable code the "non-data" portions. Autoconf never copies any of the +dnl non-data portions into its output. +dnl +dnl This special exception to the GPL applies to versions of Autoconf +dnl released by the Free Software Foundation. When you make and distribute a +dnl modified version of Autoconf, you may extend this special exception to +dnl the GPL to apply to your modified version as well, *unless* your modified +dnl version has the potential to copy into its output some of the text that +dnl was the non-data portion of the version that you started with. (In other +dnl words, unless your change moves or copies text from the non-data portions +dnl to the data portions.) If your modification has such potential, you must +dnl delete any notice of this special exception to the GPL from your modified +dnl version + +AC_DEFUN([ACX_PTHREAD], [ +acx_pthread_ok=no + +# We used to check for pthread.h first, but this fails if pthread.h +# requires special compiler flags (e.g. on True64 or Sequent). +# It gets checked for in the link test anyway. + +# First of all, check if the user has set any of the PTHREAD_LIBS, +# etcetera environment variables, and if threads linking works using +# them: +if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + save_LIBS="$LIBS" + LIBS="$PTHREAD_LIBS $LIBS" + AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS]) + AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes) + AC_MSG_RESULT($acx_pthread_ok) + if test x"$acx_pthread_ok" = xno; then + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" + fi + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" +fi + +# We must check for the threads library under a number of different +# names; the ordering is very important because some systems +# (e.g. DEC) have both -lpthread and -lpthreads, where one of the +# libraries is broken (non-POSIX). + +# Create a list of thread flags to try. Items starting with a "-" are +# C compiler flags, and other items are library names, except for "none" +# which indicates that we try without any flags at all. + +acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt" + +# The ordering *is* (sometimes) important. Some notes on the +# individual items follow: + +# pthreads: AIX (must check this before -lpthread) +# none: in case threads are in libc; should be tried before -Kthread and +# other compiler flags to prevent continual compiler warnings +# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) +# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) +# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) +# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) +# -pthreads: Solaris/gcc +# -mthreads: Mingw32/gcc, Lynx/gcc +# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it +# doesn't hurt to check since this sometimes defines pthreads too; +# also defines -D_REENTRANT) +# pthread: Linux, etcetera +# --thread-safe: KAI C++ + +case "${host_cpu}-${host_os}" in + *solaris*) + + # On Solaris (at least, for some versions), libc contains stubbed + # (non-functional) versions of the pthreads routines, so link-based + # tests will erroneously succeed. (We need to link with -pthread or + # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather + # a function called by this macro, so we could check for that, but + # who knows whether they'll stub that too in a future libc.) So, + # we'll just look for -pthreads and -lpthread first: + + acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags" + ;; +esac + +if test x"$acx_pthread_ok" = xno; then +for flag in $acx_pthread_flags; do + + case $flag in + none) + AC_MSG_CHECKING([whether pthreads work without any flags]) + ;; + + -*) + AC_MSG_CHECKING([whether pthreads work with $flag]) + PTHREAD_CFLAGS="$flag" + ;; + + *) + AC_MSG_CHECKING([for the pthreads library -l$flag]) + PTHREAD_LIBS="-l$flag" + ;; + esac + + save_LIBS="$LIBS" + save_CFLAGS="$CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + + # Check for various functions. We must include pthread.h, + # since some functions may be macros. (On the Sequent, we + # need a special flag -Kthread to make this header compile.) + # We check for pthread_join because it is in -lpthread on IRIX + # while pthread_create is in libc. We check for pthread_attr_init + # due to DEC craziness with -lpthreads. We check for + # pthread_cleanup_push because it is one of the few pthread + # functions on Solaris that doesn't have a non-functional libc stub. + # We try pthread_create on general principles. + AC_TRY_LINK([#include ], + [pthread_t th; pthread_join(th, 0); + pthread_attr_init(0); pthread_cleanup_push(0, 0); + pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], + [acx_pthread_ok=yes]) + + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" + + AC_MSG_RESULT($acx_pthread_ok) + if test "x$acx_pthread_ok" = xyes; then + break; + fi + + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" +done +fi + +# Various other checks: +if test "x$acx_pthread_ok" = xyes; then + save_LIBS="$LIBS" + LIBS="$PTHREAD_LIBS $LIBS" + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + + # Detect AIX lossage: threads are created detached by default + # and the JOINABLE attribute has a nonstandard name (UNDETACHED). + AC_MSG_CHECKING([for joinable pthread attribute]) + AC_TRY_LINK([#include ], + [int attr=PTHREAD_CREATE_JOINABLE;], + ok=PTHREAD_CREATE_JOINABLE, ok=unknown) + if test x"$ok" = xunknown; then + AC_TRY_LINK([#include ], + [int attr=PTHREAD_CREATE_UNDETACHED;], + ok=PTHREAD_CREATE_UNDETACHED, ok=unknown) + fi + if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then + AC_DEFINE(PTHREAD_CREATE_JOINABLE, $ok, + [Define to the necessary symbol if this constant + uses a non-standard name on your system.]) + fi + AC_MSG_RESULT(${ok}) + if test x"$ok" = xunknown; then + AC_MSG_WARN([we do not know how to create joinable pthreads]) + fi + + AC_MSG_CHECKING([if more special flags are required for pthreads]) + flag=no + case "${host_cpu}-${host_os}" in + *-aix* | *-freebsd*) flag="-D_THREAD_SAFE";; + *solaris* | alpha*-osf*) flag="-D_REENTRANT";; + esac + AC_MSG_RESULT(${flag}) + if test "x$flag" != xno; then + PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" + fi + + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" + + # More AIX lossage: must compile with cc_r + AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC}) +else + PTHREAD_CC="$CC" +fi + +AC_SUBST(PTHREAD_LIBS) +AC_SUBST(PTHREAD_CFLAGS) +AC_SUBST(PTHREAD_CC) + +# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: +if test x"$acx_pthread_ok" = xyes; then + ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1]) + : +else + acx_pthread_ok=no + $2 +fi + +])dnl ACX_PTHREAD diff --git a/base/Makefile b/base/Makefile deleted file mode 100644 index dcb324f4..00000000 --- a/base/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -DEPTH=.. -include $(DEPTH)/Makecommon - -# -# target file -# -TARGET = base - -# -# source files -# -LCXXINCS = \ - $(NULL) -CXXFILES = \ - XBase.cpp \ - CLog.cpp \ - CFunctionJob.cpp \ - CStopwatch.cpp \ - CString.cpp \ - $(NULL) - -targets: $(LIBTARGET) - -$(LIBTARGET): $(OBJECTS) - if test ! -d $(LIBDIR); then $(MKDIR) $(LIBDIR); fi - $(ARF) $(LIBTARGET) $(OBJECTS) diff --git a/base/Makefile.am b/base/Makefile.am new file mode 100644 index 00000000..07ee18bc --- /dev/null +++ b/base/Makefile.am @@ -0,0 +1,34 @@ +## Process this file with automake to produce Makefile.in +NULL = +DEPTH = .. + +noinst_LIBRARIES = libbase.a +libbase_a_SOURCES = \ + CFunctionJob.cpp \ + CLog.cpp \ + CStopwatch.cpp \ + CString.cpp \ + XBase.cpp \ + BasicTypes.h \ + CFunctionJob.h \ + CLog.h \ + CStopwatch.h \ + CString.h \ + IInterface.h \ + IJob.h \ + TMethodJob.h \ + XBase.h \ + common.h \ + stdfstream.h \ + stdistream.h \ + stdlist.h \ + stdmap.h \ + stdostream.h \ + stdpost.h \ + stdpre.h \ + stdset.h \ + stdsstream.h \ + stdvector.h \ + $(NULL) +INCLUDES = \ + $(NULL) diff --git a/client/Makefile b/client/Makefile deleted file mode 100644 index 0c3d7cba..00000000 --- a/client/Makefile +++ /dev/null @@ -1,47 +0,0 @@ -DEPTH=.. -include $(DEPTH)/Makecommon - -# -# target file -# -TARGET = synergy - -# -# source files -# -LCXXINCS = \ - -I$(DEPTH)/base \ - -I$(DEPTH)/mt \ - -I$(DEPTH)/io \ - -I$(DEPTH)/net \ - -I$(DEPTH)/synergy \ - -I$(DEPTH)/platform \ - $(NULL) -CXXFILES = \ - CXWindowsSecondaryScreen.cpp \ - CClient.cpp \ - client.cpp \ - $(NULL) - -# -# libraries we depend on -# -DEPLIBS = \ - $(LIBDIR)/libplatform.a \ - $(LIBDIR)/libsynergy.a \ - $(LIBDIR)/libnet.a \ - $(LIBDIR)/libio.a \ - $(LIBDIR)/libmt.a \ - $(LIBDIR)/libbase.a \ - $(NULL) -LLDLIBS = \ - $(DEPLIBS) \ - -lpthread \ - $(NULL) - -targets: $(BINTARGET) - -$(BINTARGET): $(OBJECTS) $(DEPLIBS) - if test ! -d $(BINDIR); then $(MKDIR) $(BINDIR); fi - $(CXX) $(CXXFLAGS) -o $@ $(OBJECTS) $(LDFLAGS) - diff --git a/client/Makefile.am b/client/Makefile.am new file mode 100644 index 00000000..fe5ae6ec --- /dev/null +++ b/client/Makefile.am @@ -0,0 +1,29 @@ +## Process this file with automake to produce Makefile.in +NULL = +DEPTH = .. + +bin_PROGRAMS = synergy +synergy_SOURCES = \ + CXWindowsSecondaryScreen.cpp \ + CClient.cpp \ + client.cpp \ + $(NULL) +synergy_LDADD = \ + $(DEPTH)/platform/libplatform.a \ + $(DEPTH)/synergy/libsynergy.a \ + $(DEPTH)/net/libnet.a \ + $(DEPTH)/io/libio.a \ + $(DEPTH)/mt/libmt.a \ + $(DEPTH)/base/libbase.a \ + -lX11 \ + -lXext \ + -lXtst \ + $(NULL) +INCLUDES = \ + -I$(DEPTH)/base \ + -I$(DEPTH)/mt \ + -I$(DEPTH)/io \ + -I$(DEPTH)/net \ + -I$(DEPTH)/synergy \ + -I$(DEPTH)/platform \ + $(NULL) diff --git a/configure.in b/configure.in new file mode 100644 index 00000000..cc2ca4fc --- /dev/null +++ b/configure.in @@ -0,0 +1,65 @@ +dnl Process this file with autoconf to produce a configure script. + +AC_INIT(base/IInterface.h) +AM_INIT_AUTOMAKE(synergy, 0.5) +AM_CONFIG_HEADER(config.h) + +dnl information on the package + +dnl checks for programs +AC_PROG_CC +AC_PROG_CXX +AC_PROG_RANLIB + +dnl checks for libraries +ACX_PTHREAD(,AC_MSG_ERROR(You must have pthreads to compile synergy)) + +dnl checks for header files +AC_HEADER_STDC +AC_PATH_X +if test "$no_x" = yes; then + AC_MSG_ERROR(You must have X Windows to compile synergy) +fi +AC_PATH_XTRA +AC_CHECK_HEADERS(sys/time.h) +dnl AC_HEADER_TIME + +dnl checks for types +dnl AC_TYPE_SIZE_T + +dnl checks for structures +AC_STRUCT_TM + +dnl checks for compiler characteristics + + +dnl checks for library functions +dnl AC_TYPE_SIGNAL +dnl AC_FUNC_FORK +AC_FUNC_MEMCMP +AC_FUNC_STRFTIME +dnl use AC_REPLACE_FUNCS() for stuff in string.h +dnl AC_HEADER_SYS_WAIT + +dnl checks for system services + + +dnl adjust variables for X11 and pthreads +LIBS="$X_PRE_LIBS $LIBS $X_EXTRA_LIBS $X_LIBS $PTHREAD_LIBS" +CFLAGS="$CFLAGS $X_CFLAGS $PTHREAD_CFLAGS" +CXXFLAGS="$CXXFLAGS $X_CFLAGS $PTHREAD_CFLAGS" +CC="$PTHREAD_CC" + +AC_OUTPUT([ +Makefile +base/Makefile +mt/Makefile +io/Makefile +http/Makefile +net/Makefile +synergy/Makefile +platform/Makefile +client/Makefile +server/Makefile +]) + diff --git a/http/Makefile b/http/Makefile deleted file mode 100644 index dd89e329..00000000 --- a/http/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -DEPTH=.. -include $(DEPTH)/Makecommon - -# -# target file -# -TARGET = http - -# -# source files -# -LCXXINCS = \ - -I$(DEPTH)/base \ - -I$(DEPTH)/mt \ - -I$(DEPTH)/io \ - $(NULL) -CXXFILES = \ - XHTTP.cpp \ - CHTTPProtocol.cpp \ - $(NULL) - -targets: $(LIBTARGET) - -$(LIBTARGET): $(OBJECTS) $(DEPLIBS) - if test ! -d $(LIBDIR); then $(MKDIR) $(LIBDIR); fi - $(ARF) $(LIBTARGET) $(OBJECTS) diff --git a/http/Makefile.am b/http/Makefile.am new file mode 100644 index 00000000..ecdf2c9c --- /dev/null +++ b/http/Makefile.am @@ -0,0 +1,14 @@ +## Process this file with automake to produce Makefile.in +NULL = +DEPTH = .. + +noinst_LIBRARIES = libhttp.a +libhttp_a_SOURCES = \ + CHTTPProtocol.cpp \ + XHTTP.cpp \ + $(NULL) +INCLUDES = \ + -I$(DEPTH)/base \ + -I$(DEPTH)/mt \ + -I$(DEPTH)/io \ + $(NULL) diff --git a/io/Makefile b/io/Makefile deleted file mode 100644 index 49496cd9..00000000 --- a/io/Makefile +++ /dev/null @@ -1,29 +0,0 @@ -DEPTH=.. -include $(DEPTH)/Makecommon - -# -# target file -# -TARGET = io - -# -# source files -# -LCXXINCS = \ - -I$(DEPTH)/base \ - -I$(DEPTH)/mt \ - $(NULL) -CXXFILES = \ - XIO.cpp \ - CInputStreamFilter.cpp \ - COutputStreamFilter.cpp \ - CStreamBuffer.cpp \ - CBufferedInputStream.cpp \ - CBufferedOutputStream.cpp \ - $(NULL) - -targets: $(LIBTARGET) - -$(LIBTARGET): $(OBJECTS) $(DEPLIBS) - if test ! -d $(LIBDIR); then $(MKDIR) $(LIBDIR); fi - $(ARF) $(LIBTARGET) $(OBJECTS) diff --git a/io/Makefile.am b/io/Makefile.am new file mode 100644 index 00000000..e0b58ce6 --- /dev/null +++ b/io/Makefile.am @@ -0,0 +1,17 @@ +## Process this file with automake to produce Makefile.in +NULL = +DEPTH = .. + +noinst_LIBRARIES = libio.a +libio_a_SOURCES = \ + CBufferedInputStream.cpp \ + CBufferedOutputStream.cpp \ + CInputStreamFilter.cpp \ + COutputStreamFilter.cpp \ + CStreamBuffer.cpp \ + XIO.cpp \ + $(NULL) +INCLUDES = \ + -I$(DEPTH)/base \ + -I$(DEPTH)/mt \ + $(NULL) diff --git a/mt/Makefile b/mt/Makefile deleted file mode 100644 index 1a7270c8..00000000 --- a/mt/Makefile +++ /dev/null @@ -1,28 +0,0 @@ -DEPTH=.. -include $(DEPTH)/Makecommon - -# -# target file -# -TARGET = mt - -# -# source files -# -LCXXINCS = \ - -I$(DEPTH)/base \ - $(NULL) -CXXFILES = \ - CLock.cpp \ - CMutex.cpp \ - CCondVar.cpp \ - CThread.cpp \ - CThreadRep.cpp \ - CTimerThread.cpp \ - $(NULL) - -targets: $(LIBTARGET) - -$(LIBTARGET): $(OBJECTS) - if test ! -d $(LIBDIR); then $(MKDIR) $(LIBDIR); fi - $(ARF) $(LIBTARGET) $(OBJECTS) diff --git a/mt/Makefile.am b/mt/Makefile.am new file mode 100644 index 00000000..0b23ad3f --- /dev/null +++ b/mt/Makefile.am @@ -0,0 +1,16 @@ +## Process this file with automake to produce Makefile.in +NULL = +DEPTH = .. + +noinst_LIBRARIES = libmt.a +libmt_a_SOURCES = \ + CLock.cpp \ + CMutex.cpp \ + CCondVar.cpp \ + CThread.cpp \ + CThreadRep.cpp \ + CTimerThread.cpp \ + $(NULL) +INCLUDES = \ + -I$(DEPTH)/base \ + $(NULL) diff --git a/net/Makefile b/net/Makefile deleted file mode 100644 index 741ba8bf..00000000 --- a/net/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -DEPTH=.. -include $(DEPTH)/Makecommon - -# -# target file -# -TARGET = net - -# -# source files -# -LCXXINCS = \ - -I$(DEPTH)/base \ - -I$(DEPTH)/mt \ - -I$(DEPTH)/io \ - $(NULL) -CXXFILES = \ - CNetwork.cpp \ - CNetworkAddress.cpp \ - CTCPSocket.cpp \ - CTCPListenSocket.cpp \ - XNetwork.cpp \ - XSocket.cpp \ - $(NULL) - -targets: $(LIBTARGET) - -$(LIBTARGET): $(OBJECTS) - if test ! -d $(LIBDIR); then $(MKDIR) $(LIBDIR); fi - $(ARF) $(LIBTARGET) $(OBJECTS) diff --git a/net/Makefile.am b/net/Makefile.am new file mode 100644 index 00000000..6a5b59d9 --- /dev/null +++ b/net/Makefile.am @@ -0,0 +1,18 @@ +## Process this file with automake to produce Makefile.in +NULL = +DEPTH = .. + +noinst_LIBRARIES = libnet.a +libnet_a_SOURCES = \ + CNetwork.cpp \ + CNetworkAddress.cpp \ + CTCPSocket.cpp \ + CTCPListenSocket.cpp \ + XNetwork.cpp \ + XSocket.cpp \ + $(NULL) +INCLUDES = \ + -I$(DEPTH)/base \ + -I$(DEPTH)/mt \ + -I$(DEPTH)/io \ + $(NULL) diff --git a/platform/Makefile b/platform/Makefile deleted file mode 100644 index 26186b72..00000000 --- a/platform/Makefile +++ /dev/null @@ -1,28 +0,0 @@ -DEPTH=.. -include $(DEPTH)/Makecommon - -# -# target file -# -TARGET = platform - -# -# source files -# -LCXXINCS = \ - -I$(DEPTH)/base \ - -I$(DEPTH)/mt \ - -I$(DEPTH)/synergy \ - $(NULL) -CXXFILES = \ - CPlatform.cpp \ - CXWindowsClipboard.cpp \ - CXWindowsScreen.cpp \ - CXWindowsUtil.cpp \ - $(NULL) - -targets: $(LIBTARGET) - -$(LIBTARGET): $(OBJECTS) $(DEPLIBS) - if test ! -d $(LIBDIR); then $(MKDIR) $(LIBDIR); fi - $(ARF) $(LIBTARGET) $(OBJECTS) diff --git a/platform/Makefile.am b/platform/Makefile.am new file mode 100644 index 00000000..e6c4c2ca --- /dev/null +++ b/platform/Makefile.am @@ -0,0 +1,16 @@ +## Process this file with automake to produce Makefile.in +NULL = +DEPTH = .. + +noinst_LIBRARIES = libplatform.a +libplatform_a_SOURCES = \ + CPlatform.cpp \ + CXWindowsClipboard.cpp \ + CXWindowsScreen.cpp \ + CXWindowsUtil.cpp \ + $(NULL) +INCLUDES = \ + -I$(DEPTH)/base \ + -I$(DEPTH)/mt \ + -I$(DEPTH)/synergy \ + $(NULL) diff --git a/server/Makefile b/server/Makefile deleted file mode 100644 index eca0dcd2..00000000 --- a/server/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -DEPTH=.. -include $(DEPTH)/Makecommon - -# -# target file -# -TARGET = synergyd - -# -# source files -# -LCXXINCS = \ - -I$(DEPTH)/base \ - -I$(DEPTH)/mt \ - -I$(DEPTH)/io \ - -I$(DEPTH)/http \ - -I$(DEPTH)/net \ - -I$(DEPTH)/synergy \ - -I$(DEPTH)/platform \ - $(NULL) -CXXFILES = \ - CConfig.cpp \ - CServerProtocol.cpp \ - CServerProtocol1_0.cpp \ - CXWindowsPrimaryScreen.cpp \ - CServer.cpp \ - CHTTPServer.cpp \ - server.cpp \ - $(NULL) - -# -# libraries we depend on -# -DEPLIBS = \ - $(LIBDIR)/libplatform.a \ - $(LIBDIR)/libsynergy.a \ - $(LIBDIR)/libnet.a \ - $(LIBDIR)/libhttp.a \ - $(LIBDIR)/libio.a \ - $(LIBDIR)/libmt.a \ - $(LIBDIR)/libbase.a \ - $(NULL) -LLDLIBS = \ - $(DEPLIBS) \ - -lpthread \ - $(NULL) - -targets: $(BINTARGET) - -$(BINTARGET): $(OBJECTS) $(DEPLIBS) - if test ! -d $(BINDIR); then $(MKDIR) $(BINDIR); fi - $(CXX) $(CXXFLAGS) -o $@ $(OBJECTS) $(LDFLAGS) - diff --git a/server/Makefile.am b/server/Makefile.am new file mode 100644 index 00000000..1ed7866a --- /dev/null +++ b/server/Makefile.am @@ -0,0 +1,35 @@ +## Process this file with automake to produce Makefile.in +NULL = +DEPTH = .. + +bin_PROGRAMS = synergyd +synergyd_SOURCES = \ + CConfig.cpp \ + CServerProtocol.cpp \ + CServerProtocol1_0.cpp \ + CXWindowsPrimaryScreen.cpp \ + CServer.cpp \ + CHTTPServer.cpp \ + server.cpp \ + $(NULL) +synergyd_LDADD = \ + $(DEPTH)/platform/libplatform.a \ + $(DEPTH)/synergy/libsynergy.a \ + $(DEPTH)/net/libnet.a \ + $(DEPTH)/http/libhttp.a \ + $(DEPTH)/io/libio.a \ + $(DEPTH)/mt/libmt.a \ + $(DEPTH)/base/libbase.a \ + -lX11 \ + -lXext \ + -lXtst \ + $(NULL) +INCLUDES = \ + -I$(DEPTH)/base \ + -I$(DEPTH)/mt \ + -I$(DEPTH)/io \ + -I$(DEPTH)/http \ + -I$(DEPTH)/net \ + -I$(DEPTH)/synergy \ + -I$(DEPTH)/platform \ + $(NULL) diff --git a/synergy/Makefile b/synergy/Makefile deleted file mode 100644 index 6c55ab69..00000000 --- a/synergy/Makefile +++ /dev/null @@ -1,33 +0,0 @@ -DEPTH=.. -include $(DEPTH)/Makecommon - -# -# target file -# -TARGET = synergy - -# -# source files -# -LCXXINCS = \ - -I$(DEPTH)/base \ - -I$(DEPTH)/mt \ - -I$(DEPTH)/io \ - -I$(DEPTH)/net \ - $(NULL) -CXXFILES = \ - CInputPacketStream.cpp \ - COutputPacketStream.cpp \ - CProtocolUtil.cpp \ - CClipboard.cpp \ - CTCPSocketFactory.cpp \ - XScreen.cpp \ - XSynergy.cpp \ - $(NULL) - -targets: $(LIBTARGET) - -$(LIBTARGET): $(OBJECTS) - if test ! -d $(LIBDIR); then $(MKDIR) $(LIBDIR); fi - $(ARF) $(LIBTARGET) $(OBJECTS) - diff --git a/synergy/Makefile.am b/synergy/Makefile.am new file mode 100644 index 00000000..3b10a96b --- /dev/null +++ b/synergy/Makefile.am @@ -0,0 +1,20 @@ +## Process this file with automake to produce Makefile.in +NULL = +DEPTH = .. + +noinst_LIBRARIES = libsynergy.a +libsynergy_a_SOURCES = \ + CInputPacketStream.cpp \ + COutputPacketStream.cpp \ + CProtocolUtil.cpp \ + CClipboard.cpp \ + CTCPSocketFactory.cpp \ + XScreen.cpp \ + XSynergy.cpp \ + $(NULL) +INCLUDES = \ + -I$(DEPTH)/base \ + -I$(DEPTH)/mt \ + -I$(DEPTH)/io \ + -I$(DEPTH)/net \ + $(NULL) diff --git a/tools/depconv b/tools/depconv deleted file mode 100755 index 7bccd466..00000000 --- a/tools/depconv +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh -# -# add dependency info from files on command line to $depfile - -depfile="Makedepends" - -dependencies="" -targets="^$" - -# tmp directory -if test -z "$TMP"; then TMP=/tmp; fi - -while [ -n "$*" ]; do - case "$1" in - -f) - depfile=$2 - shift - shift - ;; - -*) - echo "usage: $0 [-f ] ..." - exit 1 - ;; - *) - break - esac -done - -# collect all dependencies -while [ -n "$*" ]; do - line=`cat $1 | sed -e 's/\\\\//g' | sed -e 's/ \/[^ ]*//g'` - target=`echo $line | sed -e 's/^\([^:]*\):.*/\1/'` - targets="$targets|^$target:" - dependencies="$dependencies$line\n" - shift -done - -# add new dependencies to $depfile -if [ -n "$targets" ]; then - if [ -r $depfile ]; then - (egrep -v $targets $depfile; echo -e -n $dependencies) > $TMP/dep$$ - if [ $? -eq 0 ]; then mv $TMP/dep$$ $depfile; fi - else - echo -e -n $dependencies > $depfile - fi -fi