# # Makefile for LUG # # (c) 1992, Raul Rivero # # Makefile for the LUG Library --> Linux version # # # ******************************************************** # * * # * Check include/lugconfig.h for internal defines !!! * # * * # ******************************************************** # # Shell SHELL = /bin/sh # # Directories of LUG package. # DIRS = convert lib show utils # # Uncomment next line if you are using other compiler (e.g. gcc) # CC?= gcc # # Compiler options ( only C-O-M-P-I-L-E-R, not LUG options ). # COPTS = ${CFLAGS} # # Location of LUG header files. # LUGINC = -I../include LUGLIB = -L.. -llug # # Where lug library will live # LIBLUGDEST = ${PREFIX}/lib # # If you have installed the Utah Raster Toolkit library define # next variables, example: # # URTINC = -I/usr/local/include/urt # URTLIB = -L/usr/local/lib -lrle # URTDEF = -DiRLE # # , or leave undefined if you don't have it. # #URTINC = -I/usr/local/include/urt #URTLIB = /usr/local/lib/librle.a #URTLIB = -L/usr/local/lib -lrle #URTDEF = -DiRLE # # If you have installed the Sam Leffler's TIFF library define # next variables, example: # # TIFFINC = -I/usr/local/include/tiff # TIFFLIB = -L/usr/local/lib -ltiff # TIFFDEF = -DiTIFF # # , or leave undefined if you don't have it. # #TIFFINC = -I/usr/local/include/tiff #TIFFLIB = /usr/local/lib/libtiff.a TIFFLIB = -L${PREFIX}/lib -ltiff TIFFDEF = -DiTIFF # # If you have installed the JPEG library define # next variables, example: # # JPEGINC = -I/usr/local/include/jpeg # JPEGLIB = -L/usr/local/lib -ljpeg # JPEGDEF = -DiJPEG # # , but if you already has installed the new (5.*) IJL library # change the last on with: # # JPEGDEF = -DiJPEGNEW # # , or leave undefined if you don't have it. # JPEGINC = -I${PREFIX}/include #JPEGLIB = /usr/local/lib/libjpeg.a JPEGLIB = -L${PREFIX}/lib -ljpeg JPEGDEF = -DiJPEGNEW # # If your machine is a SGI computer define next variables, ... ok, # ok, an example: # # SGIINC = -I/usr/include/gl # SGILIB = -limage # SGIDEF = -DiSGI # # , else leave undefined. # SGIINC = SGILIB = SGIDEF = # # Define what kind of viwer you'll support. Options are: # # Machine Add # ------- --- # hp9000 -DiHP # sgi/aix -DiGL # pc -DiPC # x11 -DiX11 # vfr ( sgi ) -DiVFR <-- SGI's Video Framer needs hardware # linux -DiLINUX # # Probably, also you'll need give a path to the headers. # # And example: we have a SGI with X11 and a Video FRamer, so # we define... # # VIEWDEF = -DiGL -DiVFR # VIEWLIB = -lgl_s -lvfr # VIEWINC = -I/usr/include/gl -I/usr/video/vfr/src/inc # VIEWINC = -I${X11BASE}/include VIEWLIB = -L${X11BASE}/lib -lX11 VIEWDEF = -DiX11 # # Final includes ( don't touch this ! ). # INCS = $(LUGINC) $(URTINC) $(TIFFINC) $(JPEGINC) $(SGIINC) $(VIEWINC) LIBS = $(LUGLIB) $(URTLIB) $(TIFFLIB) $(JPEGLIB) $(VIEWLIB) -lm -lcompat DEFS = $(URTDEF) $(TIFFDEF) $(JPEGDEF) $(SGIDEF) $(VIEWDEF) # # Library objects. # OBJS = convert/cnv.o convert/encodgif.o convert/gif.o \ convert/heightfield.o convert/jpeg.o convert/pbm.o \ convert/pcx.o convert/pix.o convert/ps.o \ convert/raw.o convert/rgb.o convert/rla.o \ convert/rle.o convert/sgi.o convert/tga.o \ convert/tiff.o lib/bitmap.o lib/error.o \ lib/general.o lib/in_out.o lib/memory.o \ show/hp.o show/pc.o show/sgi.o \ show/vfr.o show/x11.o utils/blur.o \ utils/change.o utils/chroma.o utils/cut.o \ utils/dither.o utils/flip.o utils/gamma.o \ utils/histoequal.o utils/hsl.o utils/mask.o \ utils/medianfilter.o utils/mirror.o utils/paste.o \ utils/quantize.o utils/rotate.o utils/sharpen.o \ utils/slowzoom.o utils/solid.o utils/to24.o \ utils/tobw.o utils/tohalftone.o utils/toinverse.o \ utils/zoom.o utils/convolve.o show/linux.o all: liblug.a example clean:; rm -f $(OBJS) liblug.a ( cd examples; $(MAKE) clean ) install: liblug.a /usr/bin/install -c -o root -g wheel -m 444 liblug.a $(LIBLUGDEST) archive:; ( cd .. ; tar cvf lug-1.0.tar lug ; compress lug-1.0.tar ) liblug.a:; @for i in $(DIRS); do \ ( cd $$i ; make "INCS=$(INCS)" "DEFS=$(DEFS)" "CC=$(CC)" "COPTS=$(COPTS)" ) ; \ done; ar scr liblug.a $(OBJS) ### ranlib liblug.a example: liblug.a ( cd examples; make "INCS=$(LUGINC)" "LIBS=$(LIBS)" "CC=$(CC)" "COPTS=$(COPTS)" )