kore/Makefile

33 lines
752 B
Makefile
Raw Normal View History

2013-04-17 22:34:27 +02:00
# Kore Makefile
CC=gcc
2013-04-17 22:34:27 +02:00
BIN=kore
S_SRC+= src/kore.c src/buf.c src/config.c src/net.c src/spdy.c src/http.c \
2013-06-26 11:18:32 +02:00
src/accesslog.c src/domain.c src/module.c src/utils.c \
src/worker.c src/connection.c src/mem.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
CFLAGS+=-Wsign-compare -Iincludes -g
LDFLAGS+=-rdynamic -lssl -lcrypto -lz
default:
@echo "Please specify a build target [linux | bsd]"
linux:
@LDFLAGS="-ldl" CFLAGS="-D_GNU_SOURCE=1" S_SRC=src/linux.c make kore
bsd:
@S_SRC=src/bsd.c make kore
2013-04-17 22:34:27 +02:00
2013-06-17 23:54:59 +02:00
kore: $(S_OBJS)
$(CC) $(CFLAGS) $(S_OBJS) $(LDFLAGS) -o $(BIN)
2013-04-17 22:34:27 +02:00
.c.o:
2013-04-17 22:34:27 +02:00
$(CC) $(CFLAGS) -c $< -o $@
clean:
rm -f src/*.o $(BIN)