[tuhopuu-devel] Makefiles for uv unwrapping

Brecht Van Lommel tuhopuu-devel@blender.org
15 May 2004 18:55:46 +0000


--=-/uHEwYMbcyv4JmLL+gVJ
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hi all,

I've created and modified some NAN Makefiles for building the LSCM UV
unwrapping, but I haven't committed them yet. I'm not quite confident
about editing Makefiles, so I have attached a patch, so they can be
tested first.

For the building of SuperLU in extern/, I changed the toplevel and
extern/ Makefile. With my patch, it always enters extern/, and checks
there if ODE (and SuperLU) need to be built, instead of doing this in
the toplevel Makefile. I hope this is ok?

LSCM UV unwrapping is disabled by default, and it can be enabled by
setting UNWRAPPER=true in user-def.mk, which will automatically lead to
the compilation of SuperLU, OpenNL and the unwrapping code.

Cheers,
Brecht



--=-/uHEwYMbcyv4JmLL+gVJ
Content-Disposition: attachment; filename=unwrapping_makefile_patch.txt
Content-Type: text/plain; name=unwrapping_makefile_patch.txt; charset=
Content-Transfer-Encoding: 7bit

Index: Makefile
===================================================================
RCS file: /cvsroot/tuhopuu/tuhopuu2/Makefile,v
retrieving revision 1.12
diff -u -r1.12 Makefile
--- Makefile	4 May 2004 21:45:05 -0000	1.12
+++ Makefile	15 May 2004 16:16:26 -0000
@@ -68,13 +68,9 @@
 INTERNSUBDIRS=string guardedalloc memutil moto container action bmfont bsp decimation ghost iksolver keymaker
 
 ifeq ($(FREE_WINDOWS),true)
-    DIRS ?= dlltool intern source po
+    DIRS ?= dlltool extern intern source po
 else
-    ifeq ($(NAN_KESTERJI),true)
-        DIRS ?= intern source po
-    else
-        DIRS ?= extern intern source po
-    endif
+    DIRS ?= extern intern source po
 endif
 
 include source/nan_subdirs.mk
Index: user-def.mk.defaults
===================================================================
RCS file: /cvsroot/tuhopuu/tuhopuu2/user-def.mk.defaults,v
retrieving revision 1.7
diff -u -r1.7 user-def.mk.defaults
--- user-def.mk.defaults	8 Dec 2003 00:35:57 -0000	1.7
+++ user-def.mk.defaults	15 May 2004 16:16:27 -0000
@@ -89,3 +89,8 @@
 #
 # export REDHAT_WEIRDNESS=true
 
+# Enable building of LSCM UV unwrapping
+# This will also result in building intern/opennl and extern/superlu
+#
+# export UNWRAPPER=true
+
Index: extern/Makefile
===================================================================
RCS file: /cvsroot/tuhopuu/tuhopuu2/extern/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- extern/Makefile	11 Nov 2003 20:03:56 -0000	1.3
+++ extern/Makefile	15 May 2004 16:16:27 -0000
@@ -35,8 +35,16 @@
 SOURCEDIR = extern
 DIR = $(OCGDIR)/extern
 
-ifneq ($(NO_GAMEENGINE),true)
-	DIRS = ode
+ifneq ($(FREE_WINDOWS),true)
+    ifneq ($(NO_GAMEENGINE),true)
+        ifeq ($(NAN_KESTERJI),true)
+            DIRS += ode
+        endif
+    endif
+endif
+
+ifeq ($(UNWRAPPER),true)
+    DIRS += superlu
 endif
 
 include nan_subdirs.mk
