ext/zlib/extconf.rb in zlib-1.1.0 vs ext/zlib/extconf.rb in zlib-2.0.0

- old
+ new

@@ -29,13 +29,16 @@ if $mswin or $mingw dll = "zlib1.dll" $extso << dll $cleanfiles << "$(topdir)/#{dll}" << "$(ZIMPLIB)" zmk = "\t$(MAKE) -f $(ZMKFILE) TOP=$(ZSRC)" + zopts = [] if $nmake zmkfile = "$(ZSRC)/win32/Makefile.msc" m = "#{zsrc}/win32/Makefile.msc" + # zopts << "USE_ASM=1" + zopts << "ARCH=#{RbConfig::CONFIG['target_cpu']}" else zmkfile = "$(ZSRC)/win32/Makefile.gcc" m = "#{zsrc}/win32/Makefile.gcc" zmk += " PREFIX=" zmk << CONFIG['CC'][/(.*-)gcc([^\/]*)\z/, 1] @@ -53,12 +56,13 @@ File.write(zmkfile, m) end addconf.push( "ZMKFILE = #{zmkfile}\n", "ZIMPLIB = #{zimplib}\n", + "ZOPTS = #{zopts.join(' ')}\n", "$(TARGET_SO): $(ZIMPLIB)\n", "$(ZIMPLIB):\n", - "#{zmk} $@\n", + "#{zmk} $(ZOPTS) $@\n", "install-so: $(topdir)/#{dll}", "$(topdir)/#{dll}: $(ZIMPLIB)\n", "\t$(Q) $(COPY) #{dll} $(@D)\n", "clean: clean-zsrc\n", "clean-zsrc:\n",