1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
CXX ?= g++
AR ?= ar
CXXFLAGS ?= -O2 -Woverloaded-virtual -Wall -fPIC
CXXFLAGS += `tntnet-config --cxxflags`
### Includes and Defines (add further entries here):
INCLUDES += -I.
### The object files (add further files here):
OBJS = dispatcher.o job.o regex.o worker.o \
listener.o poller.o tntnet.o
### Default rules:
.PHONY: all clean
all: libhttpd.a
### Implicit rules:
%.o: %.cpp
$(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
# Dependencies:
MAKEDEP = $(CXX) -MM -MG
DEPFILE = .dependencies
$(DEPFILE): Makefile
@$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.cpp) > $@
-include $(DEPFILE)
### Targets:
libhttpd.a: $(OBJS)
$(AR) r $@ $^
clean:
@rm -f *.o core* libhttpd.a proctest $(DEPFILE)
|