Browse Source

add appropriate threading compile flags

git.mgm/mediaproxy-ng/2.1
Richard Fuchs 14 years ago
parent
commit
6e474ccfc0
2 changed files with 9 additions and 3 deletions
  1. +8
    -3
      daemon/Makefile
  2. +1
    -0
      daemon/main.c

+ 8
- 3
daemon/Makefile View File

@ -1,5 +1,8 @@
CC= gcc CC= gcc
CFLAGS= -g -Wall `pkg-config --cflags glib-2.0` `pcre-config --cflags` -fno-strict-aliasing
CFLAGS= -g -Wall -pthread -fno-strict-aliasing
CFLAGS+= `pkg-config --cflags glib-2.0`
CFLAGS+= `pkg-config --cflags gthread-2.0`
CFLAGS+= `pcre-config --cflags`
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+= -DMEDIAPROXY_VERSION="\"$(shell dpkg-parsechangelog -l../debian/changelog | awk '/^Version: / {print $$2}')\"" CFLAGS+= -DMEDIAPROXY_VERSION="\"$(shell dpkg-parsechangelog -l../debian/changelog | awk '/^Version: / {print $$2}')\""
@ -11,9 +14,11 @@ else
CFLAGS+= -O2 CFLAGS+= -O2
endif endif
LDFLAGS= `pkg-config --libs glib-2.0` `pcre-config --libs`
LDFLAGS= -ldl -rdynamic
LDFLAGS+= `pkg-config --libs glib-2.0`
LDFLAGS+= `pkg-config --libs gthread-2.0`
LDFLAGS+= `pcre-config --libs`
LDFLAGS+= `xmlrpc-c-config client --libs` LDFLAGS+= `xmlrpc-c-config client --libs`
LDFLAGS+= -ldl -rdynamic
SRCS= main.c kernel.c poller.c aux.c control.c streambuf.c call.c control_udp.c redis.c SRCS= main.c kernel.c poller.c aux.c control.c streambuf.c call.c control_udp.c redis.c
OBJS= $(SRCS:.c=.o) OBJS= $(SRCS:.c=.o)


+ 1
- 0
daemon/main.c View File

@ -274,6 +274,7 @@ int main(int argc, char **argv) {
const char **strp; const char **strp;
options(&argc, &argv); options(&argc, &argv);
g_thread_init(NULL);
signals(); signals();
resources(); resources();


Loading…
Cancel
Save