Index: extern/superlu/Makefile
===================================================================
RCS file: extern/superlu/Makefile
diff -N extern/superlu/Makefile
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ extern/superlu/Makefile	15 May 2004 16:16:27 -0000
@@ -0,0 +1,53 @@
+#
+# $Id$
+#
+# ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version. The Blender
+# Foundation also sells licenses for use in proprietary software under
+# the Blender License.  See http://www.blender.org/BL/ for information
+# about this.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+# The Original Code is Copyright (C) 2002 by Hans Lambermont
+# All rights reserved.
+#
+# The Original Code is: all of this file.
+#
+# Contributor(s): none yet.
+#
+# ***** END GPL/BL DUAL LICENSE BLOCK *****
+
+include nan_definitions.mk
+
+LIBNAME = superlu
+SOURCEDIR = extern/$(LIBNAME)
+DIR = $(OCGDIR)/$(SOURCEDIR)
+
+include nan_subdirs.mk
+
+include nan_compile.mk
+
+CCFLAGS += $(NAN_LEVEL_2_CPP_WARNINGS) -DAdd_ -DNO_TIMER
+
+install: all 
+	@[ -d $(NAN_SUPERLU) ] || mkdir $(NAN_SUPERLU)
+	@[ -d $(NAN_SUPERLU)/include ] || mkdir $(NAN_SUPERLU)/include
+	@[ -d $(NAN_SUPERLU)/lib ] || mkdir $(NAN_SUPERLU)/lib
+	@../../intern/tools/cpifdiff.sh $(DIR)/libsuperlu.a $(NAN_SUPERLU)/lib/
+ifeq ($(OS),darwin)
+	ranlib $(NAN_SUPERLU)/lib/libsuperlu.a
+endif
+	@../../intern/tools/cpifdiff.sh *.h $(NAN_SUPERLU)/include/
+
Index: intern/Makefile
===================================================================
RCS file: /cvsroot/tuhopuu/tuhopuu2/intern/Makefile,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 Makefile
--- intern/Makefile	15 Feb 2004 01:14:20 -0000	1.1.1.2
+++ intern/Makefile	15 May 2004 16:16:27 -0000
@@ -37,6 +37,10 @@
 ALLDIRS = string ghost guardedalloc bmfont moto container memutil
 ALLDIRS += decimation iksolver bsp SoundSystem
 
+ifeq ($(UNWRAPPER), true)
+    ALLDIRS += opennl
+endif
+
 all::
 	@for i in $(ALLDIRS); do \
 	    echo "====> $(MAKE) $@ in $(SOURCEDIR)/$$i" ;\
