|
From: <kin...@us...> - 2025-08-29 22:19:27
|
Revision: 7336
http://sourceforge.net/p/teem/code/7336
Author: kindlmann
Date: 2025-08-29 22:19:26 +0000 (Fri, 29 Aug 2025)
Log Message:
-----------
fixing (and clarifying in comments) handling of TEEM_EXT_IPATH and TEEM_EXT_LPATH
Modified Paths:
--------------
teem/trunk/src/GNUmakefile
teem/trunk/src/make/externals.mk
Modified: teem/trunk/src/GNUmakefile
===================================================================
--- teem/trunk/src/GNUmakefile 2025-08-29 16:59:41 UTC (rev 7335)
+++ teem/trunk/src/GNUmakefile 2025-08-29 22:19:26 UTC (rev 7336)
@@ -51,9 +51,6 @@
#### env var TEEM_DEST (because now any "install" should be done via CMake)
#### make vars ARCH, SUBARCH
#### everything about shared libraries: TEEM_LINK_SHARED, SHEXT
-#### as well as variables TEEM_EXT_IPATH and TEEM_EXT_LPATH (for all EXT externals
-#### PNG ZLIB BZIP2 PTHREAD LEVMAR FFTW3, e.g TEEM_ZLIB_IPATH, TEEM_ZLIB_LPATH);
-#### these have become EXT.DASHI and EXT.DASHL set in make/externals.mk
####
#### file errorCheck.mk gone (so simple, nothing left to error check)
#### make var KNOWN_ARCH
@@ -283,9 +280,9 @@
$(subst XXX,$(X),$(2)))))))
Externs.dashD = $(call forExtern,$(1),-DTEEM_XXX=1)
evallist = $(foreach var,$(1),$($(var)))
-maybe.prefix = $(if $(2),$(1)$(2))
-Externs.dashI = $(call maybe.prefix,-I,$(call evallist,$(call forExtern,$(1),TEEM_XXX_DASHI)))
-Externs.dashL = $(call maybe.prefix,-L,$(call evallist,$(call forExtern,$(1),TEEM_XXX_DASHL)))
+maybe.prefixen = $(if $(2),$(foreach P,$(2),$(1)$(P)))
+Externs.dashI = $(call maybe.prefixen,-I,$(strip $(call evallist,$(call forExtern,$(1),TEEM_XXX_IPATH))))
+Externs.dashL = $(call maybe.prefixen,-L,$(strip $(call evallist,$(call forExtern,$(1),TEEM_XXX_LPATH))))
Externs.llink = $(call evallist,$(call forExtern,$(1),XXX.llink))
## DEBUG
Modified: teem/trunk/src/make/externals.mk
===================================================================
--- teem/trunk/src/make/externals.mk 2025-08-29 16:59:41 UTC (rev 7335)
+++ teem/trunk/src/make/externals.mk 2025-08-29 22:19:26 UTC (rev 7336)
@@ -30,13 +30,13 @@
## If external EXT is enabled during make, then *preprocessor symbol* TEEM_EXT will be
## effectively #define'd as "1" during source file compilation.
##
-## TeemV2 renamed:
-## TEEM_EXT_IPATH --> TEEM_EXT_DASHI
-## TEEM_EXT_LPATH --> TEEM_EXT_DASHL
-## and these variables can now be set here (since there are no longer multiple
-## architectures to simultaneously support). Being perfectly consistent with the
-## of the V2 reworking of GNUmake stuff would have used EXT.dashI and EXT.dashL
-## but the shell sometimes gets confused by variables with a "." inside
+## TeemV2 renamed moved the variables describing each external to here (since there are
+## no longer multiple architectures to simultaneously support). The TEEM_EXT_IPATH and
+## TEEM_EXT_LPATH variables have kept their name, but now their names are accurate: you
+## no longer start TEEM_EXT_IPATH with "-I" or TEEM_EXT_LPATH with "-L". They really just
+## just be the path; it is the job of the functions Externs.dashD and Externs.dashI
+## (defined in ../GNUmakefile and used in template.mk) to add the -I and -L to each path
+## as needed.
##
AllExterns = PNG ZLIB BZIP2 PTHREAD LEVMAR FFTW3
@@ -45,8 +45,8 @@
## Header file is <png.h>
PNG.llink = -lpng
nrrd.Externs += PNG
-TEEM_PNG_DASHI ?=
-TEEM_PNG_DASHL ?=
+TEEM_PNG_IPATH ?=
+TEEM_PNG_LPATH ?=
## ZLIB: for the zlib library (in gzip and PNG image format) from https://zlib.net/
## Using zlib enables the "gzip" nrrd data encoding
@@ -53,8 +53,8 @@
## Header file is <zlib.h>.
ZLIB.llink = -lz
nrrd.Externs += ZLIB
-TEEM_ZLIB_DASHI ?=
-TEEM_ZLIB_DASHL ?=
+TEEM_ZLIB_IPATH ?=
+TEEM_ZLIB_LPATH ?=
## BZIP2: for the bzip2 compression library, from https://sourceware.org/bzip2/
## Using bzip2 enables the "bzip2" nrrd data encoding.
@@ -61,8 +61,8 @@
## Header file is <bzlib.h>.
BZIP2.llink = -lbz2
nrrd.Externs += BZIP2
-TEEM_BZIP2_DASHI ?=
-TEEM_BZIP2_DASHL ?=
+TEEM_BZIP2_IPATH ?=
+TEEM_BZIP2_LPATH ?=
## PTHREAD: use pthread-based multi-threading in airThreads. Note that Windows has its
## own multithreading capabilities, which is used in airThread if !TEEM_PTHREAD, and we
@@ -70,8 +70,8 @@
## Header file is <pthread.h>
PTHREAD.llink = -lpthread
air.Externs += PTHREAD
-TEEM_PTHREAD_DASHI ?=
-TEEM_PTHREAD_DASHL ?=
+TEEM_PTHREAD_IPATH ?=
+TEEM_PTHREAD_LPATH ?=
## LEVMAR: Levenberg-Marquardt from https://users.ics.forth.gr/~lourakis/levmar/
## Header file is <levmar.h>
@@ -78,12 +78,12 @@
LEVMAR.llink = -llevmar
ten.Externs += LEVMAR
elf.Externs += LEVMAR
-TEEM_LEVMAR_DASHI ?=
-TEEM_LEVMAR_DASHL ?=
+TEEM_LEVMAR_IPATH ?=
+TEEM_LEVMAR_LPATH ?=
## FFTW3: FFTW version 3 from https://www.fftw.org/
## Header file is <fftw3.h>
FFTW3.llink = -lfftw3
nrrd.Externs += FFTW3
-TEEM_FFTW3_DASHI ?=
-TEEM_FFTW3_DASHL ?=
+TEEM_FFTW3_IPATH ?=
+TEEM_FFTW3_LPATH ?=
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|