-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
28 lines (21 loc) · 915 Bytes
/
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
CXXFLAGS += -std=c++11
all: main
clean:
rm -f *.o *.a *.so a.out my_fuzz_test
libexplore.so: src/explore_me.cpp src/explore_me.h
${CXX} ${CXXFLAGS} -shared -fpic -o libexplore.so $<
explore_me.o: src/explore_me.cpp src/explore_me.h
${CXX} ${CXXFLAGS} -fpic $< -c
explore_me.a: explore_me.o
ar rv api.a api.o
main: explore_me.o
${CXX} ${CXXFLAGS} explore_me.o main.cpp
my_fuzz_test: libexplore.so
@echo "Building $@"
# The FUZZ_TEST_CFLAGS, FUZZ_TEST_CXXFLAGS, and FUZZ_TEST_LDFLAGS
# environment variables are set by cifuzz when it executes the build
# command. Those must be passed to the compiler and linker when
# compiling and/or linking the fuzz test itself (compiling and
# linking is done in a single invocation here, so we pass compile
# and linker flags to $CXX in this case).
${CXX} ${CXXFLAGS} ${FUZZ_TEST_CXXFLAGS} ${FUZZ_TEST_LDFLAGS} -o $@ [email protected] -Wl,-rpath '-Wl,$$ORIGIN' -L. -lexplore