-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile_BSD_NoSQL
83 lines (63 loc) · 1.55 KB
/
Makefile_BSD_NoSQL
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
CC = /usr/bin/gcc
INCLUDE = -I. -Iinclude
# This was in the original, but doesn't appear to be used
#LD = -Llibs
LDFLAGS = -lstdc++
# Uncomment for OpenBSD.
#LDFLAGS += -lm
#CFLAGS = -v -fpermissive -D_LINUX -DNDEBUG -fPIC \
#-Wno-deprecated -static-libgcc
CFLAGS = -v -fpermissive -D_LINUX -DNDEBUG -fPIC \
-Wno-deprecated -shared-libgcc
OPT_FLAGS = -O3 -pipe -s -funroll-loops -fno-rtti
DEBUG_FLAGS = -g -ggdb3
SOURCE_DIR = src
BIN_DIR = bin
#INSTALL_DIR = /usr/bin
INSTALL_DIR = /usr/local/bin
BINARY = bafprp
SOURCES = \
bafdefines.cpp \
baffile.cpp \
bafprp.cpp \
bafrecord.cpp \
base64.cpp \
compat.cpp \
consoleoutput.cpp \
crc32.cpp \
csvoutput.cpp \
date_dt.cpp \
duration_dt.cpp \
shortduration_dt.cpp \
emailoutput.cpp \
field_defs.cpp \
fileoutput.cpp \
ifield.cpp \
mailer.cpp \
nooutput.cpp \
number_dt.cpp \
number_switch_dt.cpp \
output.cpp \
phonenumber_dt.cpp \
record_defs.cpp \
switch_dt.cpp \
time_dt.cpp
OBJECTS := ${SOURCES:%.cpp=${BIN_DIR}/%.o}
${INSTALL_DIR}/bafprp: ${OBJECTS}
if [ ! -d ${BIN_DIR} ]; then mkdir bin; fi
${CC} ${INCLUDE} ${CFLAGS} ${LDFLAGS} -o ${BIN_DIR}/${BINARY} ${OBJECTS}
.for SOURCEFILE in ${SOURCES}
${BIN_DIR}/${SOURCEFILE:S/cpp$/o/}: ${SOURCE_DIR}/${SOURCEFILE}
if [ ! -d ${BIN_DIR} ]; then mkdir bin; fi
${CC} ${INCLUDE} ${CFLAGS} -o $@ -c ${SOURCE_DIR}/${SOURCEFILE}
.endfor
install: ${INSTALL_DIR}/bafprp
cp ${BIN_DIR}/${BINARY} ${INSTALL_DIR}/${BINARY}
mkdir -p /var/log/bafprp
uninstall:
rm -f ${INSTALL_DIR}/${BINARY}
rm -rf /var/log/bafprp
clean:
rm -rf ${BIN_DIR}/*.o
distclean:
rm -rf ${BIN_DIR}