mirror of https://github.com/lukechilds/node.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
566 B
35 lines
566 B
CFLAGS := -std=c99 -Wall -O2 -pthread
|
|
LDFLAGS := -pthread
|
|
LIBS := -lm
|
|
ifeq ($(shell uname),SunOS)
|
|
LIBS += -lnsl -lsocket -lresolv
|
|
endif
|
|
|
|
SRC := wrk.c aprintf.c stats.c units.c ae.c zmalloc.c http_parser.c tinymt64.c
|
|
BIN := wrk
|
|
|
|
ODIR := obj
|
|
OBJ := $(patsubst %.c,$(ODIR)/%.o,$(SRC))
|
|
|
|
all: $(BIN)
|
|
|
|
clean:
|
|
$(RM) $(BIN) obj/*
|
|
|
|
$(BIN): $(OBJ)
|
|
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
|
|
|
|
$(OBJ): config.h Makefile | $(ODIR)
|
|
|
|
$(ODIR):
|
|
@mkdir $@
|
|
|
|
$(ODIR)/%.o : %.c
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
.PHONY: all clean
|
|
.SUFFIXES:
|
|
.SUFFIXES: .c .o
|
|
|
|
vpath %.c src
|
|
vpath %.h src
|
|
|