-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
29 lines (18 loc) · 1.08 KB
/
Copy pathmakefile
File metadata and controls
29 lines (18 loc) · 1.08 KB
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
NAME=mrsh
SOURCE=src/util.c src/hashing.c src/bloomfilter.c src/fingerprint.c src/fingerprintList.c src/helper.c
HEADER=header/util.h header/hashing.h header/bloomfilter.h header/fingerprint.h header/fingerprintList.h header/helper.h
CMD_TARGET=src/main.c
LIB_NAME=bindings/mrshw/libmrsh.so
LIB_WRAPPER=bindings/glue/mrsh_glue.c
all: debug
mrsh: ${SOURCE} ${HEADER} ${CMD_TARGET}
gcc -w -std=c99 -O3 -D_BSD_SOURCE -lcrypto -o ${NAME} ${CMD_TARGET} ${SOURCE} -lm
debug: ${SOURCE} ${HEADER} ${CMD_TARGET}
gcc -w -ggdb -std=c99 -O0 -D_BSD_SOURCE -lcrypto -o ${NAME} ${CMD_TARGET} ${SOURCE} -lm
net: ${SOURCE} ${HEADER} ${CMD_TARGET}
gcc -w -std=c99 -O3 -D_BSD_SOURCE -lcrypto -o ${NAME} ${CMD_TARGET} ${SOURCE} -Dnetwork -lm
lib: ${SOURCE} ${HEADER}
gcc -w -Iheader -std=c99 -O3 -fPIC -shared -D_BSD_SOURCE -fvisibility=default -lcrypto -o ${LIB_NAME} ${SOURCE} ${LIB_WRAPPER} -lm
clean:
rm -f ${NAME} *.o ${LIB_NAME}
# for DT_DIR feature to work, need to have the _BSD_SOURCE feature test macro defined. These are not standard, and GCC does not define the macro when compiling for C99.