[GRASS-SVN] r36244 - in grass/branches/develbranch_6: include/Make lib/gis

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Mar 8 04:48:21 EDT 2009


Author: neteler
Date: 2009-03-08 04:48:21 -0400 (Sun, 08 Mar 2009)
New Revision: 36244

Added:
   grass/branches/develbranch_6/lib/gis/fmode.c
Modified:
   grass/branches/develbranch_6/include/Make/Shlib.make
   grass/branches/develbranch_6/lib/gis/Makefile
Log:
Glynn: fix compilation on MingW

Modified: grass/branches/develbranch_6/include/Make/Shlib.make
===================================================================
--- grass/branches/develbranch_6/include/Make/Shlib.make	2009-03-08 06:19:00 UTC (rev 36243)
+++ grass/branches/develbranch_6/include/Make/Shlib.make	2009-03-08 08:48:21 UTC (rev 36244)
@@ -4,8 +4,12 @@
 
 # Object that calls _setfmode(_O_BINARY) which must be linked to each DLL on Windows
 ifdef MINGW
+ifneq ($(SHLIB_NAME),$(DATETIME_LIBNAME))
+ifneq ($(SHLIB_NAME),$(GIS_LIBNAME))
   DLLMAIN_OBJ = $(MODULE_TOPDIR)/lib/gis/$(OBJDIR)/dllmain.o
 endif
+endif
+endif
 
 CFLAGS += $(SHLIB_CFLAGS) $(NLS_CFLAGS)
 LDFLAGS += $(SHLIB_LDFLAGS)

Modified: grass/branches/develbranch_6/lib/gis/Makefile
===================================================================
--- grass/branches/develbranch_6/lib/gis/Makefile	2009-03-08 06:19:00 UTC (rev 36243)
+++ grass/branches/develbranch_6/lib/gis/Makefile	2009-03-08 08:48:21 UTC (rev 36244)
@@ -8,8 +8,13 @@
 DATASRC = ellipse.table datum.table datumtransform.table FIPS.code state27 state83 projections gui.tcl
 EXTRA_INC = $(ZLIBINCPATH)
 
+include $(MODULE_TOPDIR)/include/Make/Platform.make
+
 LIB_OBJS := $(subst .c,.o,$(wildcard *.c))
 LIB_OBJS := $(filter-out fmode.o dllmain.o,$(LIB_OBJS))
+ifneq ($(MINGW),)
+LIB_OBJS := $(LIB_OBJS) dllmain.o fmode.o
+endif
 
 include $(MODULE_TOPDIR)/include/Make/Lib.make
 include $(MODULE_TOPDIR)/include/Make/Doxygen.make
@@ -40,7 +45,7 @@
 
 endif
 
-default: $(DLLMAIN_OBJ) lib $(FMODE_OBJ) $(DATAFILES) $(COLORFILES) $(ETC)/colors.desc $(ETC)/element_list
+default: lib $(FMODE_OBJ) $(DATAFILES) $(COLORFILES) $(ETC)/colors.desc $(ETC)/element_list
 
 $(ETC)/colors:
 	$(MKDIR) $@

Added: grass/branches/develbranch_6/lib/gis/fmode.c
===================================================================
--- grass/branches/develbranch_6/lib/gis/fmode.c	                        (rev 0)
+++ grass/branches/develbranch_6/lib/gis/fmode.c	2009-03-08 08:48:21 UTC (rev 36244)
@@ -0,0 +1,4 @@
+#include <stdlib.h>
+#include <fcntl.h>
+#undef _fmode
+int _fmode = _O_BINARY;


Property changes on: grass/branches/develbranch_6/lib/gis/fmode.c
___________________________________________________________________
Name: svn:eol-style
   + native



More information about the grass-commit mailing list