--- swig/ruby/RubyMakefile.mk.orig 2009-08-01 18:54:22.260573234 -0700 +++ swig/ruby/RubyMakefile.mk 2009-08-01 18:59:11.208571244 -0700 @@ -25,7 +25,9 @@ INSTALL_DIR := $(RUBY_EXTENSIONS_DIR)/gdal RUBY_INCLUDE = -I$(RUBY_INCLUDE_DIR) -LDFLAGS += -shared -L$(RUBY_LIB_DIR) +LDFLAGS += -fPIC -DPIC -Xcompiler -shared -L$(RUBY_LIB_DIR) +CFLAGS += -fPIC -DPIC +CXXFLAGS += -fPIC -DPIC RUBY_LIB := -l$(RUBY_SO_NAME) build: $(RUBY_MODULES) @@ -41,17 +43,17 @@ $(INSTALL_DIR): mkdir -p $(DESTDIR)$(INSTALL_DIR) -install: $(INSTALL_DIR) - $(INSTALL) $(RUBY_MODULES) $(DESTDIR)$(INSTALL_DIR) +install: $(INSTALL_DIR) $(RUBY_MODULES) + for f in $(RUBY_MODULES) ; do $(INSTALL) $$f $(DESTDIR)$(INSTALL_DIR) ; done $(RUBY_MODULES): %.so: %_wrap.o $(LD) $(LDFLAGS) $(LIBS) $(GDAL_SLIB_LINK) $(RUBY_LIB) $< -o $@ %.o: %.cpp - $(CXX) $(CFLAGS) $(GDAL_INCLUDE) $(RUBY_INCLUDE) -c $< + $(CXX) $(CXXFLAGS) $(GDAL_INCLUDE) $(RUBY_INCLUDE) -c $< %.o: %.cxx - $(CXX) $(CFLAGS) $(GDAL_INCLUDE) $(RUBY_INCLUDE) -c $< + $(CXX) $(CXXFLAGS) $(GDAL_INCLUDE) $(RUBY_INCLUDE) -c $< %.o: %.c $(CC) $(CFLAGS) $(GDAL_INCLUDE) $(RUBY_INCLUDE) -c $<