summaryrefslogtreecommitdiff
path: root/httpd/Makefile
blob: 2564585fa3c954a608e4c227a3ea6ccd97136c69 (plain)
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
CXX      ?= g++
AR       ?= ar

CXXFLAGS ?= -O2 -Woverloaded-virtual -Wall -fPIC

INCLUDES += -I.

OBJS = dispatcher.o  job.o       regex.o   worker.o \
       listener.o    poller.o    tntnet.o

### 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:

all: libhttpd.a

libhttpd.a: $(OBJS)
	$(AR) r $@ $^

clean:
	@rm -f *.o core* libproctools.a proctest $(DEPFILE)