blob: cc097e11853fba0440508957b9eaabc6f19bcb32 [file] [log] [blame]
Brian Silverman9c614bc2016-02-15 20:20:02 -05001#!/usr/bin/ruby
2
3require 'mkmf'
4
Austin Schuh40c16522018-10-28 20:27:54 -07005unless RUBY_PLATFORM =~ /mswin|mingw/
6 $CFLAGS += " -std=c99 -O3 -DNDEBUG"
7end
8
9
10if RUBY_PLATFORM =~ /linux/
11 # Instruct the linker to point memcpy calls at our __wrap_memcpy wrapper.
12 $LDFLAGS += " -Wl,-wrap,memcpy"
13end
Brian Silverman9c614bc2016-02-15 20:20:02 -050014
15$objs = ["protobuf.o", "defs.o", "storage.o", "message.o",
Austin Schuh40c16522018-10-28 20:27:54 -070016 "repeated_field.o", "map.o", "encode_decode.o", "upb.o",
17 "wrap_memcpy.o"]
Brian Silverman9c614bc2016-02-15 20:20:02 -050018
19create_makefile("google/protobuf_c")