-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
61 lines (46 loc) · 1.12 KB
/
Makefile
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
53
54
55
56
57
58
59
60
#!/usr/bin/env make
#encoding: utf-8
CC = g++
RM = rm -f
#CFLAGS = -O2 -g -MMD -MP -Wall -Wextra -Winit-self -Wno-missing-field-initializers -fPIC
CFLAGS = -fPIC
LDFLAGS = -lre2 -licapapi -luriparser -shared
TARGET = libc-icap-xss.so
LIBS =
SRCDIR = src
SRCS = $(shell find $(SRCDIR) -name "*.cpp")
#INCS = $(shell find $(SRCDIR) -name "*.h")
OBJS = $(SRCS:.cpp=.o)
.PHONY: all
all: $(TARGET)
.SUFFIXES: .cpp .o
.cpp.o:
$(CC) $(CFLAGS) -c $< -o $@
$(TARGET): $(OBJS)
$(CC) $(LDFLAGS) -o $@ $^
.PHONY: clean
clean:
-${RM} ${TARGET} ${OBJS}
#flow need graphviz
DOT := dot
DOT_TARGET := flow.dot
DOT_OPTIONS ?= -Tjpg
.PHONY: flow
flow: $(DOT_TARGET)
$(DOT) $(DOT_OPTIONS) $(DOT_TARGET) -o $(DOT_TARGET:.dot=.jpg)
.PHONY: cleanflow
cleanflow:
-$(RM) $(DOT_TARGET:.dot=.jpg)
#doc need doxygen
#DOXYGEN := doxygen
#DOXYFILE := c-icap-xss.Doxyfile
#DOXYGEN_TARGET_SRC := $(SRCDIR)
#DOXYGEN_TARGET := doc
#install:$(TARGET)
#$(TARGET): $(SOURCE)
# $(CC) $(FLAGS) $(CFLAGS) $(LDFLAGS) -o $(TARGET) $< $(INCLUDES)
#doc: $(DOXYGEN_TARGET_SRC) $(DOXYFILE)
# $(DOXYGEN) $(DOXYFILE)
#.PHONY: cleandoc
#cleandoc:
# $(info not-impremented-yet)