File: Makefile

package info (click to toggle)
haproxy 2.2.9-2%2Bdeb11u6
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 16,012 kB
  • sloc: ansic: 166,229; javascript: 2,442; sh: 1,782; xml: 1,754; makefile: 1,068; python: 1,048; perl: 168
file content (52 lines) | stat: -rw-r--r-- 1,016 bytes parent folder | download
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
44
45
46
47
48
49
50
51
52
DESTDIR    =
PREFIX     = /usr/local
BINDIR     = $(PREFIX)/bin

CC ?= gcc
LD = $(CC)

ifeq ($(MODSEC_INC),)
MODSEC_INC := modsecurity-2.9.1/INSTALL/include
endif

ifeq ($(MODSEC_LIB),)
MODSEC_LIB := modsecurity-2.9.1/INSTALL/lib
endif

ifeq ($(APACHE2_INC),)
APACHE2_INC := /usr/include/apache2
endif

ifeq ($(APR_INC),)
APR_INC := /usr/include/apr-1.0
endif

ifeq ($(LIBXML_INC),)
LIBXML_INC := /usr/include/libxml2
endif

ifeq ($(EVENT_LIB),)
EVENT_LIB := -levent
endif

ifeq ($(EVENT_INC),)
EVENT_INC := /usr/include
endif

CFLAGS  += -g -Wall -pthread
INCS += -I../../include -I$(MODSEC_INC) -I$(APACHE2_INC) -I$(APR_INC) -I$(LIBXML_INC) -I$(EVENT_INC)
LIBS += -lpthread  $(EVENT_LIB) -levent_pthreads -lcurl -lapr-1 -laprutil-1 -lxml2 -lpcre -lyajl

OBJS = spoa.o modsec_wrapper.o

modsecurity: $(OBJS)
	$(LD) $(LDFLAGS) -o $@ $^ $(MODSEC_LIB)/standalone.a $(LIBS)

install: modsecurity
	install modsecurity $(DESTDIR)$(BINDIR)

clean:
	rm -f modsecurity $(OBJS)

%.o:	%.c
	$(CC) $(CFLAGS) $(INCS) -c -o $@ $<