From 691ae68db759b6cbab5a4c1a9cee4dc472d4435f Mon Sep 17 00:00:00 2001 From: Tom Black Date: Wed, 3 Oct 2018 20:38:37 -0700 Subject: Add CFLAGS when Raspberry Pi --- ext/ruby2d/extconf.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ext/ruby2d/extconf.rb b/ext/ruby2d/extconf.rb index fb9d0b4..d3ddac0 100644 --- a/ext/ruby2d/extconf.rb +++ b/ext/ruby2d/extconf.rb @@ -74,7 +74,10 @@ end check_s2d_version # Add flags -$CFLAGS << ' -std=c11 -I/usr/local/include' +$CFLAGS << ' -std=c11 -I/usr/local/include' +if `cat /etc/os-release` =~ /raspbian/ # Raspberry Pi + $CFLAGS << ' -I/opt/vc/include' +end $LDFLAGS << ' ' << `bash simple2d --libs` $LDFLAGS.gsub!(/\n/, ' ') # remove newlines in flags, they cause problems -- cgit v1.2.3