Sha256: 258ad70e1f1a436ffa64cfcfe8fb69dcbc1d8a57984968c24e3c384aa0220d43

Contents?: true

Size: 1.67 KB

Versions: 24

Compression:

Stored size: 1.67 KB

Contents

CC?=gcc
AR?=ar

CPPFLAGS += -I.
CPPFLAGS_DEBUG = $(CPPFLAGS) -DHTTP_PARSER_STRICT=1 -DHTTP_PARSER_DEBUG=1
CPPFLAGS_DEBUG += $(CPPFLAGS_DEBUG_EXTRA)
CPPFLAGS_FAST = $(CPPFLAGS) -DHTTP_PARSER_STRICT=0 -DHTTP_PARSER_DEBUG=0
CPPFLAGS_FAST += $(CPPFLAGS_FAST_EXTRA)

CFLAGS += -Wall -Wextra -Werror
CFLAGS_DEBUG = $(CFLAGS) -O0 -g $(CFLAGS_DEBUG_EXTRA)
CFLAGS_FAST = $(CFLAGS) -O3 $(CFLAGS_FAST_EXTRA)
CFLAGS_LIB = $(CFLAGS_FAST) -fPIC

test: test_g test_fast
	./test_g
	./test_fast

test_g: http_parser_g.o test_g.o
	$(CC) $(CFLAGS_DEBUG) $(LDFLAGS) http_parser_g.o test_g.o -o $@

test_g.o: test.c http_parser.h Makefile
	$(CC) $(CPPFLAGS_DEBUG) $(CFLAGS_DEBUG) -c test.c -o $@

http_parser_g.o: http_parser.c http_parser.h Makefile
	$(CC) $(CPPFLAGS_DEBUG) $(CFLAGS_DEBUG) -c http_parser.c -o $@

test_fast: http_parser.o test.o http_parser.h
	$(CC) $(CFLAGS_FAST) $(LDFLAGS) http_parser.o test.o -o $@

test.o: test.c http_parser.h Makefile
	$(CC) $(CPPFLAGS_FAST) $(CFLAGS_FAST) -c test.c -o $@

http_parser.o: http_parser.c http_parser.h Makefile
	$(CC) $(CPPFLAGS_FAST) $(CFLAGS_FAST) -c http_parser.c

test-run-timed: test_fast
	while(true) do time ./test_fast > /dev/null; done

test-valgrind: test_g
	valgrind ./test_g

libhttp_parser.o: http_parser.c http_parser.h Makefile
	$(CC) $(CPPFLAGS_FAST) $(CFLAGS_LIB) -c http_parser.c -o libhttp_parser.o

library: libhttp_parser.o
	$(CC) -shared -o libhttp_parser.so libhttp_parser.o

package: http_parser.o
	$(AR) rcs libhttp_parser.a http_parser.o

tags: http_parser.c http_parser.h test.c
	ctags $^

clean:
	rm -f *.o *.a test test_fast test_g http_parser.tar tags libhttp_parser.so libhttp_parser.o

.PHONY: clean package test-run test-run-timed test-valgrind

Version data entries

24 entries across 17 versions & 4 rubygems

Version Path
fluent-plugin-google-cloud-logging-on-prem-0.1.0 vendor/ruby/3.1.0/gems/http_parser.rb-0.8.0/ext/ruby_http_parser/vendor/http-parser-java/Makefile
http_parser.rb-0.8.0 ext/ruby_http_parser/vendor/http-parser-java/Makefile
http_parser.rb-0.7.0 ext/ruby_http_parser/vendor/http-parser-java/Makefile
fluent-plugin-detect-memb-exceptions-0.0.2 vendor/bundle/ruby/2.0.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/Makefile
fluent-plugin-detect-memb-exceptions-0.0.2 vendor/bundle/ruby/2.0.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser/Makefile
fluent-plugin-detect-memb-exceptions-0.0.1 vendor/bundle/ruby/2.0.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/Makefile
fluent-plugin-detect-memb-exceptions-0.0.1 vendor/bundle/ruby/2.0.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser/Makefile
midori_http_parser-0.6.1.3 ext/ruby_http_parser/vendor/http-parser-java/Makefile
midori_http_parser-0.6.1.3-java ext/ruby_http_parser/vendor/http-parser-java/Makefile
midori_http_parser-0.6.1.2-java ext/ruby_http_parser/vendor/http-parser-java/Makefile
midori_http_parser-0.6.1.2 ext/ruby_http_parser/vendor/http-parser-java/Makefile
midori_http_parser-0.6.1.1-java ext/ruby_http_parser/vendor/http-parser-java/Makefile
midori_http_parser-0.6.1.1 ext/ruby_http_parser/vendor/http-parser-java/Makefile
midori_http_parser-0.6.1 ext/ruby_http_parser/vendor/http-parser-java/Makefile
http_parser.rb-0.6.0-java ext/ruby_http_parser/vendor/http-parser/Makefile
http_parser.rb-0.6.0-java ext/ruby_http_parser/vendor/http-parser-java/Makefile
http_parser.rb-0.6.0 ext/ruby_http_parser/vendor/http-parser-java/Makefile
http_parser.rb-0.6.0 ext/ruby_http_parser/vendor/http-parser/Makefile
http_parser.rb-0.6.0.beta.2-java ext/ruby_http_parser/vendor/http-parser-java/Makefile
http_parser.rb-0.6.0.beta.2-java ext/ruby_http_parser/vendor/http-parser/Makefile