blob: f71db69b706757188e20b2a615aff8057b1f1286 (
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
|
--- swig/ruby/RubyMakefile.mk.orig 2009-04-20 18:43:31.107342741 -0700
+++ swig/ruby/RubyMakefile.mk 2009-04-20 18:45:51.396591741 -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: $(INSTALL_DIR) $(RUBY_MODULES)
$(INSTALL) $(RUBY_MODULES) $(DESTDIR)$(INSTALL_DIR)
$(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 $<
|