Index: intern/opennl/Makefile
===================================================================
RCS file: intern/opennl/Makefile
diff -N intern/opennl/Makefile
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ intern/opennl/Makefile	15 May 2004 16:16:28 -0000
@@ -0,0 +1,55 @@
+#
+# $Id$
+#
+# ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version. The Blender
+# Foundation also sells licenses for use in proprietary software under
+# the Blender License.  See http://www.blender.org/BL/ for information
+# about this.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+# All rights reserved.
+#
+# The Original Code is: all of this file.
+#
+# Contributor(s): Hans Lambermont
+#
+# ***** END GPL/BL DUAL LICENSE BLOCK *****
+# opennl main makefile.
+#
+
+include nan_definitions.mk
+
+LIBNAME = opennl
+SOURCEDIR = intern/$(LIBNAME)
+DIR = $(OCGDIR)/$(SOURCEDIR)
+DIRS = intern
+
+include nan_subdirs.mk
+
+install: all debug
+	@[ -d $(NAN_OPENNL) ] || mkdir $(NAN_OPENNL)
+	@[ -d $(NAN_OPENNL)/include ] || mkdir $(NAN_OPENNL)/include
+	@[ -d $(NAN_OPENNL)/lib ] || mkdir $(NAN_OPENNL)/lib
+	@[ -d $(NAN_OPENNL)/lib/debug ] || mkdir $(NAN_OPENNL)/lib/debug
+	@../tools/cpifdiff.sh $(DIR)/libopennl.a $(NAN_OPENNL)/lib/
+	@../tools/cpifdiff.sh $(DIR)/debug/libopennl.a $(NAN_OPENNL)/lib/debug/
+ifeq ($(OS),darwin)
+	ranlib $(NAN_OPENNL)/lib/libopennl.a
+	ranlib $(NAN_OPENNL)/lib/debug/libopennl.a
+endif
+	@../tools/cpifdiff.sh extern/*.h $(NAN_OPENNL)/include/
+
Index: intern/opennl/intern/Makefile
===================================================================
RCS file: intern/opennl/intern/Makefile
diff -N intern/opennl/intern/Makefile
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ intern/opennl/intern/Makefile	15 May 2004 16:16:28 -0000
@@ -0,0 +1,43 @@
+#
+# $Id$
+#
+# ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version. The Blender
+# Foundation also sells licenses for use in proprietary software under
+# the Blender License.  See http://www.blender.org/BL/ for information
+# about this.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+# All rights reserved.
+#
+# The Original Code is: all of this file.
+#
+# Contributor(s): none yet.
+#
+# ***** END GPL/BL DUAL LICENSE BLOCK *****
+# opennl intern Makefile
+#
+
+LIBNAME = opennl
+DIR = $(OCGDIR)/intern/$(LIBNAME)
+
+include nan_compile.mk
+
+CCFLAGS += $(NAN_LEVEL_2_CPP_WARNINGS)
+
+CPPFLAGS += -I$(NAN_SUPERLU)/include -I../extern
+
+
Index: source/Makefile
===================================================================
RCS file: /cvsroot/tuhopuu/tuhopuu2/source/Makefile,v
retrieving revision 1.9
diff -u -r1.9 Makefile
--- source/Makefile	1 May 2004 18:58:25 -0000	1.9
+++ source/Makefile	15 May 2004 16:16:31 -0000
@@ -94,6 +94,11 @@
 
     GRPLIB += $(OCGDIR)/blender/python/$(DEBUG_DIR)libpython.a
 
+ifeq ($(UNWRAPPER),true)
+    GRPLIB += $(NAN_OPENNL)/lib/libopennl.a
+    GRPLIB += $(NAN_SUPERLU)/lib/libsuperlu.a
+endif
+
 # nlin: the reason that some libraries appear more than once below is
 # to handle circular dependencies in linking among libraries... some
 # linkers (e.g. under Linux) need libs to be specified multiple times
Index: source/nan_definitions.mk
===================================================================
RCS file: /cvsroot/tuhopuu/tuhopuu2/source/nan_definitions.mk,v
retrieving revision 1.10
diff -u -r1.10 nan_definitions.mk
--- source/nan_definitions.mk	2 May 2004 20:21:56 -0000	1.10
+++ source/nan_definitions.mk	15 May 2004 16:16:32 -0000
@@ -94,6 +94,8 @@
     export NAN_GHOST ?= $(LCGDIR)/ghost
     export NAN_TEST_VERBOSITY ?= 1
     export NAN_BMFONT ?= $(LCGDIR)/bmfont
+    export NAN_SUPERLU ?= $(LCGDIR)/superlu
+    export NAN_OPENNL ?= $(LCGDIR)/opennl
     ifeq ($(FREE_WINDOWS), true)
       export NAN_FTGL ?= $(LCGDIR)/gcc/ftgl
     else
Index: source/blender/src/Makefile
===================================================================
RCS file: /cvsroot/tuhopuu/tuhopuu2/source/blender/src/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- source/blender/src/Makefile	29 Nov 2003 22:07:39 -0000	1.3
+++ source/blender/src/Makefile	15 May 2004 16:16:32 -0000
@@ -118,3 +118,8 @@
 ifeq ($(NAN_SELECT_CUT), true)
     CPPFLAGS += -DSELECT_CUT
 endif
+
+ifeq ($(UNWRAPPER), true)
+	CPPFLAGS += -DUNWRAPPER -I$(NAN_OPENNL)/include
+endif
+

--=-/uHEwYMbcyv4JmLL+gVJ--