Add FFTW3 support to Makefiles, make OpenJpeg use OS lib for Linux.
authorGuillermo S. Romero <gsr.b3d@infernal-iceberg.com>
Mon, 9 Nov 2009 20:08:19 +0000 (20:08 +0000)
committerGuillermo S. Romero <gsr.b3d@infernal-iceberg.com>
Mon, 9 Nov 2009 20:08:19 +0000 (20:08 +0000)
And handful of whitespace clean ups.

extern/Makefile
intern/smoke/intern/Makefile
source/Makefile
source/blender/imbuf/intern/Makefile
source/nan_definitions.mk
source/nan_link.mk

index a30cd1d7ca3ccacc3a5f7ac55ca93c1b10aa874d..4a2e7a6d59b321850014a2f1f4ee350dc427c42f 100644 (file)
@@ -34,7 +34,7 @@ DIRS = glew/src
 
 # Cloth requires it
 ifeq ($(NAN_USE_BULLET), true)
-       DIRS += bullet2
+    DIRS += bullet2
 endif
 
 ifeq ($(WITH_BINRELOC), true)
@@ -42,7 +42,9 @@ ifeq ($(WITH_BINRELOC), true)
 endif
 
 ifeq ($(WITH_OPENJPEG), true)
-    DIRS += libopenjpeg
+    ifndef BF_OPENJPEG
+        DIRS += libopenjpeg
+    endif
 endif
 
 ifeq ($(WITH_LZO), true)
index 2cdd7d3853e8990a65f87513b74fa8db545d0239..760b1627a91b0d8853f915a851f80b47b0f5b9a5 100644 (file)
@@ -41,6 +41,11 @@ ifeq ($(WITH_BF_OPENMP),true)
    CPPFLAGS += -DPARALLEL
 endif
 
+ifeq ($(WITH_FFTW3),true)
+    CPPFLAGS += -DFFTW3=1
+    CPPFLAGS += $(BF_FFTW3_INC)
+endif
+
 CPPFLAGS += -I.
 CPPFLAGS += -I../extern
 CPPFLAGS += -I$(NAN_PNG)/include
index 783b51b81de757959221b7a65b11db51406a638f..a106e655e78933ad691e76ee26c219cf8708d2c2 100644 (file)
@@ -188,7 +188,11 @@ ifeq ($(WITH_OPENEXR), true)
 endif
 
 ifeq ($(WITH_OPENJPEG), true)
-    COMLIB += $(OCGDIR)/extern/openjpeg/$(DEBUG_DIR)libopenjpeg.a
+    ifndef BF_OPENJPEG_LIBS
+        COMLIB += $(OCGDIR)/extern/openjpeg/$(DEBUG_DIR)libopenjpeg.a
+    else
+        COMLIB += $(BF_OPENJPEG_LIBS)
+    endif
 endif
 
 COMLIB += $(OCGDIR)/blender/imbuf/cineon/$(DEBUG_DIR)libcineon.a
index 427052cbdc354bc45043868311cfadf15d8fdb57..0f2020c799a39a1eeef68505152193b032c1b896 100644 (file)
@@ -39,7 +39,7 @@ include nan_definitions.mk
 DIRS = cineon
 
 ifeq ($(WITH_OPENEXR), true)
-    DIRS += openexr 
+    DIRS += openexr
     CFLAGS += -DWITH_OPENEXR
 endif
 
@@ -49,7 +49,11 @@ ifeq ($(WITH_DDS), true)
 endif
 
 ifeq ($(WITH_OPENJPEG), true)
-    CFLAGS += -DWITH_OPENJPEG -I../../../../extern/libopenjpeg
+    ifndef BF_OPENJPEG_INC
+        CFLAGS += -DWITH_OPENJPEG -I../../../../extern/libopenjpeg
+    else
+        CFLAGS += -DWITH_OPENJPEG -I$(BF_OPENJPEG_INC)
+    endif
 endif
 
 CFLAGS += $(LEVEL_1_C_WARNINGS)
index 1aff7e1dea71fee365327cf1ecbdb4b54c94173e..50df0e777cc41cd88fb26a5a154818e69e9af561 100644 (file)
@@ -81,8 +81,8 @@ ifndef CONFIG_GUESS
     endif
 
     export NAN_MOTO ?= $(LCGDIR)/moto
-       export NAN_ITASC ?= $(LCGDIR)/itasc
-       
+    export NAN_ITASC ?= $(LCGDIR)/itasc
+
     export BF_PROFILE ?= false
     export NAN_USE_BULLET ?= true
     export NAN_BULLET2 ?= $(LCGDIR)/bullet2
@@ -122,6 +122,7 @@ ifndef CONFIG_GUESS
     export WITH_OPENAL ?= false
     export WITH_JACK ?= false
     export WITH_SNDFILE ?= false
+    export WITH_FFTW3 ?= false
 
   ifeq ($(WITH_OPENAL), true)
     export NAN_OPENAL ?= /usr
@@ -195,7 +196,7 @@ ifndef CONFIG_GUESS
     export NAN_OPENEXR ?= $(LCGDIR)/openexr
     export NAN_OPENEXR_INC ?= -I$(NAN_OPENEXR)/include -I$(NAN_OPENEXR)/include/OpenEXR
     export NAN_OPENEXR_LIBS ?= $(NAN_OPENEXR)/lib/libIlmImf.a $(NAN_OPENEXR)/lib/libHalf.a $(NAN_OPENEXR)/lib/libIex.a $(NAN_OPENEXR)/lib/libIlmThread.a
-    
+
     export NAN_NO_KETSJI=false
 
     ifeq ($(CPU), i386)
@@ -350,6 +351,18 @@ ifndef CONFIG_GUESS
       export NAN_OPENEXR_LIBS ?= $(addprefix ${NAN_OPENEXR}/lib/lib,$(addsuffix .a,$(shell pkg-config --libs-only-l OpenEXR | sed -s "s/-l//g" )))
     endif
 
+    ifeq ($(WITH_FFTW3), true)
+      export BF_FFTW3 ?= $(shell pkg-config --variable=prefix fftw3 )
+      export BF_FFTW3_INC ?= $(shell pkg-config --variable=includedir fftw3 )
+      export BF_FFTW3_LIBS ?= $(shell pkg-config --libs fftw3 )
+    endif
+
+    ifeq ($(WITH_OPENJPEG), true)
+      export BF_OPENJPEG ?= /usr
+      export BF_OPENJPEG_INC ?= /usr/include
+      export BF_OPENJPEG_LIBS ?= -lopenjpeg
+    endif
+
     # Uncomment the following line to use Mozilla inplace of netscape
 
     # Location of MOZILLA/Netscape header files...
index 52e5c5de9ed08bee6969cda371402d2789a5407b..8f33c917526a9cf21d49f06d4c142693efb15ea7 100644 (file)
@@ -170,4 +170,8 @@ ifeq ($(WITH_BF_OPENMP),true)
    LLIBS += -lgomp
 endif
 
+ifeq ($(WITH_FFTW3),true)
+    LLIBS += $(BF_FFTW3_LIBS)
+endif
+
 LLIBS += $(NAN_PYTHON_LIB)