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