From bdd6bf3ccd81645fe1b36177896d07ac77c7a544 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Mon, 21 Jan 2013 12:19:30 +0800 Subject: [PATCH] bind gcc debug generation to_DEBUG Either generate debug sections in output or optimize aggressively, controlled by the existing --disable-debug Signed-off-by: Andy Green --- lib/Makefile.am | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/Makefile.am b/lib/Makefile.am index a0671892..d917a675 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -45,6 +45,12 @@ endif libwebsockets_la_CFLAGS=-Wall -std=gnu99 -pedantic -g libwebsockets_la_LDFLAGS= +if DISABLE_DEBUG +libwebsockets_la_CFLAGS+= -O4 +else +libwebsockets_la_CFLAGS+= -g +endif + if MINGW libwebsockets_la_CFLAGS+= -w -I../win32port/win32helpers -I ../win32port/zlib/ libwebsockets_la_LDFLAGS+= -lm -luser32 -ladvapi32 -lkernel32 -lgcc