Debian Codegraph @

spectro/Jamfile

raw
1
2
3 #PREF_CCFLAGS += $(CCOPTFLAG) ; # Turn optimisation on
4 PREF_CCFLAGS += $(CCDEBUGFLAG) ; # Debugging flags
5 #PREF_CCFLAGS += $(CCHEAPDEBUG) ; # Heap Debugging & Debugging flags
6 PREF_LINKFLAGS += $(LINKDEBUGFLAG) ;
7
8 # Compile .c as .m
9 if $(OS) = MACOSX {
10 ObjectCcFlags dispwin : -ObjC ;
11 ObjectCcFlags dispwin_dispwin : -ObjC ;
12 LINKFLAGS += -framework AudioToolbox ;
13 }
14
15 if $(USE_CMFM) = true {
16 echo "CMF Measurement device and accessories is enabled" ;
17 DEFINES += ENABLE_CMFM ;
18 }
19
20 if $(USE_PLOT) = true {
21 DEFINES += EN_PLOT ;
22 }
23
24 if [ GLOB [ NormPaths . ] : fastserio.c ] {
25 # echo "!!!!!!!!! fastserio.c is enabled !!!!!!!!!" ;
26 # DEFINES += ENABLE_FTDI ;
27 }
28
29 # Test code
30 #DEFINES += REPLAY_I1PRO3 ;
31
32 MADVRSOURCE = ;
33
34 # Setup the right hardware access libraries
35 if $(NT) {
36 MADVRSOURCE = madvrwin.c ;
37
38 if $(USE_LIBUSB0) = true {
39 DEFINES += EN_LIBUSB0 ;
40 }
41 if $(USE_USBDK) = true {
42 echo "####### got USE_USBDK" ;
43 DEFINES += EN_USBDK ;
44 }
45 }
46
47 if $(UNIX) {
48 CONVFILE = pollem.c ;
49 }
50
51 #Products
52 Libraries = libinsttypes libdisptechs libinst libdisp libconv libinstapp ;
53 Executables = dispwin synthcal dispread dispcal fakeread synthread
54 chartread spotread illumread ccxxmake average oeminst ;
55 Headers = inst.h ;
56 Samples = SOtele.sp linear.cal strange.cal ccxx.ti1 ;
57
58 if [ GLOB [ NormPaths . ] : spec2cie.c ] {
59 Executables += spec2cie ;
60 }
61
62 #Install
63 InstallBin $(DESTDIR)$(PREFIX)/bin : $(Executables) ;
64 InstallFile $(DESTDIR)$(PREFIX)/$(REFSUBDIR) : $(Samples) ;
65 #InstallFile $(DESTDIR)$(PREFIX)/h : $(Headers) ;
66 #InstallLib $(DESTDIR)$(PREFIX)/lib : $(Libraries) ;
67
68 if $(UNIX) && $(OS) != MACOSX {
69 # Micro Unix CMM for handling monitor profile association
70 CMMHDRS = ../ucmm ;
71 CMMLIBS = ../ucmm/libucmm ../jcnf/libjcnf ../yajl/libyajl ;
72 }
73
74 HDRS = ../h ../numlib ../icc ../cgats ../rspl ../xicc ../gamut ../spectro
75 ../plot ../render ../ccast $(CMMHDRS) ;
76
77 # Instrument access library library
78 SER_INSTS = dtp22.c dtp41.c dtp51.c ss.c ss_imp.c ;
79
80 USB_INSTS = dtp20.c i1disp.c i1d3.c i1pro.c i1pro_imp.c i1pro3.c i1pro3_imp.c
81 munki.c munki_imp.c hcfr.c spyd2.c spydX.c spydX2.c huey.c
82 colorhug.c ex1.c hidio.c usbio.c ;
83 if [ GLOB [ NormPaths . ] : d123.c ] {
84 USB_INSTS += d123.c ;
85 }
86
87 FAST_SER_INSTS = specbos.c kleink10.c smcube.c ;
88
89 SER_USB_INSTS = dtp92.c ;
90
91 if $(USE_SERIAL) = true {
92 DEFINES += ENABLE_SERIAL ;
93 INST_SRCS += $(SER_INSTS) ;
94 }
95
96 if $(USE_USB) = true {
97 DEFINES += ENABLE_USB ;
98 INST_SRCS += $(USB_INSTS) ;
99 }
100
101 if $(USE_FAST_SERIAL) = true || $(USE_SERIAL) = true {
102 DEFINES += ENABLE_FAST_SERIAL ;
103 INST_SRCS += $(FAST_SER_INSTS) ;
104 }
105
106 if $(USE_SERIAL) = true || $(USE_USB) = true {
107 INST_SRCS += $(SER_USB_INSTS) ;
108 }
109
110 if $(USE_D123) = true {
111 DEFINES += ENABLE_D123 ;
112 }
113
114 if $(USE_DEMOINST) = true && [ GLOB [ NormPaths . ] : demoinst.c ] {
115 echo "Compiling demo instrument support" ;
116 DEFINES += ENABLE_DEMOINST ;
117 INST_SRCS += demoinst.c ;
118 }
119
120 if $(USE_VTPGLUT) = true && [ GLOB [ NormPaths . ] : vtpglut.c ] {
121 echo "Compiling Video Test Pattern Generator and 3DLUT support" ;
122 DEFINES += ENABLE_VTPGLUT ;
123 INST_SRCS += vtpglut.c ;
124 }
125
126 if $(USE_PRINTERS) = true && [ GLOB [ NormPaths . ] : printers.c ] {
127 echo "Compiling Printer support" ;
128 DEFINES += ENABLE_DEMOINST ;
129 INST_SRCS += printers.c ;
130 }
131
132 if $(USE_CMFM) = true && [ GLOB [ NormPaths . ] : colvis.c ] {
133 echo "Compiling ColVis support" ;
134 DEFINES += MASTER ;
135 INST_SRCS += colvis.c ;
136 }
137
138 if $(USE_CMFM) = true && [ GLOB [ NormPaths . ] : ledcool.c ] {
139 echo "Compiling LedCool support" ;
140 INST_SRCS += ledcool.c ;
141 }
142
143 Library libinst : inst.c insttypes.c icoms.c disptechs.c rspec.c xrga.c $(INST_SRCS) ;
144
145 # Display access library
146 ObjectKeep mongoose.c ;
147 Library libdisp : dispsup.c dispwin.c webwin.c ccwin.c dummywin.c
148 $(MADVRSOURCE) : : : $(LibWinH) : mongoose ;
149
150 # Instrument and Display types utility functions library. Use these instead of libinst when */
151 # applications need to know about different instrument or display types, but not access them. */
152 # (Note we're working around a bug in Jam caused by objects shared between libraries)
153 Object insttypes2 : insttypes.c ;
154 Object xrga2 : xrga.c ;
155 LibraryFromObjects libinsttypes : insttypes2 xrga2 ;
156
157 Object disptechs2 : disptechs.c ;
158 LibraryFromObjects libdisptechs : disptechs2 ;
159
160 # System utility functions (keyboard, msec_*, thread)
161 Library libconv : xdg_bds.c aglob.c conv.c base64.c $(CONVFILE) : : : $(LibWinH) ;
162
163 # Command line application instrument related convenience functions
164 Library libinstapp : instappsup.c ;
165
166 # Support file
167 #Object alphix : ../target/alphix.c ;
168
169 LINKLIBS = libinst libinstapp
170 ../xicc/libxcolorants ../xicc/libxicc
171 ../gamut/libgamut
172 ../rspl/librspl ../cgats/libcgats
173 ../icc/libicc ../plot/libplot ../plot/libvrml
174 ../ccast/libccast $(SSLLIB) ../yajl/libyajl
175 $(TIFFLIB) $(JPEGLIB) $(PNGLIB) $(ZLIB)
176 ../numlib/libui libconv ../numlib/libnum
177 $(CMMLIBS) ;
178
179 if $(USE_USB) = true {
180 if $(LIBUSB_IS_DLL) = true {
181 LINKSHLIBS = $(LIBUSBDIR)/$(LIBUSB) ;
182 File $(LIBUSBSH) : $(LIBUSBDIR)/$(LIBUSBSH) ;
183 # executable needs .so/.dll in same directory
184 NDepends $(Executables) : $(LIBUSBSH) ;
185 } else {
186 LINKLIBS += $(LIBUSBDIR)/$(LIBUSB) ;
187 }
188 }
189
190 LINKFLAGS += $(GUILINKFLAGS) ;
191
192 # General target reader program
193 Main chartread : chartread.c ../target/alphix.c : : : ../target : : ;
194
195 # Illuminant measurement
196 Main illumread : illumread.c : : : ../target : : ;
197
198 # Printed target spot reader utility
199 Main spotread : spotread.c : : : : : ;
200
201 echo "HOME = " $(HOME) ;
202 echo "PWD = " $(PWD) ;
203
204 # CCMX and CCSStool
205 Main ccxxmake : ccxxmake.c : : : : : libdisp ../render/librender ;
206
207 # Gretag Spectroscan/T filmstrip reader
208 #Main filmread : filmread.c : : : : : ;
209
210 # Create synthetic .cal
211 Main synthcal : synthcal.c ;
212
213 # Display calibration program
214 Main dispcal : dispcal.c : : : ../target : : libdisp ../render/librender ;
215
216 # Display tester program
217 Main dispread : dispread.c : : : : : libdisp ../render/librender ;
218
219 if $(USE_CMFM) = true && [ GLOB [ NormPaths . ] : 1501_cal.c ] {
220 echo "Compiling LedCool support" ;
221 Main 1501_cal : 1501_cal.c ;
222 }
223
224 if [ GLOB [ NormPaths . ] : setoem.c ] {
225 echo "Compiling OEM setcode support" ;
226 Main setoem : setoem.c ;
227 }
228
229 # Misc. test code
230 if [ GLOB [ NormPaths . ] : i1d3test.c ] {
231 Main i1d3test : i1d3test.c ;
232 }
233 if [ GLOB [ NormPaths . ] : i1d3test2.c ] {
234 Main i1d3test2 : i1d3test2.c ;
235 }
236
237 #display test window test/Lut loader utility
238 # [ Could avoid need for libinst libusb etc.
239 # by separating system dependent utils to a separate library .]
240 MainVariant dispwin : dispwin.c webwin.c ccwin.c dummywin.c $(MADVRSOURCE) : : STANDALONE_TEST : : mongoose : ../render/librender $(LibWin) ;
241
242 LINKLIBS = libinsttypes libdisptechs ../xicc/libxicc ../gamut/libgamut ../rspl/librspl
243 ../cgats/libcgats ../icc/libicc ../plot/libplot libconv ../numlib/libnum
244 ../numlib/libui ../plot/libvrml ;
245
246 # Fake device print/read utility using ICC profile
247 Main fakeread : fakeread.c ;
248
249 # Synthetic device print/read utility
250 Main synthread : synthread.c ;
251
252 # Add CIE values to a spectral reading file
253 if [ GLOB [ NormPaths . ] : spec2cie.c ] {
254 Main spec2cie : spec2cie.c ;
255 }
256
257 # Average RGB or CMYK .ti3 files
258 Main average : average.c ;
259
260 # Utility to install ccmx's, ccss's or install from OEM EDR files
261 Objects oemarch.c vinflate.c inflate.c LzmaDec.c mongoose.c ;
262 Main oeminst : oeminst.c : : : : oemarch vinflate inflate LzmaDec : libconv ;
263
264 # Generate linear.cal example/diagnostic
265 # (NoUpdate so that Cross Compile Win64 hack works)
266 NNoUpdate linear.cal ;
267 SYNTHCAL = synthcal ;
268 if $(RUNNER) {
269 NDepends linear.cal : synthcal ;
270 SYNTHCAL = $(RUNNER) [ NormPaths synthcal ] ;
271 }
272 GenFileND linear.cal : $(SYNTHCAL) [ NormPaths linear ] ;
273 NDepends exe : linear.cal ; # Normally create it
274
275 # Generate strange.cal example/diagnostic
276 # (NoUpdate so that Cross Compile Win64 hack works)
277 NNoUpdate strange.cal ;
278 SYNTHCAL = synthcal ;
279 if $(RUNNER) {
280 NDepends strange.cal : synthcal ;
281 SYNTHCAL = $(RUNNER) [ NormPaths synthcal ] ;
282 }
283 GenFileND strange.cal : $(SYNTHCAL) -s 0.7,1.0,0.9 -p 1.7,0.8,0.7 [ NormPaths strange ] ;
284 NDepends exe : strange.cal ; # Normally create it
285
286 # Dumy ti3 file generator for testing
287 #Main dumyti3 : dumyti3.c ;
288
289 # Test utility for XYZ matrix spectral correction
290 #Main xyzfix : xyzfix.c ;
291
292 # Individual stand alone test of xdg_bds library
293 MainVariant xdg_bds : xdg_bds.c : : STANDALONE_TEST : : : libconv ;
294
295 # fp conversion code test
296 #Main fp : fp.c ;
297
298 # test code
299 #Main t : t.c ;
300 #Main tt : tt.c ;
301 #Main ttt : ttt.c ;
302 #Main t1 : t1.c ;
303 #Main tt : tt.c ;
304 #Main t8 : t8.c ;
305 #Main t9 : t9.c ;
306 #Main i1d3eval : i1d3eval.c ;
307
308 # Simple test code of aglob
309 if [ GLOB [ NormPaths . ] : globtest.c ] {
310 Main globtest : globtest.c : : : : : libconv ;
311 }
312
313 # reflect_db.txt parser */
314 if [ GLOB [ NormPaths . ] : txt2sp.c ] {
315 Main txt2sp : txt2sp.c ;
316 }
317
318 # SwatchMate Cube calibration
319 if [ GLOB [ NormPaths . ] : cubecal.c ] {
320 Main cubecal : cubecal.c ;
321 }
322
323 if [ GLOB [ NormPaths . ] : mdnslib.c ] {
324 echo "Found mdnslib.c !" ;
325
326 # One-shot mDNS client & server library
327 Library libmdns : mdnslib.c ;
328
329 # Individual stand alone test of mdnslib library
330 MainVariant mdnstest : mdnslib.c : : STANDALONE_TEST : : : libmdns ../numlib/libnum ;
331 }
332
333 # ColorMeter utility
334 if [ GLOB [ NormPaths . ] : oemdnld.c ] {
335 echo "Found oemdnld.c !" ;
336 Main oemdnld : oemdnld.c : : : : oemarch vinflate inflate LzmaDec mongoose : libconv libmdns ;
337 }
338
339 # Test code
340 if $(BUILD_JUNK) {
341
342 # /SUBSYSTEM:WINDOWS on NT link ?
343
344 # Main fakeindev : fakeindev.c ;
345 # Main cmtest : cmtest.c : : : : : libconv ;
346 # Main webdisp : webdisp.c : : : : : libconv ;
347 # test for parsing a VISE archive
348 #Main visetest : visetest.c vinflate.c ;
349
350 # Compute deconvolution filter for i1pro
351 #Main i1deconv : i1deconv.c ;
352
353 # Compute stray light calibration for i1pro
354 #Main i1stray : i1stray.c ;
355 }
356