Browse Source

add a "make debug" option

git.mgm/mediaproxy-ng/2.0
Richard Fuchs 14 years ago
parent
commit
36ce2de3f5
2 changed files with 12 additions and 2 deletions
  1. +11
    -1
      daemon/Makefile
  2. +1
    -1
      daemon/call.c

+ 11
- 1
daemon/Makefile View File

@ -7,12 +7,19 @@ CFLAGS= -g -Wall `pkg-config --cflags glib-2.0` `pcre-config --cflags` -fno-str
CFLAGS+= -I/lib/modules/`uname -r`/build/include/ -I../kernel-module/ CFLAGS+= -I/lib/modules/`uname -r`/build/include/ -I../kernel-module/
CFLAGS+= -D_GNU_SOURCE CFLAGS+= -D_GNU_SOURCE
CFLAGS+= -O2 CFLAGS+= -O2
ifeq ($(REDIS),yes) ifeq ($(REDIS),yes)
CFLAGS+= -I$(LIBREDISDIR) CFLAGS+= -I$(LIBREDISDIR)
else else
CFLAGS+= -DNO_REDIS=1 CFLAGS+= -DNO_REDIS=1
endif endif
ifeq ($(DBG),yes)
CFLAGS+= -D__DEBUG=1
endif
LDFLAGS= `pkg-config --libs glib-2.0` `pcre-config --libs` LDFLAGS= `pkg-config --libs glib-2.0` `pcre-config --libs`
ifeq ($(REDIS),yes) ifeq ($(REDIS),yes)
LDFLAGS+= -L$(LIBREDISDIR) -lhiredis -luuid LDFLAGS+= -L$(LIBREDISDIR) -lhiredis -luuid
endif endif
@ -25,7 +32,7 @@ endif
OBJS= $(SRCS:.c=.o) OBJS= $(SRCS:.c=.o)
.PHONY: all dep clean tests no-redis
.PHONY: all dep clean tests no-redis debug
all: all:
ifeq ($(REDIS),yes) ifeq ($(REDIS),yes)
@ -36,6 +43,9 @@ endif
no-redis: no-redis:
make REDIS=no all make REDIS=no all
debug:
make DBG=yes all
tests: tests:
make aux-test poller-test make aux-test poller-test


+ 1
- 1
daemon/call.c View File

@ -27,7 +27,7 @@
#if 0
#ifdef __DEBUG
#define DBG(x...) mylog(LOG_DEBUG, x) #define DBG(x...) mylog(LOG_DEBUG, x)
#else #else
#define DBG(x...) ((void)0) #define DBG(x...) ((void)0)


Loading…
Cancel
Save