# Unix makefile. It may not be as streamlined as possible, but it # is pretty readable. # Using pthreads via the FSF pth library with pthread interface enabled # http://www.fsf.org/software/pth/pth.html # ./configure --enable-pthread # # # NOTES: # # On FreeBSD (and probaly other platforms), building the tiff and # jpeg delegates using default settings will not enable proper # stack unwinding. If you attempt to call C++ exceptions from # error handlers you write, the C code will abort. With gcc you need # to specify '-fexceptions' to make sure exceptions work properly. # # The jpeg libraray was configured with: # ./configure CFLAGS='-O2 -fexceptions' # The tiff library was configured by modifying the configure app to: # - Disable DSO (DSO=no) # - Support stack unwinding: OPTIMIZER=-O -fexceptions # # You may also need to enable LZW compression when building libtiff. # See the file libtiff-lzw-compression-kit-1.3/README-LZW-COMPRESSION # for more information on how to do this and LZW licensing issues. COMPILER=c++ CFLAGS= -O2 -W -DHasPTHREADS -pthread DEBUG= -g LIBS=-lm -ljpeg -ltiff INCLUDEDIRS= -I../../include -I../../thirdparty/include/freebsd LIBDIRS=-L. -L../../thirdparty/lib/freebsd CC=$(COMPILER) $(CFLAGS) $(DEBUG) $(INCLUDEDIRS) $(DEFINES) LINK=$(CC) $(LIBDIRS) $(LIBS) all: filedelegates clean: rm *.o filedelegates main.o : main.cpp $(CC) -c -o main.o main.cpp imageTmpl.o : ../../../framework/image/imageTmpl.cpp $(CC) -c -o imageTmpl.o ../../../framework/image/imageTmpl.cpp imageStorage.o : ../../../framework/image/imageStorage.cpp $(CC) -c -o imageStorage.o ../../../framework/image/imageStorage.cpp imageTools.o : ../../../framework/image/imageTools.cpp $(CC) -c -o imageTools.o ../../../framework/image/imageTools.cpp imageTypes.o : ../../../framework/image/imageTypes.cpp $(CC) -c -o imageTypes.o ../../../framework/image/imageTypes.cpp io.o : ../../../framework/delegates/io.cpp $(CC) -c -o io.o ../../../framework/delegates/io.cpp jpeg.o : ../../../framework/delegates/jpeg.cpp $(CC) -c -o jpeg.o ../../../framework/delegates/jpeg.cpp tiff.o : ../../../framework/delegates/tiff.cpp $(CC) -c -o tiff.o ../../../framework/delegates/tiff.cpp iap.o : ../../../framework/delegates/iap.cpp $(CC) -c -o iap.o ../../../framework/delegates/iap.cpp geometry.o : ../../../framework/common/geometry.cpp $(CC) -c -o geometry.o ../../../framework/common/geometry.cpp bstring.o : ../../../framework/common/bstring.cpp $(CC) -c -o bstring.o ../../../framework/common/bstring.cpp timing.o : ../../../framework/common/timing.cpp $(CC) -c -o timing.o ../../../framework/common/timing.cpp lock.o : ../../../framework/unix/lock.cpp $(CC) -c -o lock.o ../../../framework/unix/lock.cpp unittest.o : ../../../framework/common/unitTest.cpp $(CC) -c -o unittest.o ../../../framework/common/unitTest.cpp filedelegates: main.o imageTmpl.o imageStorage.o imageTools.o imageTypes.o io.o jpeg.o tiff.o iap.o geometry.o bstring.o timing.o lock.o unittest.o $(CC) main.o imageTmpl.o imageStorage.o imageTools.o imageTypes.o io.o jpeg.o tiff.o iap.o geometry.o bstring.o timing.o lock.o unittest.o -o filedelegates $(LIBDIRS) $(LIBS)