diff --git a/Makefile.am b/Makefile.am index 4a4fbbf..7f3f229 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,3 @@ -CFLAGS=-g -Wall - if WITH_X11VNC X11VNC=x11vnc endif diff --git a/client_examples/Makefile.am b/client_examples/Makefile.am index e46b10b..9eed084 100644 --- a/client_examples/Makefile.am +++ b/client_examples/Makefile.am @@ -1,4 +1,4 @@ -AM_CFLAGS=-I $(top_srcdir) -g -Wall +INCLUDES = -I$(top_srcdir) LDADD = ../libvncclient/libvncclient.la @WSOCKLIB@ if WITH_FFMPEG diff --git a/configure.ac b/configure.ac index 6ee075b..8c7db42 100644 --- a/configure.ac +++ b/configure.ac @@ -12,6 +12,7 @@ if test -z "$CC"; then else CCLD="$CC" fi +test "x$GCC" = "xyes" && CFLAGS="$CFLAGS -Wall" AC_PROG_MAKE_SET AC_PROG_LIBTOOL AC_PATH_PROG([AR], [ar], [/usr/bin/ar], diff --git a/contrib/Makefile.am b/contrib/Makefile.am index 2139603..637fea7 100644 --- a/contrib/Makefile.am +++ b/contrib/Makefile.am @@ -1,4 +1,4 @@ -AM_CFLAGS = -I $(top_srcdir) +INCLUDES = -I$(top_srcdir) LDADD = ../libvncserver/libvncserver.la @WSOCKLIB@ noinst_PROGRAMS=zippy diff --git a/examples/Makefile.am b/examples/Makefile.am index fca73a7..d08f7c9 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -1,4 +1,4 @@ -AM_CFLAGS=-I $(top_srcdir) -g -Wall +INCLUDES = -I$(top_srcdir) LDADD = ../libvncserver/libvncserver.la @WSOCKLIB@ if OSX diff --git a/libvncclient/Makefile.am b/libvncclient/Makefile.am index e9a6467..24dc8cf 100644 --- a/libvncclient/Makefile.am +++ b/libvncclient/Makefile.am @@ -1,4 +1,4 @@ -AM_CFLAGS=-g -I $(top_srcdir) -I. -Wall +INCLUDES = -I$(top_srcdir) libvncclient_la_SOURCES=cursor.c listen.c rfbproto.c sockets.c vncviewer.c minilzo.c diff --git a/libvncserver/Makefile.am b/libvncserver/Makefile.am index 5eb4352..0ad7a05 100644 --- a/libvncserver/Makefile.am +++ b/libvncserver/Makefile.am @@ -1,4 +1,4 @@ -AM_CFLAGS=-g -Wall -I $(top_srcdir) +INCLUDES = -I$(top_srcdir) if WITH_TIGHTVNC_FILETRANSFER TIGHTVNCFILETRANSFERHDRS=tightvnc-filetransfer/filelistinfo.h \ diff --git a/test/Makefile.am b/test/Makefile.am index 6abc5e1..82cf181 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1,4 +1,4 @@ -AM_CFLAGS=-I $(top_srcdir) -g -Wall +INCLUDES = -I$(top_srcdir) LDADD = ../libvncserver/libvncserver.la ../libvncclient/libvncclient.la @WSOCKLIB@ if HAVE_LIBPTHREAD diff --git a/vncterm/Makefile.am b/vncterm/Makefile.am index 0dce34b..f5811a4 100644 --- a/vncterm/Makefile.am +++ b/vncterm/Makefile.am @@ -1,11 +1,10 @@ -AM_CFLAGS=-I $(top_srcdir) +INCLUDES = -I$(top_srcdir) CONSOLE_SRCS=VNConsole.c noinst_HEADERS=VNConsole.h vga.h LDADD=../libvncserver/libvncserver.la @WSOCKLIB@ -INCLUDES=-I. if LINUX bin_PROGRAMS=LinuxVNC diff --git a/x11vnc/Makefile.am b/x11vnc/Makefile.am index 71448da..acf0088 100644 --- a/x11vnc/Makefile.am +++ b/x11vnc/Makefile.am @@ -1,4 +1,3 @@ -AM_CFLAGS = -I $(top_srcdir) if HAVE_SYSTEM_LIBVNCSERVER LDADD = @SYSTEM_LIBVNCSERVER_LIBS@ @WSOCKLIB@ else @@ -27,9 +26,11 @@ bin_PROGRAMS=x11vnc x11vnc_SOURCES = 8to24.c avahi.c cleanup.c connections.c cursor.c gui.c help.c inet.c keyboard.c linuxfb.c macosx.c macosxCG.c macosxCGP.c macosxCGS.c options.c pm.c pointer.c rates.c remote.c scan.c screen.c selection.c solid.c sslcmds.c sslhelper.c uinput.c unixpw.c user.c userinput.c util.c v4l.c win_utils.c x11vnc.c x11vnc_defs.c xdamage.c xevents.c xinerama.c xkb_bell.c xrandr.c xrecord.c xwrappers.c 8to24.h allowed_input_t.h avahi.h blackout_t.h cleanup.h connections.h cursor.h enc.h enums.h gui.h help.h inet.h keyboard.h linuxfb.h macosx.h macosxCG.h macosxCGP.h macosxCGS.h nox11.h nox11_funcs.h options.h params.h pm.h pointer.h rates.h remote.h scan.h screen.h scrollevent_t.h selection.h solid.h sslcmds.h sslhelper.h ssltools.h tkx11vnc.h uinput.h unixpw.h user.h userinput.h util.h v4l.h win_utils.h winattr_t.h x11vnc.h xdamage.h xevents.h xinerama.h xkb_bell.h xrandr.h xrecord.h xwrappers.h if HAVE_SYSTEM_LIBVNCSERVER -INCLUDES=@SYSTEM_LIBVNCSERVER_CFLAGS@ @X_CFLAGS@ @AVAHI_CFLAGS@ +INCLUDES_LIBVNCSERVER = @SYSTEM_LIBVNCSERVER_CFLAGS@ else -INCLUDES=@X_CFLAGS@ @AVAHI_CFLAGS@ +INCLUDES_LIBVNCSERVER = endif +INCLUDES = -I$(top_srcdir) +INCLUDES += $(INCLUDES_LIBVNCSERVER) @X_CFLAGS@ @AVAHI_CFLAGS@ x11vnc_LDADD=$(LDADD) @SSL_LIBS@ @CRYPT_LIBS@ @X_LIBS@ @AVAHI_LIBS@ $(LD_CYGIPC)