| 1 |
|
| 2 |
# This holds the common definitions for Argyll that all the |
| 3 |
# subdirectory jam's will include (even if run in the sub directory) |
| 4 |
|
| 5 |
Echo "Argyll Jamtop has been read" ; |
| 6 |
|
| 7 |
# Extra config. |
| 8 |
if [ GLOB $(TOP) : JamExtra ] { |
| 9 |
include $(TOP)/JamExtra ; |
| 10 |
} |
| 11 |
|
| 12 |
# Default install base directory is same directory as Jamtop, |
| 13 |
# but can be overriden in the command line. |
| 14 |
DESTDIR ?= [ NormPaths . ] ; |
| 15 |
|
| 16 |
# Default prefix is empty, but can be overriden in the command line. |
| 17 |
PREFIX ?= "" ; |
| 18 |
|
| 19 |
# Default ref file sub-directory is "ref", but can be overriden in the command line. |
| 20 |
REFSUBDIR ?= "ref" ; |
| 21 |
|
| 22 |
Echo "DESTDIR = '$(DESTDIR)', PREFIX = '$(PREFIX)', REFSUBDIR = '$(REFSUBDIR)'" ; |
| 23 |
|
| 24 |
# Keep this DESTDIR anchored to Jamtop. PREFIX is used literally |
| 25 |
ANCHORED_PATH_VARS = DESTDIR ; |
| 26 |
|
| 27 |
|
| 28 |
# Should we also allow CFLAGS, CXXFLAGS, CPPFLAGS & LDFLAGS env. variables |
| 29 |
# to have effect ? |
| 30 |
|
| 31 |
# Tell standalone libraries that they are part of Argyll: |
| 32 |
DEFINES += ARGYLLCMS ; |
| 33 |
|
| 34 |
# Enable all instrument types by default |
| 35 |
DEFINES += ALLINSTS ; |
| 36 |
|
| 37 |
# enable serial instruments & support |
| 38 |
USE_SERIAL = true ; |
| 39 |
|
| 40 |
# enable fast serial instruments & support |
| 41 |
USE_FAST_SERIAL = true ; # (Implicit in USE_SERIAL too) |
| 42 |
|
| 43 |
# enable USB instruments & support |
| 44 |
USE_USB = true ; |
| 45 |
|
| 46 |
# enable dummy Demo Instrument (only if code is available) |
| 47 |
USE_DEMOINST = true ; |
| 48 |
|
| 49 |
# Experimental support of D123 instrument: |
| 50 |
USE_D123 = false ; |
| 51 |
|
| 52 |
# enable Video Test Patch Generator and 3DLUT device support |
| 53 |
# (Not fully implemented) |
| 54 |
USE_VTPGLUT = false ; |
| 55 |
|
| 56 |
# enable Printer device support |
| 57 |
# (Not implemented) |
| 58 |
USE_PRINTER = false ; |
| 59 |
|
| 60 |
# enable CMF Measurement device and accessory support (if present) |
| 61 |
# (Not part of ArgyllCMS) |
| 62 |
USE_CMFM = false ; |
| 63 |
|
| 64 |
# Compile in graph plotting code |
| 65 |
USE_PLOT = true ; # [true] |
| 66 |
|
| 67 |
# Enable UTF-8 code pages on MSWindows V 1903 or later, |
| 68 |
# to make executable language handling consistent across MSWin/OS X/Linux |
| 69 |
WIN_UTF8 = true ; # [true] |
| 70 |
|
| 71 |
# Use libusb_win32 libusb0.sys on MSWindows |
| 72 |
USE_LIBUSB0 = true ; # [true] |
| 73 |
|
| 74 |
# Use UsbDk on MSWindows |
| 75 |
# (Can use along side USE_LIBUSB0) |
| 76 |
USE_USBDK = false ; # [false] |
| 77 |
|
| 78 |
# For testing CCast |
| 79 |
#DEFINES += CCTEST_PATTERN ; |
| 80 |
|
| 81 |
# Information for compiling and linking GUI programs |
| 82 |
|
| 83 |
if $(UNIX) { |
| 84 |
if $(OS) = MACOSX { |
| 85 |
LINKFLAGS += -framework IOKit ; |
| 86 |
LINKFLAGS += -framework CoreFoundation ; |
| 87 |
LINKFLAGS += -framework AppKit ; |
| 88 |
LINKFLAGS += -framework AudioToolbox ; |
| 89 |
|
| 90 |
# Hmm. Would be nice to use pkg-config here, if system has it. |
| 91 |
} else { |
| 92 |
if [ GLOB /usr/X11R6/include/X11 : X.h ] { |
| 93 |
LibWinH = /usr/X11R6/include ; |
| 94 |
} else if [ GLOB /usr/include/X11 : X.h ] { |
| 95 |
LibWinH = /usr/include ; |
| 96 |
} else if [ GLOB /usr/local/include/X11 : X.h ] { |
| 97 |
LibWinH = /usr/local/include ; |
| 98 |
} else { |
| 99 |
EXIT Unable to locate the X11 include files ; |
| 100 |
} |
| 101 |
|
| 102 |
if $(HOST64) { |
| 103 |
if [ GLOB /usr/X11R6/lib : libX11.so libX11.a ] { |
| 104 |
LibWinD = /usr/X11R6/lib ; |
| 105 |
} else if [ GLOB /usr/lib/x86_64-linux-gnu : libX11.so libX11.a ] { |
| 106 |
LibWinD = /usr/lib/x86_64-linux-gnu ; |
| 107 |
} else if [ GLOB /usr/lib64 : libX11.so libX11.a ] { |
| 108 |
LibWinD = /usr/lib64 ; |
| 109 |
} else if [ GLOB /usr/lib : libX11.so libX11.a ] { |
| 110 |
LibWinD = /usr/lib ; |
| 111 |
} else if [ GLOB /usr/local/lib : libX11.so libX11.a ] { |
| 112 |
LibWinD = /usr/local/lib ; |
| 113 |
} else { |
| 114 |
ECHO Unable to locate the 64 bit X11 library files ; |
| 115 |
} |
| 116 |
} else { |
| 117 |
if [ GLOB /usr/X11R6/lib : libX11.so libX11.a ] { |
| 118 |
LibWinD = /usr/X11R6/lib ; |
| 119 |
} else if [ GLOB /usr/lib/i386-linux-gnu : libX11.so libX11.a ] { |
| 120 |
LibWinD = /usr/lib/i386-linux-gnu ; |
| 121 |
} else if [ GLOB /usr/lib : libX11.so libX11.a ] { |
| 122 |
LibWinD = /usr/lib ; |
| 123 |
} else if [ GLOB /usr/local/lib : libX11.so libX11.a ] { |
| 124 |
LibWinD = /usr/local/lib ; |
| 125 |
} else { |
| 126 |
ECHO Unable to locate the 32 bit X11 library files ; |
| 127 |
} |
| 128 |
} |
| 129 |
if $(OS) = FREEBSD { |
| 130 |
LINKFLAGS += -g -lrt -lusb ; |
| 131 |
GUILINKFLAGS += -L$(LibWinD) -g -lX11 -lXext -lXxf86vm -lXinerama -lXrandr -lXau -lXdmcp -lXss ; |
| 132 |
} else if $(OS) = OPENBSD { |
| 133 |
LINKFLAGS += ; |
| 134 |
GUILINKFLAGS += -L$(LibWinD) -g -lX11 -lXext -lXxf86vm -lXinerama -lXrandr -lXau -lXdmcp -lXss -L/usr/local/lib ; |
| 135 |
} else { |
| 136 |
LINKFLAGS += -ldl -lrt ; |
| 137 |
GUILINKFLAGS += -L$(LibWinD) -lX11 -lXext -lXxf86vm -lXinerama -lXrandr -lXau -lXdmcp -lXss ; |
| 138 |
} |
| 139 |
# HDRS += $(LibWinH) ; |
| 140 |
} |
| 141 |
} |
| 142 |
|
| 143 |
# Standard system library support: |
| 144 |
|
| 145 |
# Check rule. $(<) is library name, $(>) is optional alternate library name |
| 146 |
# $(3) is optional #include sub-directory, i.e. "/openssl" |
| 147 |
rule CheckForLibrary { |
| 148 |
UCASE = $(<:U) ; |
| 149 |
lcase = $(<:L) ; |
| 150 |
libname = $(lcase) ; |
| 151 |
subd = "" ; |
| 152 |
|
| 153 |
if $(>) { |
| 154 |
libname = $(>) ; |
| 155 |
} |
| 156 |
|
| 157 |
if $(3) { |
| 158 |
subd = $(3) ; |
| 159 |
} |
| 160 |
|
| 161 |
if ! $(BUILTIN_$(UCASE)) && $(UNIX) { |
| 162 |
if [ GLOB /usr/include$(subd) : $(lcase).h $(lcase)lib.h ] |
| 163 |
|| [ GLOB /usr/local/include$(subd) : $(lcase).h $(lcase)lib.h ] |
| 164 |
|| [ GLOB /usr/include/x86_64-linux-gnu$(subd) : $(lcase).h $(lcase)lib.h ] |
| 165 |
|| [ GLOB /usr/include/i386-linux-gnu$(subd) : $(lcase).h $(lcase)lib.h ] |
| 166 |
|| [ GLOB /usr/include/alpha-linux-gnu$(subd) : $(lcase).h $(lcase)lib.h ] |
| 167 |
|| [ GLOB /usr/include/aarch64-linux-gnu$(subd) : $(lcase).h $(lcase)lib.h ] |
| 168 |
|| [ GLOB /usr/include/arm-linux-gnueabi$(subd) : $(lcase).h $(lcase)lib.h ] |
| 169 |
|| [ GLOB /usr/include/arm-linux-gnueabihf$(subd) : $(lcase).h $(lcase)lib.h ] |
| 170 |
|| [ GLOB /usr/include/hppa-linux-gnu$(subd) : $(lcase).h $(lcase)lib.h ] |
| 171 |
|| [ GLOB /usr/include/i386-gnu$(subd) : $(lcase).h $(lcase)lib.h ] |
| 172 |
|| [ GLOB /usr/include/x86_64-kfreebsd-gnu$(subd) : $(lcase).h $(lcase)lib.h ] |
| 173 |
|| [ GLOB /usr/include/i386-kfreebsd-gnu$(subd) : $(lcase).h $(lcase)lib.h ] |
| 174 |
|| [ GLOB /usr/include/loongarch64-linux-gnu$(subd) : $(lcase).h $(lcase)lib.h ] |
| 175 |
|| [ GLOB /usr/include/m68k-linux-gnu$(subd) : $(lcase).h $(lcase)lib.h ] |
| 176 |
|| [ GLOB /usr/include/mips-linux-gnu$(subd) : $(lcase).h $(lcase)lib.h ] |
| 177 |
|| [ GLOB /usr/include/mipsel-linux-gnu$(subd) : $(lcase).h $(lcase)lib.h ] |
| 178 |
|| [ GLOB /usr/include/mips64el-linux-gnuabi64$(subd) : $(lcase).h $(lcase)lib.h ] |
| 179 |
|| [ GLOB /usr/include/powerpc-linux-gnu$(subd) : $(lcase).h $(lcase)lib.h ] |
| 180 |
|| [ GLOB /usr/include/powerpc-linux-gnuspe$(subd) : $(lcase).h $(lcase)lib.h ] |
| 181 |
|| [ GLOB /usr/include/powerpc64-linux-gnu$(subd) : $(lcase).h $(lcase)lib.h ] |
| 182 |
|| [ GLOB /usr/include/powerpc64le-linux-gnu$(subd) : $(lcase).h $(lcase)lib.h ] |
| 183 |
|| [ GLOB /usr/include/riscv64-linux-gnu$(subd) : $(lcase).h $(lcase)lib.h ] |
| 184 |
|| [ GLOB /usr/include/s390x-linux-gnu$(subd) : $(lcase).h $(lcase)lib.h ] |
| 185 |
|| [ GLOB /usr/include/sh4-linux-gnu$(subd) : $(lcase).h $(lcase)lib.h ] |
| 186 |
|| [ GLOB /usr/include/sparc-linux-gnu$(subd) : $(lcase).h $(lcase)lib.h ] |
| 187 |
|| [ GLOB /usr/include/sparc64-linux-gnu$(subd) : $(lcase).h $(lcase)lib.h ] |
| 188 |
|| [ GLOB /usr/include/x86_64-linux-gnux32$(subd) : $(lcase).h $(lcase)lib.h ] { |
| 189 |
if [ GLOB /usr/lib : lib$(lcase).so ] || [ GLOB /usr/lib : lib$(lcase).a ] |
| 190 |
|| [ GLOB /usr/local/lib : lib$(lcase).so ] |
| 191 |
|| [ GLOB /usr/local/lib : lib$(lcase).a ] |
| 192 |
|| [ GLOB /usr/lib64 : lib$(lcase).so ] |
| 193 |
|| [ GLOB /usr/lib64 : lib$(lcase).a ] |
| 194 |
|| [ GLOB /usr/lib/x86_64-linux-gnu : lib$(lcase).so ] |
| 195 |
|| [ GLOB /usr/lib/x86_64-linux-gnu : lib$(lcase).a ] |
| 196 |
|| [ GLOB /usr/lib/i386-linux-gnu : lib$(lcase).so ] |
| 197 |
|| [ GLOB /usr/lib/i386-linux-gnu : lib$(lcase).a ] |
| 198 |
|| [ GLOB /usr/lib/alpha-linux-gnu : lib$(lcase).so ] |
| 199 |
|| [ GLOB /usr/lib/alpha-linux-gnu : lib$(lcase).a ] |
| 200 |
|| [ GLOB /usr/lib/aarch64-linux-gnu : lib$(lcase).so ] |
| 201 |
|| [ GLOB /usr/lib/aarch64-linux-gnu : lib$(lcase).a ] |
| 202 |
|| [ GLOB /usr/lib/arm-linux-gnueabi : lib$(lcase).so ] |
| 203 |
|| [ GLOB /usr/lib/arm-linux-gnueabi : lib$(lcase).a ] |
| 204 |
|| [ GLOB /usr/lib/arm-linux-gnueabihf : lib$(lcase).so ] |
| 205 |
|| [ GLOB /usr/lib/arm-linux-gnueabihf : lib$(lcase).a ] |
| 206 |
|| [ GLOB /usr/lib/hppa-linux-gnu : lib$(lcase).so ] |
| 207 |
|| [ GLOB /usr/lib/hppa-linux-gnu : lib$(lcase).a ] |
| 208 |
|| [ GLOB /usr/lib/i386-gnu : lib$(lcase).so ] |
| 209 |
|| [ GLOB /usr/lib/i386-gnu : lib$(lcase).a ] |
| 210 |
|| [ GLOB /usr/lib/x86_64-kfreebsd-gnu : lib$(lcase).so ] |
| 211 |
|| [ GLOB /usr/lib/x86_64-kfreebsd-gnu : lib$(lcase).a ] |
| 212 |
|| [ GLOB /usr/lib/i386-kfreebsd-gnu : lib$(lcase).so ] |
| 213 |
|| [ GLOB /usr/lib/i386-kfreebsd-gnu : lib$(lcase).a ] |
| 214 |
|| [ GLOB /usr/lib/loongarch64-linux-gnu : lib$(lcase).so ] |
| 215 |
|| [ GLOB /usr/lib/loongarch64-linux-gnu : lib$(lcase).a ] |
| 216 |
|| [ GLOB /usr/lib/m68k-linux-gnu : lib$(lcase).so ] |
| 217 |
|| [ GLOB /usr/lib/m68k-linux-gnu : lib$(lcase).a ] |
| 218 |
|| [ GLOB /usr/lib/mips-linux-gnu : lib$(lcase).so ] |
| 219 |
|| [ GLOB /usr/lib/mips-linux-gnu : lib$(lcase).a ] |
| 220 |
|| [ GLOB /usr/lib/mipsel-linux-gnu : lib$(lcase).so ] |
| 221 |
|| [ GLOB /usr/lib/mipsel-linux-gnu : lib$(lcase).a ] |
| 222 |
|| [ GLOB /usr/lib/mips64el-linux-gnuabi64 : lib$(lcase).so ] |
| 223 |
|| [ GLOB /usr/lib/mips64el-linux-gnuabi64 : lib$(lcase).a ] |
| 224 |
|| [ GLOB /usr/lib/powerpc-linux-gnu : lib$(lcase).so ] |
| 225 |
|| [ GLOB /usr/lib/powerpc-linux-gnu : lib$(lcase).a ] |
| 226 |
|| [ GLOB /usr/lib/powerpc-linux-gnuspe : lib$(lcase).so ] |
| 227 |
|| [ GLOB /usr/lib/powerpc-linux-gnuspe : lib$(lcase).a ] |
| 228 |
|| [ GLOB /usr/lib/powerpc64-linux-gnu : lib$(lcase).so ] |
| 229 |
|| [ GLOB /usr/lib/powerpc64-linux-gnu : lib$(lcase).a ] |
| 230 |
|| [ GLOB /usr/lib/powerpc64le-linux-gnu : lib$(lcase).so ] |
| 231 |
|| [ GLOB /usr/lib/powerpc64le-linux-gnu : lib$(lcase).a ] |
| 232 |
|| [ GLOB /usr/lib/riscv64-linux-gnu : lib$(lcase).so ] |
| 233 |
|| [ GLOB /usr/lib/riscv64-linux-gnu : lib$(lcase).a ] |
| 234 |
|| [ GLOB /usr/lib/s390x-linux-gnu : lib$(lcase).so ] |
| 235 |
|| [ GLOB /usr/lib/s390x-linux-gnu : lib$(lcase).a ] |
| 236 |
|| [ GLOB /usr/lib/sh4-linux-gnu : lib$(lcase).so ] |
| 237 |
|| [ GLOB /usr/lib/sh4-linux-gnu : lib$(lcase).a ] |
| 238 |
|| [ GLOB /usr/lib/sparc-linux-gnu : lib$(lcase).so ] |
| 239 |
|| [ GLOB /usr/lib/sparc-linux-gnu : lib$(lcase).a ] |
| 240 |
|| [ GLOB /usr/lib/sparc64-linux-gnu : lib$(lcase).so ] |
| 241 |
|| [ GLOB /usr/lib/sparc64-linux-gnu : lib$(lcase).a ] |
| 242 |
|| [ GLOB /usr/lib/x86_64-linux-gnux32 : lib$(lcase).so ] |
| 243 |
|| [ GLOB /usr/lib/x86_64-linux-gnux32 : lib$(lcase).a ] { |
| 244 |
echo "Using system $(UCASE) library" ; |
| 245 |
$(UCASE)LIB = ; |
| 246 |
$(UCASE)INC = ; |
| 247 |
LINKFLAGS += $(LINKFLAG)$(lcase) ; |
| 248 |
HAVE_$(UCASE) = true ; |
| 249 |
} |
| 250 |
} |
| 251 |
} |
| 252 |
|
| 253 |
# If nothing else, use Argyll supplied $(UCASE) library |
| 254 |
if ! $(HAVE_$(UCASE)) || $(BUILTIN_$(UCASE)) { |
| 255 |
echo "Using Argyll $(UCASE) library" ; |
| 256 |
$(UCASE)LIB = ../$(libname)/lib$(lcase).lib ; |
| 257 |
$(UCASE)INC = ../$(libname) ; |
| 258 |
} |
| 259 |
} |
| 260 |
|
| 261 |
# See if we have a system TIFF, JPEG, PNG or ZLIB library. |
| 262 |
# Note this generates: $(TIFFLIB) $(TIFFINC) $(JPEGLIB) $(JPEGINC) $(PNGLIB) |
| 263 |
# $(PNGINC) $(ZLIBLIB) $(ZINC) |
| 264 |
# !!!!! Add to makepackagebin.sh -sBUILTIN_XXX=true !!!!! |
| 265 |
CheckForLibrary "TIFF" ; |
| 266 |
CheckForLibrary "JPEG" ; |
| 267 |
CheckForLibrary "PNG" ; |
| 268 |
CheckForLibrary "Z" : "zlib" ; |
| 269 |
|
| 270 |
CheckForLibrary "SSL" : : "/openssl" ; |
| 271 |
# if OpenSSL not found: |
| 272 |
if ! $(HAVE_SSL) { |
| 273 |
SSLINC = ../ccast/axTLS ; |
| 274 |
SSLLIB = ../ccast/axTLS/libaxtls ; |
| 275 |
} |
| 276 |
|
| 277 |
# testing |
| 278 |
#DSTDIR = var ; |
| 279 |
#SRCDIR = .. ; |