summaryrefslogtreecommitdiff
blob: b98f684035269c1f1fee04825a7ab67993a4cc7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
diff -urN gdal-1.9.1.old//swig/ruby/RubyMakefile.mk gdal-1.9.1/swig/ruby/RubyMakefile.mk
--- gdal-1.9.1.old//swig/ruby/RubyMakefile.mk	2012-05-25 19:54:12.073974979 +0200
+++ gdal-1.9.1/swig/ruby/RubyMakefile.mk	2012-05-25 19:56:56.014977833 +0200
@@ -37,13 +37,13 @@
 
 ifeq ("$(shell uname -s)", "Darwin")
 RUBY_MODULES=$(RUBY_MODULES_MAC)
-LDFLAGS += -Xcompiler -bundle -L$(RUBY_LIB_DIR)
-RUBY_LIB := -l$(RUBY_SO_NAME)
 else
 RUBY_MODULES=$(RUBY_MODULES_LIN)
-LDFLAGS += -Xcompiler -shared -L$(RUBY_LIB_DIR)
-RUBY_LIB := -l$(RUBY_SO_NAME)
 endif
+LDFLAGS += -fPIC -DPIC -shared -L$(RUBY_LIB_DIR)
+CFLAGS += -fPIC -DPIC
+CXXFLAGS += -fPIC -DPIC
+RUBY_LIB := -l$(RUBY_SO_NAME)
 
 build: $(RUBY_MODULES)
 
@@ -59,7 +59,7 @@
 $(INSTALL_DIR):
 	mkdir -p $(DESTDIR)$(INSTALL_DIR)
 
-install: $(INSTALL_DIR)
+install: $(INSTALL_DIR) $(RUBY_MODULES)
 	for i in $(RUBY_MODULES) ; do $(INSTALL) $$i $(DESTDIR)$(INSTALL_DIR) ; done
 
 $(RUBY_MODULES_MAC): %.bundle: %_wrap.o
@@ -69,10 +69,10 @@
 	$(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 $<