[Bf-committers] SDL mess in nan_definitions.mk

Ton Roosendaal bf-committers@blender.org
Tue, 12 Aug 2003 10:56:11 +0200


Hi,

My vote is for:

- put all external libs and needed .h files in cvs (lib/)
- make that default compilation behaviour.
- In general Blender should have an absolute minimum of system  
dependencies
- go for the simplest configuration, any dummie coder (like me) can get  
to working!

As exception, experienced developers then can still use different  
configs for sdl, python, etc.

If sdl-config works more reliable than choosing one (minimal version)  
for Blender, then go for it. But keep in mind we only have to make  
Blender run...

-Ton-


On Tuesday, Aug 12, 2003, at 05:04 Europe/Amsterdam, Kent Mein wrote:

> In reply to Hans Lambermont (hans@lambermont.dyndns.org):
>
> If were voting ;)
> Personally I'd say use sdl-config as the default and people can  
> override
> it with their own env vars if they need to.  Chances are sdl-config
> will get it right alot more of the time than static flags that we pick  
> out
> of a hat for each platform.  Also if were doing that for the patch  
> don't
> we just need to do it once?  I'm guessing the windows stuff has it
> hardcoded into the projectfiles, and or no one has added link stuff for
> SDL to the windows bit yet.
>
> Kent
>
>> Hi,
>>
>> I'd like to squash the SDL definition mess in nan_definitions.mk
>> Normally I'd commit this right away, but as it is now things are
>> redefined multiple times, and lots of dead ifdef code exists, so my
>> proposed cleanup *might* break things. Hence this email.
>>
>> First of all, remove the
>>
>>  ifneq ($(OS), irix)
>>     export NAN_SDL ?= $(shell sdl-config --prefix)
>>     export NAN_SDLLIBS ?= $(shell sdl-config --libs)
>>     export NAN_SDLCFLAGS ?= $(shell sdl-config --cflags)
>>  endif
>>
>> part which voids all other SDL ifdef stuff lateron.
>>
>> Secondly let's not use weird combinations like this:
>>
>>     export NAN_SDL ?= $(LCGDIR)/sdl
>>     export NAN_SDLLIBS ?= $(shell sdl-config --libs)
>>     export NAN_SDLCFLAGS ?= $(shell sdl-config --cflags)
>>
>> or this one :
>>
>>     export NAN_SDL ?= /usr/local
>>         ifeq ($(NAN_SDL),)
>>             ... #never reached
>>
>> Either manually define all, or use sdl-config everywhere.
>>
>> What about the following patch :
>>
>> Index: nan_definitions.mk
>> ===================================================================
>> RCS file: /cvsroot/bf-blender/blender/source/nan_definitions.mk,v
>> retrieving revision 1.49
>> diff -u -w -r1.49 nan_definitions.mk
>> --- nan_definitions.mk	4 Aug 2003 03:26:07 -0000	1.49
>> +++ nan_definitions.mk	11 Aug 2003 21:54:44 -0000
>> @@ -81,13 +81,6 @@
>>        export NAN_FTGL ?= $(LCGDIR)/ftgl
>>      endif
>>
>> -   ifneq ($(OS), irix)
>> -      export NAN_SDL ?= $(shell sdl-config --prefix)
>> -      export NAN_SDLLIBS ?= $(shell sdl-config --libs)
>> -      export NAN_SDLCFLAGS ?= $(shell sdl-config --cflags)
>> -   endif
>> -
>> -
>>    # Platform Dependent settings go below:
>>
>>    ifeq ($(OS),beos)
>> @@ -101,7 +94,6 @@
>>      export NAN_FMOD ?= $(LCGDIR)/fmod
>>      export NAN_JPEG ?= $(LCGDIR)/jpeg
>>      export NAN_PNG ?= $(LCGDIR)/png
>> -    export NAN_SDL ?= $(LCGDIR)/sdl
>>      export NAN_ODE ?= $(LCGDIR)/ode
>>      export NAN_TERRAPLAY ?= $(LCGDIR)/terraplay
>>      export NAN_MESA ?= /usr/src/Mesa-3.1
>> @@ -109,6 +101,7 @@
>>      export NAN_NSPR ?= $(LCGDIR)/nspr
>>      export NAN_FREETYPE ?= $(LCGDIR)/freetype
>>      export NAN_GETTEXT ?= $(LCGDIR)/gettext
>> +    export NAN_SDL ?= $(shell sdl-config --prefix)
>>  	export NAN_SDLLIBS ?= $(shell sdl-config --libs)
>>  	export NAN_SDLCFLAGS ?= $(shell sdl-config --cflags)
>>
>> @@ -142,7 +135,6 @@
>>      export NAN_FMOD ?= $(LCGDIR)/fmod
>>      export NAN_JPEG ?= /sw
>>      export NAN_PNG ?= /sw
>> -    export NAN_SDL ?= $(LCGDIR)/sdl
>>      export NAN_ODE ?= $(LCGDIR)/ode
>>      export NAN_TERRAPLAY ?= $(LCGDIR)/terraplay
>>      export NAN_MESA ?= /usr/src/Mesa-3.1
>> @@ -150,11 +142,9 @@
>>      export NAN_NSPR ?= $(LCGDIR)/nspr
>>      export NAN_FREETYPE ?= /sw
>>      export NAN_GETTEXT ?= $(LCGDIR)/gettext
>> -    ifeq ($(NAN_SDL),)
>>  		export NAN_SDL = $(LCGDIR)/sdl
>>  		export NAN_SDLCFLAGS = -I$(NAN_SDL)/include
>>  		export NAN_SDLLIBS = $(NAN_SDL)/lib/libSDL.a -framework Cocoa
>> -    endif
>>
>>      # Uncomment the following line to use Mozilla inplace of netscape
>>      # CPPFLAGS +=-DMOZ_NOT_NET
>> @@ -189,7 +179,6 @@
>>      export NAN_FMOD ?= $(LCGDIR)/fmod
>>      export NAN_JPEG ?= /usr/local
>>      export NAN_PNG ?= /usr/local
>> -    export NAN_SDL ?= /usr/local
>>      export NAN_ODE ?= $(LCGDIR)/ode
>>      export NAN_TERRAPLAY ?= $(LCGDIR)/terraplay
>>      export NAN_MESA ?= /usr/src/Mesa-3.1
>> @@ -197,8 +186,9 @@
>>      export NAN_NSPR ?= /usr/local
>>      export NAN_FREETYPE ?= $(LCGDIR)/freetype
>>      export NAN_GETTEXT ?= $(LCGDIR)/gettext
>> -	export NAN_SDLLIBS ?= $(shell sdl-config --libs)
>> -	export NAN_SDLCFLAGS ?= $(shell sdl-config --cflags)
>> +    export NAN_SDL ?= $(shell sdl11-config --prefix)
>> +    export NAN_SDLLIBS ?= $(shell sdl11-config --libs)
>> +    export NAN_SDLCFLAGS ?= $(shell sdl11-config --cflags)
>>
>>      # Uncomment the following line to use Mozilla inplace of netscape
>>      # CPPFLAGS +=-DMOZ_NOT_NET
>> @@ -230,7 +220,6 @@
>>      export NAN_FMOD ?= $(LCGDIR)/fmod
>>      export NAN_JPEG ?= $(LCGDIR)/jpeg
>>      export NAN_PNG ?= $(LCGDIR)/png
>> -    export NAN_SDL ?= $(LCGDIR)/sdl
>>      export NAN_ODE ?= $(LCGDIR)/ode
>>      export NAN_TERRAPLAY ?= $(LCGDIR)/terraplay
>>      export NAN_MESA ?= /usr/src/Mesa-3.1
>> @@ -238,6 +227,7 @@
>>      export NAN_NSPR ?= $(LCGDIR)/nspr
>>      export NAN_FREETYPE ?= /usr/freeware
>>      export NAN_GETTEXT ?= /usr/freeware
>> +    export NAN_SDL ?= $(shell sdl-config --prefix)
>>  	export NAN_SDLLIBS ?= $(shell sdl-config --libs)
>>  	export NAN_SDLCFLAGS ?= $(shell sdl-config --cflags)
>>
>> @@ -271,7 +261,6 @@
>>      export NAN_FMOD ?= $(LCGDIR)/fmod
>>      export NAN_JPEG ?= /usr
>>      export NAN_PNG ?= /usr
>> -#    export NAN_SDL ?= /usr
>>      export NAN_ODE ?= $(LCGDIR)/ode
>>      export NAN_TERRAPLAY ?= $(LCGDIR)/terraplay
>>      export NAN_MESA ?= /usr
>> @@ -279,11 +268,9 @@
>>      export NAN_NSPR ?= $(LCGDIR)/nspr
>>      export NAN_FREETYPE ?= /usr
>>      export NAN_GETTEXT ?= /usr
>> -	ifeq ($(NAN_SDL),)
>> -		export NAN_SDL = $(LCGDIR)/sdl
>> -		export NAN_SDLCFLAGS = -I$(NAN_SDL)/include/SDL
>> -		export NAN_SDLLIBS = -L$(NAN_SDL)/lib -lSDL
>> -	endif
>> +    export NAN_SDL ?= $(shell sdl-config --prefix)
>> +    export NAN_SDLLIBS ?= $(shell sdl-config --libs)
>> +    export NAN_SDLCFLAGS ?= $(shell sdl-config --cflags)
>>
>>      # Uncomment the following line to use Mozilla inplace of netscape
>>      export CPPFLAGS += -DMOZ_NOT_NET
>> @@ -316,7 +303,6 @@
>>      export NAN_FMOD ?= $(LCGDIR)/fmod
>>      export NAN_JPEG ?= $(LCGDIR)/jpeg
>>      export NAN_PNG ?= $(LCGDIR)/png
>> -    export NAN_SDL ?= $(LCGDIR)/sdl
>>      export NAN_ODE ?= $(LCGDIR)/ode
>>      export NAN_TERRAPLAY ?= $(LCGDIR)/terraplay
>>      export NAN_MESA ?= /usr/src/Mesa-3.1
>> @@ -324,13 +310,9 @@
>>      export NAN_NSPR ?= $(LCGDIR)/nspr
>>      export NAN_FREETYPE ?= $(LCGDIR)/freetype
>>      export NAN_GETTEXT ?= $(LCGDIR)/gettext
>> +    export NAN_SDL ?= $(shell sdl-config --prefix)
>>  	export NAN_SDLLIBS ?= $(shell sdl-config --libs)
>>  	export NAN_SDLCFLAGS ?= $(shell sdl-config --cflags)
>> -	ifeq ($(NAN_SDL),)
>> -		export NAN_SDL = $(LCGDIR)/sdl
>> -		export NAN_SDLCFLAGS = -I$(NAN_SDL)/include/SDL
>> -		export NAN_SDLLIBS = -L$(NAN_SDL)/lib -lSDL
>> -	endif
>>
>>      # Uncomment the following line to use Mozilla inplace of netscape
>>      # CPPFLAGS +=-DMOZ_NOT_NET
>> @@ -362,7 +344,6 @@
>>      export NAN_FMOD ?= $(LCGDIR)/fmod
>>      export NAN_JPEG ?= /usr/local
>>      export NAN_PNG ?= /usr/local
>> -    export NAN_SDL ?= /usr/local
>>      export NAN_ODE ?= $(LCGDIR)/ode
>>      export NAN_TERRAPLAY ?=
>>      export NAN_MESA ?= /usr/src/Mesa-3.1
>> @@ -370,11 +351,9 @@
>>      export NAN_NSPR ?= $(LCGDIR)/nspr
>>      export NAN_FREETYPE ?= $(LCGDIR)/freetype
>>      export NAN_GETTEXT ?= $(LCGDIR)/gettext
>> -	ifeq ($(NAN_SDL),)
>> -		export NAN_SDL = $(LCGDIR)/sdl
>> -		export NAN_SDLCFLAGS = -I$(NAN_SDL)/include/SDL
>> -		export NAN_SDLLIBS = -L$(NAN_SDL)/lib -lSDL
>> -	endif
>> +    export NAN_SDL ?= $(shell sdl-config --prefix)
>> +    export NAN_SDLLIBS ?= $(shell sdl-config --libs)
>> +    export NAN_SDLCFLAGS ?= $(shell sdl-config --cflags)
>>
>>      # Uncomment the following line to use Mozilla inplace of netscape
>>      # CPPFLAGS +=-DMOZ_NOT_NET
>> @@ -406,23 +385,22 @@
>>        export NAN_FREETYPE ?= $(LCGDIR)/gcc/freetype
>>        export NAN_ODE ?= $(LCGDIR)/gcc/ode
>>        ifeq ($(NAN_SDL),)
>> -	      export NAN_SDL = $(LCGDIR)/gcc/sdl
>> -		  export NAN_SDLCFLAGS = -I$(NAN_SDL)/include
>> +	  export NAN_SDL ?= $(LCGDIR)/gcc/sdl
>> +	  export NAN_SDLCFLAGS ?= -I$(NAN_SDL)/include
>>  	  endif
>>      else
>>        export NAN_PYTHON_BINARY ?= python
>>        export NAN_FREETYPE ?= $(LCGDIR)/freetype
>>        export NAN_ODE ?= $(LCGDIR)/ode
>>        ifeq ($(NAN_SDL),)
>> -	      export NAN_SDL = $(LCGDIR)/sdl
>> -		  export NAN_SDLCFLAGS = -I$(NAN_SDL)/include
>> +	  export NAN_SDL ?= $(LCGDIR)/sdl
>> +	  export NAN_SDLCFLAGS ?= -I$(NAN_SDL)/include
>>        endif
>>  	endif
>>  	export NAN_OPENAL ?= $(LCGDIR)/openal
>>      export NAN_FMOD ?= $(LCGDIR)/fmod
>>      export NAN_JPEG ?= $(LCGDIR)/jpeg
>>      export NAN_PNG ?= $(LCGDIR)/png
>> -    export NAN_SDL ?= $(LCGDIR)/sdl
>>      export NAN_TERRAPLAY ?= $(LCGDIR)/terraplay
>>      export NAN_MESA ?= /usr/src/Mesa-3.1
>>      export NAN_ZLIB ?= $(LCGDIR)/zlib
>> @@ -467,11 +445,9 @@
>>      export NAN_NSPR ?= $(LCGDIR)/nspr
>>      export NAN_FREETYPE ?= $(LCGDIR)/freetype
>>      export NAN_GETTEXT ?= $(LCGDIR)/gettext
>> -	ifeq ($(NAN_SDL),)
>> -		export NAN_SDL = $(LCGDIR)/sdl
>> -		export NAN_SDLCFLAGS = -I$(NAN_SDL)/include/SDL
>> -		export NAN_SDLLIBS = -L$(NAN_SDL)/lib -lSDL
>> -	endif
>> +    export NAN_SDL ?= $(shell sdl-config --prefix)
>> +    export NAN_SDLLIBS ?= $(shell sdl-config --libs)
>> +    export NAN_SDLCFLAGS ?= $(shell sdl-config --cflags)
>>
>>      # Uncomment the following line to use Mozilla inplace of netscape
>>      # CPPFLAGS +=-DMOZ_NOT_NET
>>
>> Question: how does windows link against SDL ? there's no NAN_SDLLIBS  
>> in
>> the windows section ...
>>
>> Hans
>> --  
>> http://lambermont.webhop.org/   () ascii ribbon campaign - against  
>> HTML mail,
>>                                 /\ vCards and proprietary formats
>> _______________________________________________
>> Bf-committers mailing list
>> Bf-committers@blender.org
>> http://www.blender.org/mailman/listinfo/bf-committers
>
> --  
> mein@cs.umn.edu
> http://www.cs.umn.edu/~mein
> _______________________________________________
> Bf-committers mailing list
> Bf-committers@blender.org
> http://www.blender.org/mailman/listinfo/bf-committers
>
>
------------------------------------------------------------------------ 
--
Ton Roosendaal  Blender Foundation ton@blender.org  
http://www.blender.org