[GRASS-SVN] r31519 - in grass/trunk/gui/wxpython: . vdigit

svn_grass at osgeo.org svn_grass at osgeo.org
Sun May 25 16:04:53 EDT 2008


Author: kyngchaos
Date: 2008-05-25 16:04:53 -0400 (Sun, 25 May 2008)
New Revision: 31519

Modified:
   grass/trunk/gui/wxpython/README
   grass/trunk/gui/wxpython/vdigit/Makefile
Log:
fix vdigit compilation on OSX (from dev6 r31518)

Modified: grass/trunk/gui/wxpython/README
===================================================================
--- grass/trunk/gui/wxpython/README	2008-05-25 20:01:29 UTC (rev 31518)
+++ grass/trunk/gui/wxpython/README	2008-05-25 20:04:53 UTC (rev 31519)
@@ -144,6 +144,8 @@
 component. Note that you must configure GRASS with C++ (--with-cxx),
 Python (--with-python) and wxWidgets (--with-wxwidgets) support.
 
+NOTE: There is no need to do the following symlink or ldconfig on OSX.
+
 First, create a symlink to _gdi_.so shared library
 
 $ sudo ln -s `locate _gdi_.so` /usr/local/lib/libgdi.so

Modified: grass/trunk/gui/wxpython/vdigit/Makefile
===================================================================
--- grass/trunk/gui/wxpython/vdigit/Makefile	2008-05-25 20:01:29 UTC (rev 31518)
+++ grass/trunk/gui/wxpython/vdigit/Makefile	2008-05-25 20:04:53 UTC (rev 31519)
@@ -7,13 +7,18 @@
 SHLIB_OBJS := $(patsubst %.cpp, $(OBJDIR)/%.o, $(SOURCES))
 
 EXTRA_CFLAGS = $(SHLIB_CFLAGS) $(GDALCFLAGS) $(PYTHONCFLAGS) $(WXWIDGETSCXXFLAGS)
-EXTRA_LIBS = $(VECTLIB) $(GISLIB) $(GDALLIBS) $(VEDITLIB) $(WXWIDGETSLIB) $(PYTHONLDFLAGS) -lgdi
+EXTRA_LIBS = $(VECTLIB) $(GISLIB) $(GDALLIBS) $(VEDITLIB) $(WXWIDGETSLIB) $(PYTHONLDFLAGS)
+ifeq ($(findstring darwin,$(ARCH)),darwin)
+EXTRA_LIBS := -bundle -undefined dynamic_lookup $(EXTRA_LIBS)
+else
+EXTRA_LIBS := $(EXTRA_LIBS) -lgdi
+endif
 
 LOCAL_HEADERS = digit.h driver.h
 
 ETCDIR = $(ETC)/wxpython
 
-SHLIB = $(OBJDIR)/_$(LIB_NAME)$(SHLIB_SUFFIX)
+SHLIB = $(OBJDIR)/_$(LIB_NAME).so
 
 EXTRA_CLEAN_FILES = $(SHLIB) $(LIB_NAME).i $(LIB_NAME).py $(LIB_NAME)_wrap.cpp
 
@@ -30,7 +35,11 @@
 .NOTPARALLEL: $(LIB_NAME).py $(LIB_NAME)_wrap.cpp
 
 $(SHLIB): $(SHLIB_OBJS)
+ifeq ($(findstring darwin,$(ARCH)),darwin)
+	$(CXX) -o $@ $(LDFLAGS) $^ $(EXTRA_LIBS)
+else
 	$(SHLIB_LD) -o $@ $(LDFLAGS) $^ $(EXTRA_LIBS)
+endif
 
 install_vdigit: $(SHLIB) $(LIB_NAME).py
 	$(INSTALL) $(SHLIB) $(ETCDIR)/vdigit/



More information about the grass-commit mailing list