2013-04-17 22:34:27 +02:00
|
|
|
# Kore Makefile
|
|
|
|
|
2013-04-21 20:21:46 +02:00
|
|
|
CC=gcc
|
2013-04-17 22:34:27 +02:00
|
|
|
BIN=kore
|
|
|
|
|
2013-07-06 20:55:22 +02:00
|
|
|
S_SRC+= src/kore.c src/accesslog.c src/buf.c src/config.c src/connection.c \
|
2013-07-15 10:13:36 +02:00
|
|
|
src/domain.c src/http.c src/mem.c src/module.c src/net.c src/pool.c \
|
2013-11-09 16:21:52 +01:00
|
|
|
src/spdy.c src/validator.c src/utils.c src/worker.c src/zlib_dict.c
|
2013-04-17 22:34:27 +02:00
|
|
|
S_OBJS= $(S_SRC:.c=.o)
|
|
|
|
|
|
|
|
CFLAGS+=-Wall -Wstrict-prototypes -Wmissing-prototypes
|
|
|
|
CFLAGS+=-Wmissing-declarations -Wshadow -Wpointer-arith -Wcast-qual
|
2013-06-17 23:39:17 +02:00
|
|
|
CFLAGS+=-Wsign-compare -Iincludes -g
|
2013-06-26 19:05:54 +02:00
|
|
|
LDFLAGS+=-rdynamic -lssl -lcrypto -lz
|
2013-06-17 23:39:17 +02:00
|
|
|
|
2013-11-16 13:30:47 +01:00
|
|
|
ifneq (, "$(DEBUG)")
|
|
|
|
CFLAGS+=-DKORE_DEBUG
|
|
|
|
endif
|
|
|
|
|
2013-11-16 12:41:58 +01:00
|
|
|
OSNAME=$(shell uname -s | sed -e 's/[-_].*//g' | tr A-Z a-z)
|
|
|
|
ifeq ("$(OSNAME)", "darwin")
|
|
|
|
CFLAGS+=-I/opt/local/include/
|
|
|
|
LDFLAGS+=-L/opt/local/lib
|
|
|
|
S_SRC+=src/bsd.c
|
|
|
|
else ifeq ("$(OSNAME)", "linux")
|
|
|
|
CFLAGS+=-D_GNU_SOURCE=1
|
|
|
|
LDFLAGS+=-ldl
|
|
|
|
S_SRC+=src/linux.c
|
|
|
|
else
|
|
|
|
S_SRC+=src/bsd.c
|
|
|
|
endif
|
|
|
|
|
|
|
|
all: $(S_OBJS)
|
2013-04-28 13:55:47 +02:00
|
|
|
$(CC) $(CFLAGS) $(S_OBJS) $(LDFLAGS) -o $(BIN)
|
2013-04-17 22:34:27 +02:00
|
|
|
|
2013-06-17 23:39:17 +02:00
|
|
|
.c.o:
|
2013-04-17 22:34:27 +02:00
|
|
|
$(CC) $(CFLAGS) -c $< -o $@
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f src/*.o $(BIN)
|
2013-11-16 12:41:58 +01:00
|
|
|
|
|
|
|
.PHONY: clean
|