Skip to content

Commit

Permalink
Enabling debug
Browse files Browse the repository at this point in the history
  • Loading branch information
hyades committed Jan 5, 2015
1 parent 3ac06e5 commit 07566e8
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
12 changes: 12 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,18 @@ dnl FIXME: Add the Python-API as an option here

dnl === Output ================================================================

AC_ARG_ENABLE(debug,
AS_HELP_STRING([--enable-debug],
[enable debugging, default: no]),
[case "${enableval}" in
yes) debug=true ;;
no) debug=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;;
esac],
[debug=false])

AM_CONDITIONAL(DEBUG, test x"$debug" = x"true")

AC_CONFIG_FILES(
Makefile
plugins/Makefile
Expand Down
2 changes: 0 additions & 2 deletions python-api/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ unittests:
@rm -rf reports
@mkdir -p reports/coverage/unittests
py.test --cov gstswitch tests/unittests/ --pep8 -v -s
@make clean


integration:
@rm -f ../tools/*.c.gcov
Expand Down
10 changes: 8 additions & 2 deletions tools/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,25 @@ GCOV_CFLAGS =
GCOV_LFLAGS =
endif

if DEBUG
AM_CFLAGS = -g3 -O0
else
AM_CFLAGS = -O2
endif

gst_switch_srv_SOURCES = gstworker.c gstswitchserver.c gstcase.c \
gstcomposite.c gstswitchcontroller.c gstrecorder.c \
gio/gsocketinputstream.c
gst_switch_srv_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) $(GCOV_CFLAGS) \
$(GST_PLUGINS_BASE_CFLAGS) -DLOG_PREFIX="\"./tools\""
$(GST_PLUGINS_BASE_CFLAGS) $(AM_CFLAGS) -DLOG_PREFIX="\"./tools\""
gst_switch_srv_LDFLAGS = $(GCOV_LFLAGS) $(GST_LIBS) $(GST_BASE_LIBS) \
$(GST_PLUGINS_BASE_LIBS) $(GSTPB_BASE_LIBS)
gst_switch_srv_LDADD = $(GIO_LIBS) $(LIBM)

gst_switch_ui_SOURCES = gstworker.c gstswitchui.c gstvideodisp.c \
gstaudiovisual.c gstswitchclient.c
gst_switch_ui_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) $(GCOV_CFLAGS) \
$(GST_PLUGINS_BASE_CFLAGS) $(X_CFLAGS) $(GTK_CFLAGS) \
$(GST_PLUGINS_BASE_CFLAGS) $(X_CFLAGS) $(GTK_CFLAGS) $(AM_CFLAGS) \
-DLOG_PREFIX="\"./tools\""
gst_switch_ui_LDFLAGS = $(GCOV_LFLAGS) $(GST_LIBS) $(GST_BASE_LIBS) \
$(GST_PLUGINS_BASE_LIBS) $(GSTPB_BASE_LIBS) -lm
Expand Down

0 comments on commit 07566e8

Please sign in to comment.