clean up build flags

The flag handling (both compiler options and include paths) are a mess at
the moment.  There is no point in forcing "-O2 -g" when these are already
the defaults, and if someone changes the defaults, chances are good they
don't want you clobbering their choices.

The -Wall flag should be handled in configure and thrown into CFLAGS once
rather than every Makefile.am.  Plus, this way we can control which
compilers the flag actually gets used with.

Finally, the INCLUDES variable is for -I paths, not AM_CFLAGS.  Nor should
it contain -I. as this is already in the default includes setup.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
pull/1/head
dscho 15 years ago
parent 2475d2c288
commit 3d2eab575e

@ -1,5 +1,3 @@
CFLAGS=-g -Wall
if WITH_X11VNC
X11VNC=x11vnc
endif

@ -1,4 +1,4 @@
AM_CFLAGS=-I $(top_srcdir) -g -Wall
INCLUDES = -I$(top_srcdir)
LDADD = ../libvncclient/libvncclient.la @WSOCKLIB@
if WITH_FFMPEG

@ -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],

@ -1,4 +1,4 @@
AM_CFLAGS = -I $(top_srcdir)
INCLUDES = -I$(top_srcdir)
LDADD = ../libvncserver/libvncserver.la @WSOCKLIB@
noinst_PROGRAMS=zippy

@ -1,4 +1,4 @@
AM_CFLAGS=-I $(top_srcdir) -g -Wall
INCLUDES = -I$(top_srcdir)
LDADD = ../libvncserver/libvncserver.la @WSOCKLIB@
if OSX

@ -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

@ -1,4 +1,4 @@
AM_CFLAGS=-g -Wall -I $(top_srcdir)
INCLUDES = -I$(top_srcdir)
if WITH_TIGHTVNC_FILETRANSFER
TIGHTVNCFILETRANSFERHDRS=tightvnc-filetransfer/filelistinfo.h \

@ -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

@ -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

@ -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)

Loading…
Cancel
Save