Skip to content
Snippets Groups Projects
Commit f8030a27 authored by Sebastian Staffa's avatar Sebastian Staffa
Browse files

Fix makefile

parent 5a8c1609
No related branches found
No related tags found
No related merge requests found
CXXFLAGS=-std=c++17
default: main
default: bin/main
main: src/calculator.cpp
bin/main: src/calculator.cpp src/main.cpp
mkdir -p bin
$(CXX) $(CXXFLAGS) -o bin/main src/calculator.cpp src/main.cpp
$(CXX) $(CXXFLAGS) -o $@ $^
fuzz_main: src/calculator.cpp
bin/fuzz_main: src/calculator.cpp src/main.cpp
mkdir -p bin
afl-g++ $(CXXFLAGS) -o bin/fuzz_main src/calculator.cpp src/main.cpp
afl-g++ $(CXXFLAGS) -o $@ $^
fuzz: fuzz_main
fuzz: bin/fuzz_main
rm -rf test/out
afl-fuzz -i test/in -o test/out -- ./bin/fuzz_main
clean:
rm -rf bin test/out
rm -rf main fuzz_main out
rm -rf bin
tests: test/main.test.cpp
bin/tests: test/main.test.cpp src/main.cpp
mkdir -p bin
$(CXX) $(CXXFLAGS) -o bin/tests src/main.cpp test/main.test.cpp
$(CXX) $(CXXFLAGS) -o $@ $^
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment