blob: 7853397cd15edd7cc6f36a06381dbb9b0438d72e [file] [log] [blame]
Thierry FOURNIERa5ec06d2017-04-10 23:47:23 +02001DESTDIR =
2PREFIX = /usr/local
3BINDIR = $(PREFIX)/bin
4
5CC = gcc
6LD = $(CC)
7
8ifeq ($(MODSEC_INC),)
9MODSEC_INC := modsecurity-2.9.1/INSTALL/include
10endif
11
12ifeq ($(MODSEC_LIB),)
13MODSEC_LIB := modsecurity-2.9.1/INSTALL/lib
14endif
15
16ifeq ($(APACHE2_INC),)
17APACHE2_INC := /usr/include/apache2
18endif
19
20ifeq ($(APR_INC),)
21APR_INC := /usr/include/apr-1.0
22endif
23
24ifeq ($(LIBXML_INC),)
25LIBXML_INC := /usr/include/libxml2
26endif
27
28CFLAGS = -g -Wall -pthread
David CARLIER8abbd3d2017-05-03 10:23:08 +010029LDFLAGS += -lpthread -levent -levent_pthreads -lcurl -lapr-1 -laprutil-1 -lxml2 -lpcre -lyajl
Thierry FOURNIERa5ec06d2017-04-10 23:47:23 +020030INCS += -I../../include -I../../ebtree -I$(MODSEC_INC) -I$(APACHE2_INC) -I$(APR_INC) -I$(LIBXML_INC)
31LIBS =
32
33OBJS = spoa.o modsec_wrapper.o
34
35modsecurity: $(OBJS)
36 $(LD) $(LDFLAGS) $(LIBS) -o $@ $^ $(MODSEC_LIB)/standalone.a
37
38install: modsecurity
39 install modsecurity $(DESTDIR)$(BINDIR)
40
41clean:
42 rm -f modsecurity $(OBJS)
43
44%.o: %.c
45 $(CC) $(CFLAGS) $(INCS) -c -o $@ $<