summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorTom Black <[email protected]>2018-10-03 20:38:37 -0700
committerTom Black <[email protected]>2018-10-03 20:38:37 -0700
commit691ae68db759b6cbab5a4c1a9cee4dc472d4435f (patch)
tree7e745718e77308a64b6333e3e1e25ce0e028bfc9
parent04c5441976a4bc90a076e97a4d30aef26d8477d4 (diff)
downloadruby2d-691ae68db759b6cbab5a4c1a9cee4dc472d4435f.tar.gz
ruby2d-691ae68db759b6cbab5a4c1a9cee4dc472d4435f.zip
Add CFLAGS when Raspberry Pi
-rw-r--r--ext/ruby2d/extconf.rb5
1 files changed, 4 insertions, 1 deletions
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