Files
mirall/Makefile

36 lines
1015 B
Makefile
Raw Normal View History

2019-05-04 19:00:16 -07:00
FCGI_CXX ?= clang++
FCGI_CXXFLAGS ?= -O3 -std=gnu++2a -Wall -Werror
FCGI_LDLIBS ?= -lgflags -lglog -lpthread
all: example_simple example_clock
objects = sse.o sse_stream.o fastcgi.o fastcgi_conn.o fastcgi_request.o fastcgi_parse.o stream_buffer.o buffer.o
2019-05-04 19:00:16 -07:00
example_simple: example_simple.o $(objects)
$(FCGI_CXX) $(FCGI_CXXFLAGS) -o $@ $+ $(FCGI_LDLIBS)
2019-05-04 19:00:16 -07:00
example_clock: example_clock.o $(objects)
$(FCGI_CXX) $(FCGI_CXXFLAGS) -o $@ $+ $(FCGI_LDLIBS)
%.o: %.cc *.h Makefile
2019-05-04 19:00:16 -07:00
$(FCGI_CXX) $(FCGI_CXXFLAGS) -c -o $@ $<
2019-04-26 05:34:19 +00:00
clean:
2019-05-04 19:00:16 -07:00
rm --force example_simple example_clock fastcgi_conn_afl *.o
afl:
$(MAKE) clean
FCGI_CXX=afl-g++ $(MAKE) afl_int
afl_int: fastcgi_conn_afl
2019-04-28 00:17:32 +00:00
2019-05-04 19:00:16 -07:00
fastcgi_conn_afl: fastcgi_conn_afl.o $(objects)
$(FCGI_CXX) $(FCGI_CXXFLAGS) -o $@ $+ $(FCGI_LDLIBS)
2019-05-04 22:20:01 -07:00
2019-05-04 22:25:33 -07:00
test: test_fastcgi_conn
test_fastcgi_conn: fastcgi_conn_afl
@echo "Running $$(ls afl_state/testcases | wc -l) tests"
2019-05-04 22:20:01 -07:00
for FILE in afl_state/testcases/*; do ./fastcgi_conn_afl < $$FILE; done
@printf '\033[0;32mALL TESTS PASSED\033[0m\n'