code-intelligence.com/cifuzz@v0.40.0/examples/other/Makefile (about) 1 CXXFLAGS += -std=c++11 2 3 all: main 4 5 clean: 6 rm -f *.o *.a *.so a.out my_fuzz_test 7 8 libexplore.so: src/explore_me.cpp src/explore_me.h 9 ${CXX} ${CXXFLAGS} -shared -fpic -o libexplore.so $< 10 11 explore_me.o: src/explore_me.cpp src/explore_me.h 12 ${CXX} ${CXXFLAGS} -fpic $< -c 13 14 explore_me.a: explore_me.o 15 ar rv api.a api.o 16 17 main: explore_me.o 18 ${CXX} ${CXXFLAGS} explore_me.o main.cpp 19 20 my_fuzz_test: libexplore.so 21 @echo "Building $@" 22 # The FUZZ_TEST_CFLAGS, FUZZ_TEST_CXXFLAGS, and FUZZ_TEST_LDFLAGS 23 # environment variables are set by cifuzz when it executes the build 24 # command. Those must be passed to the compiler and linker when 25 # compiling and/or linking the fuzz test itself (compiling and 26 # linking is done in a single invocation here, so we pass compile 27 # and linker flags to $CXX in this case). 28 ${CXX} ${CXXFLAGS} ${FUZZ_TEST_CXXFLAGS} ${FUZZ_TEST_LDFLAGS} -o $@ $@.cpp -Wl,-rpath '-Wl,$$ORIGIN' -L. -lexplore