Files

361 lines
9.9 KiB
Plaintext
Executable File

#PREF_CCFLAGS += $(CCOPTFLAG) ; # Turn optimisation on
PREF_CCFLAGS += $(CCDEBUGFLAG) ; # Debugging flags
#PREF_CCFLAGS += $(CCHEAPDEBUG) ; # Heap Debugging & Debugging flags
PREF_LINKFLAGS += $(LINKDEBUGFLAG) ;
# Compile .c as .m
if $(OS) = MACOSX {
ObjectCcFlags dispwin : -ObjC ;
ObjectCcFlags dispwin_dispwin : -ObjC ;
LINKFLAGS += -framework AudioToolbox ;
}
if $(USE_CMFM) = true {
echo "CMF Measurement device and accessories is enabled" ;
DEFINES += ENABLE_CMFM ;
}
if $(USE_PLOT) = true {
DEFINES += EN_PLOT ;
}
if [ GLOB [ NormPaths . ] : fastserio.c ] {
# echo "!!!!!!!!! fastserio.c is enabled !!!!!!!!!" ;
# DEFINES += ENABLE_FTDI ;
}
# Test code
#DEFINES += REPLAY_I1PRO3 ;
MADVRSOURCE = ;
# Setup the right hardware access libraries
if $(NT) {
MADVRSOURCE = madvrwin.c ;
if $(USE_LIBUSB0) = true {
DEFINES += EN_LIBUSB0 ;
}
if $(USE_USBDK) = true {
echo "####### got USE_USBDK" ;
DEFINES += EN_USBDK ;
}
}
if $(UNIX) {
CONVFILE = pollem.c ;
}
#Products
Libraries = libinsttypes libdisptechs libinst libdisp libconv libinstapp ;
Executables = dispwin synthcal dispread dispcal fakeread synthread
chartread spotread instlist illumread ccxxmake average oeminst ;
Headers = inst.h ;
Samples = SOtele.sp linear.cal strange.cal ccxx.ti1 ;
if [ GLOB [ NormPaths . ] : spec2cie.c ] {
Executables += spec2cie ;
}
#Install
InstallBin $(DESTDIR)$(PREFIX)/bin : $(Executables) ;
InstallFile $(DESTDIR)$(PREFIX)/$(REFSUBDIR) : $(Samples) ;
#InstallFile $(DESTDIR)$(PREFIX)/h : $(Headers) ;
#InstallLib $(DESTDIR)$(PREFIX)/lib : $(Libraries) ;
if $(UNIX) && $(OS) != MACOSX {
# Micro Unix CMM for handling monitor profile association
CMMHDRS = ../ucmm ;
CMMLIBS = ../ucmm/libucmm ../jcnf/libjcnf ../yajl/libyajl ;
}
HDRS = ../h ../numlib ../icc ../cgats ../rspl ../xicc ../gamut ../spectro
../plot ../render ../ccast $(CMMHDRS) ;
# Instrument access library library
SER_INSTS = dtp22.c dtp41.c dtp51.c ss.c ss_imp.c ;
USB_INSTS = dtp20.c i1disp.c i1d3.c i1pro.c i1pro_imp.c i1pro3.c i1pro3_imp.c
munki.c munki_imp.c hcfr.c spyd2.c spydX.c spydX2.c huey.c
colorhug.c ex1.c hidio.c usbio.c ;
if [ GLOB [ NormPaths . ] : d123.c ] {
USB_INSTS += d123.c ;
}
FAST_SER_INSTS = specbos.c kleink10.c smcube.c ;
SER_USB_INSTS = dtp92.c ;
if $(USE_SERIAL) = true {
DEFINES += ENABLE_SERIAL ;
INST_SRCS += $(SER_INSTS) ;
}
if $(USE_USB) = true {
DEFINES += ENABLE_USB ;
INST_SRCS += $(USB_INSTS) ;
}
if $(USE_FAST_SERIAL) = true || $(USE_SERIAL) = true {
DEFINES += ENABLE_FAST_SERIAL ;
INST_SRCS += $(FAST_SER_INSTS) ;
}
if $(USE_SERIAL) = true || $(USE_USB) = true {
INST_SRCS += $(SER_USB_INSTS) ;
}
if $(USE_D123) = true {
DEFINES += ENABLE_D123 ;
}
if $(USE_DEMOINST) = true && [ GLOB [ NormPaths . ] : demoinst.c ] {
echo "Compiling demo instrument support" ;
DEFINES += ENABLE_DEMOINST ;
INST_SRCS += demoinst.c ;
}
if $(USE_VTPGLUT) = true && [ GLOB [ NormPaths . ] : vtpglut.c ] {
echo "Compiling Video Test Pattern Generator and 3DLUT support" ;
DEFINES += ENABLE_VTPGLUT ;
INST_SRCS += vtpglut.c ;
}
if $(USE_PRINTERS) = true && [ GLOB [ NormPaths . ] : printers.c ] {
echo "Compiling Printer support" ;
DEFINES += ENABLE_DEMOINST ;
INST_SRCS += printers.c ;
}
if $(USE_CMFM) = true && [ GLOB [ NormPaths . ] : colvis.c ] {
echo "Compiling ColVis support" ;
DEFINES += MASTER ;
INST_SRCS += colvis.c ;
}
if $(USE_CMFM) = true && [ GLOB [ NormPaths . ] : ledcool.c ] {
echo "Compiling LedCool support" ;
INST_SRCS += ledcool.c ;
}
Library libinst : inst.c insttypes.c icoms.c disptechs.c rspec.c xrga.c $(INST_SRCS) ;
# Display access library
ObjectKeep mongoose.c ;
Library libdisp : dispsup.c dispwin.c webwin.c ccwin.c dummywin.c
$(MADVRSOURCE) : : : $(LibWinH) : mongoose ;
# Instrument and Display types utility functions library. Use these instead of libinst when */
# applications need to know about different instrument or display types, but not access them. */
# (Note we're working around a bug in Jam caused by objects shared between libraries)
Object insttypes2 : insttypes.c ;
Object xrga2 : xrga.c ;
LibraryFromObjects libinsttypes : insttypes2 xrga2 ;
Object disptechs2 : disptechs.c ;
LibraryFromObjects libdisptechs : disptechs2 ;
# System utility functions (keyboard, msec_*, thread)
Library libconv : xdg_bds.c aglob.c conv.c base64.c $(CONVFILE) : : : $(LibWinH) ;
# Command line application instrument related convenience functions
Library libinstapp : instappsup.c ;
# Support file
#Object alphix : ../target/alphix.c ;
LINKLIBS = libinst libinstapp
../xicc/libxcolorants ../xicc/libxicc
../gamut/libgamut
../rspl/librspl ../cgats/libcgats
../icc/libicc ../plot/libplot ../plot/libvrml
../ccast/libccast $(SSLLIB) ../yajl/libyajl
$(TIFFLIB) $(JPEGLIB) $(PNGLIB) $(ZLIB)
../numlib/libui libconv ../numlib/libnum
$(CMMLIBS) ;
if $(USE_USB) = true {
if $(LIBUSB_IS_DLL) = true {
LINKSHLIBS = $(LIBUSBDIR)/$(LIBUSB) ;
File $(LIBUSBSH) : $(LIBUSBDIR)/$(LIBUSBSH) ;
# executable needs .so/.dll in same directory
NDepends $(Executables) : $(LIBUSBSH) ;
} else {
LINKLIBS += $(LIBUSBDIR)/$(LIBUSB) ;
}
}
LINKFLAGS += $(GUILINKFLAGS) ;
# General target reader program
Main chartread : chartread.c ../target/alphix.c : : : ../target : : ;
# Illuminant measurement
Main illumread : illumread.c : : : ../target : : ;
# Printed target spot reader utility
Main spotread : spotread.c : : : : : ;
# Connected instrument enumeration utility
Main instlist : instlist.c : : : : : ;
Clean clean : instlist$(SUFEXE) instlist.o ;
echo "HOME = " $(HOME) ;
echo "PWD = " $(PWD) ;
# CCMX and CCSStool
Main ccxxmake : ccxxmake.c : : : : : libdisp ../render/librender ;
# Gretag Spectroscan/T filmstrip reader
#Main filmread : filmread.c : : : : : ;
# Create synthetic .cal
Main synthcal : synthcal.c ;
# Display calibration program
Main dispcal : dispcal.c : : : ../target : : libdisp ../render/librender ;
# Display tester program
Main dispread : dispread.c : : : : : libdisp ../render/librender ;
if $(USE_CMFM) = true && [ GLOB [ NormPaths . ] : 1501_cal.c ] {
echo "Compiling LedCool support" ;
Main 1501_cal : 1501_cal.c ;
}
if [ GLOB [ NormPaths . ] : setoem.c ] {
echo "Compiling OEM setcode support" ;
Main setoem : setoem.c ;
}
# Misc. test code
if [ GLOB [ NormPaths . ] : i1d3test.c ] {
Main i1d3test : i1d3test.c ;
}
if [ GLOB [ NormPaths . ] : i1d3test2.c ] {
Main i1d3test2 : i1d3test2.c ;
}
#display test window test/Lut loader utility
# [ Could avoid need for libinst libusb etc.
# by separating system dependent utils to a separate library .]
MainVariant dispwin : dispwin.c webwin.c ccwin.c dummywin.c $(MADVRSOURCE) : : STANDALONE_TEST : : mongoose : ../render/librender $(LibWin) ;
LINKLIBS = libinsttypes libdisptechs ../xicc/libxicc ../gamut/libgamut ../rspl/librspl
../cgats/libcgats ../icc/libicc ../plot/libplot libconv ../numlib/libnum
../numlib/libui ../plot/libvrml ;
# Fake device print/read utility using ICC profile
Main fakeread : fakeread.c ;
# Synthetic device print/read utility
Main synthread : synthread.c ;
# Add CIE values to a spectral reading file
if [ GLOB [ NormPaths . ] : spec2cie.c ] {
Main spec2cie : spec2cie.c ;
}
# Average RGB or CMYK .ti3 files
Main average : average.c ;
# Utility to install ccmx's, ccss's or install from OEM EDR files
Objects oemarch.c vinflate.c inflate.c LzmaDec.c mongoose.c ;
Main oeminst : oeminst.c : : : : oemarch vinflate inflate LzmaDec : libconv ;
# Generate linear.cal example/diagnostic
# (NoUpdate so that Cross Compile Win64 hack works)
NNoUpdate linear.cal ;
SYNTHCAL = synthcal ;
if $(RUNNER) {
NDepends linear.cal : synthcal ;
SYNTHCAL = $(RUNNER) [ NormPaths synthcal ] ;
}
GenFileND linear.cal : $(SYNTHCAL) [ NormPaths linear ] ;
NDepends exe : linear.cal ; # Normally create it
# Generate strange.cal example/diagnostic
# (NoUpdate so that Cross Compile Win64 hack works)
NNoUpdate strange.cal ;
SYNTHCAL = synthcal ;
if $(RUNNER) {
NDepends strange.cal : synthcal ;
SYNTHCAL = $(RUNNER) [ NormPaths synthcal ] ;
}
GenFileND strange.cal : $(SYNTHCAL) -s 0.7,1.0,0.9 -p 1.7,0.8,0.7 [ NormPaths strange ] ;
NDepends exe : strange.cal ; # Normally create it
# Dumy ti3 file generator for testing
#Main dumyti3 : dumyti3.c ;
# Test utility for XYZ matrix spectral correction
#Main xyzfix : xyzfix.c ;
# Individual stand alone test of xdg_bds library
MainVariant xdg_bds : xdg_bds.c : : STANDALONE_TEST : : : libconv ;
# fp conversion code test
#Main fp : fp.c ;
# test code
#Main t : t.c ;
#Main tt : tt.c ;
#Main ttt : ttt.c ;
#Main t1 : t1.c ;
#Main tt : tt.c ;
#Main t8 : t8.c ;
#Main t9 : t9.c ;
#Main i1d3eval : i1d3eval.c ;
# Simple test code of aglob
if [ GLOB [ NormPaths . ] : globtest.c ] {
Main globtest : globtest.c : : : : : libconv ;
}
# reflect_db.txt parser */
if [ GLOB [ NormPaths . ] : txt2sp.c ] {
Main txt2sp : txt2sp.c ;
}
# SwatchMate Cube calibration
if [ GLOB [ NormPaths . ] : cubecal.c ] {
Main cubecal : cubecal.c ;
}
if [ GLOB [ NormPaths . ] : mdnslib.c ] {
echo "Found mdnslib.c !" ;
# One-shot mDNS client & server library
Library libmdns : mdnslib.c ;
# Individual stand alone test of mdnslib library
MainVariant mdnstest : mdnslib.c : : STANDALONE_TEST : : : libmdns ../numlib/libnum ;
}
# ColorMeter utility
if [ GLOB [ NormPaths . ] : oemdnld.c ] {
echo "Found oemdnld.c !" ;
Main oemdnld : oemdnld.c : : : : oemarch vinflate inflate LzmaDec mongoose : libconv libmdns ;
}
# Test code
if $(BUILD_JUNK) {
# /SUBSYSTEM:WINDOWS on NT link ?
# Main fakeindev : fakeindev.c ;
# Main cmtest : cmtest.c : : : : : libconv ;
# Main webdisp : webdisp.c : : : : : libconv ;
# test for parsing a VISE archive
#Main visetest : visetest.c vinflate.c ;
# Compute deconvolution filter for i1pro
#Main i1deconv : i1deconv.c ;
# Compute stray light calibration for i1pro
#Main i1stray : i1stray.c ;
}