summaryrefslogtreecommitdiffstats
path: root/extconf.rb
diff options
context:
space:
mode:
authorguy Decoux <ts@moulon.inra.fr>2009-02-28 20:04:27 +0100
committerguy Decoux <ts@moulon.inra.fr>2009-02-28 20:04:27 +0100
commit37e4ca938b10acde659f03f69035dda34c49f437 (patch)
tree8a05683dff205a1edb7721b3a36e77ddfe3cbfd4 /extconf.rb
parent375efb32b274d134db753d1550e7bafcfac44c6e (diff)
downloadmmap-ruby-37e4ca938b10acde659f03f69035dda34c49f437.zip
mmap-ruby-37e4ca938b10acde659f03f69035dda34c49f437.tar.gz
mmap-0.1.3
Diffstat (limited to 'extconf.rb')
-rw-r--r--extconf.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/extconf.rb b/extconf.rb
index 602c79a..32dbd06 100644
--- a/extconf.rb
+++ b/extconf.rb
@@ -1,2 +1,15 @@
require "mkmf"
create_makefile "mmap"
+begin
+ make = open("Makefile", "a")
+ make.print <<-EOT
+
+unknown: $(DLLIB)
+\t@echo "main() {}" > /tmp/a.c
+\t$(CC) -static /tmp/a.c $(OBJS) $(CPPFLAGS) $(DLDFLAGS) -lruby #{CONFIG["LIBS"]} $(LIBS) $(LOCAL_LIBS)
+\t@-rm /tmp/a.c a.out
+ EOT
+ensure
+ make.close
+end
+