mirror of https://github.com/sipwise/mediator.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
626 B
35 lines
626 B
BIN=mediator
|
|
|
|
CC := gcc
|
|
|
|
CFLAGS := -g -Wall -O3 -std=c99 -D_POSIX_SOURCE -D_GNU_SOURCE
|
|
CFLAGS += `pkg-config glib-2.0 --cflags`
|
|
CFLAGS += `pkg-config --cflags gthread-2.0`
|
|
CFLAGS += `mysql_config --cflags`
|
|
CFLAGS += -pthread
|
|
#CFLAGS += -DWITH_TIME_CALC
|
|
|
|
LDFLAGS := -pthread
|
|
LDFLAGS += `pkg-config glib-2.0 --libs`
|
|
LDFLAGS += `pkg-config --libs gthread-2.0`
|
|
LDFLAGS += `mysql_config --libs_r`
|
|
|
|
CFILES := $(wildcard *.c)
|
|
OFILES := $(CFILES:.c=.o)
|
|
|
|
.PHONY: $(BIN) all
|
|
|
|
all: $(BIN)
|
|
|
|
$(BIN): $(OFILES)
|
|
$(CC) -o $@ $^ $(CFLAGS) $(LDFLAGS)
|
|
|
|
%.o: %.c
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
clean:
|
|
rm -f $(OFILES)
|
|
rm -f core*
|
|
rm -f $(BIN)
|
|
|