extconf.rb 447 B

12345678910111213141516171819
  1. #!/usr/bin/ruby
  2. require 'mkmf'
  3. unless RUBY_PLATFORM =~ /mswin|mingw/
  4. $CFLAGS += " -std=c99 -O3 -DNDEBUG"
  5. end
  6. if RUBY_PLATFORM =~ /linux/
  7. # Instruct the linker to point memcpy calls at our __wrap_memcpy wrapper.
  8. $LDFLAGS += " -Wl,-wrap,memcpy"
  9. end
  10. $objs = ["protobuf.o", "defs.o", "storage.o", "message.o",
  11. "repeated_field.o", "map.o", "encode_decode.o", "upb.o",
  12. "wrap_memcpy.o"]
  13. create_makefile("google/protobuf_c")