Commit b6069625 authored by Steve Lhomme's avatar Steve Lhomme

contrib: add an option to generate PDB information

parent 21bfc705
......@@ -35,6 +35,7 @@ usage()
echo " --enable-ad-clauses configure to build packages with advertising clauses"
echo " (USE AT YOUR OWN LEGAL RISKS)"
echo " --disable-optim disable optimization in libraries"
echo " --enable-pdb generate debug information in PDB format"
}
BUILD=
......@@ -49,6 +50,7 @@ GPL="1"
GNUV3="1"
AD_CLAUSES=
WITH_OPTIMIZATION="1"
ENABLE_PDB=
if test ! -f "../../contrib/src/main.mak"
then
......@@ -84,6 +86,9 @@ do
--disable-optim)
WITH_OPTIMIZATION=
;;
--enable-pdb)
ENABLE_PDB=1
;;
--enable-small)
ENABLE_SMALL=1
;;
......@@ -266,6 +271,7 @@ test -z "$GPL" || add_make_enabled "GPL"
test -z "$GNUV3" || add_make_enabled "GNUV3"
test -z "$AD_CLAUSES" || add_make_enabled "AD_CLAUSES"
test -z "$WITH_OPTIMIZATION" || add_make_enabled "WITH_OPTIMIZATION"
test -z "$ENABLE_PDB" || add_make_enabled "ENABLE_PDB"
test "`uname -o 2>/dev/null`" != "Msys" || add_make "CMAKE_GENERATOR := -G \"MSYS Makefiles\""
#
......
......@@ -186,6 +186,11 @@ CFLAGS := $(CFLAGS) $(EXTRA_CFLAGS) -g
CXXFLAGS := $(CXXFLAGS) $(EXTRA_CFLAGS) $(EXTRA_CXXFLAGS) -g
LDFLAGS := $(LDFLAGS) -L$(PREFIX)/lib $(EXTRA_LDFLAGS)
ifdef ENABLE_PDB
CFLAGS := $(CFLAGS) -gcodeview
CXXFLAGS := $(CXXFLAGS) -gcodeview
endif
ifndef WITH_OPTIMIZATION
CFLAGS := $(CFLAGS) -O0
CXXFLAGS := $(CXXFLAGS) -O0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment