###################################################################### # Makefile - command file for make to create CBFlib # # # # Version 0.6 13 January 1999 # # # # Paul Ellis (ellis@ssrl.slac.stanford.edu) and # # Herbert J. Bernstein (yaya@bernstein-plus-sons.com) # # # # PLEASE READ doc/CBFlib_NOTICES.txt # ###################################################################### SHELL = @SHELL@ # # Set the compiler and flags # CC = @CC@ CFLAGS = @CFLAGS@ # # Program to use to pack shars # SHAR = /usr/bin/shar #SHAR = /usr/local/bin/gshar RANLIB = @RANLIB@ AR = ar # # Directories # ROOT = @top_srcdir@ LIB = $(ROOT)/lib BIN = $(ROOT)/bin SRC = $(ROOT)/src INCLUDE = $(ROOT)/include EXAMPLES = $(ROOT)/examples # # Include directories # INCLUDES = -I$(INCLUDE) -I$(SRC) ###################################################################### # You should not need to make modifications below this line # ###################################################################### # # Suffixes of files to be used or built # .SUFFIXES: .c .o # # Common dependencies # COMMONDEP = Makefile # # Source files # SOURCE = $(SRC)/cbf.c \ $(SRC)/cbf_alloc.c \ $(SRC)/cbf_binary.c \ $(SRC)/cbf_byte_offset.c \ $(SRC)/cbf_canonical.c \ $(SRC)/cbf_codes.c \ $(SRC)/cbf_compress.c \ $(SRC)/cbf_context.c \ $(SRC)/cbf_file.c \ $(SRC)/cbf_lex.c \ $(SRC)/cbf_packed.c \ $(SRC)/cbf_predictor.c \ $(SRC)/cbf_read_binary.c \ $(SRC)/cbf_read_mime.c \ $(SRC)/cbf_string.c \ $(SRC)/cbf_stx.c \ $(SRC)/cbf_tree.c \ $(SRC)/cbf_uncompressed.c \ $(SRC)/md5c.c \ $(SRC)/cbfwrap.c \ $(SRC)/img.c # # Header files # HEADERS = $(INCLUDE)/cbf.h \ $(INCLUDE)/cbf_alloc.h \ $(INCLUDE)/cbf_binary.h \ $(INCLUDE)/cbf_byte_offset.h \ $(INCLUDE)/cbf_canonical.h \ $(INCLUDE)/cbf_codes.h \ $(INCLUDE)/cbf_compress.h \ $(INCLUDE)/cbf_context.h \ $(INCLUDE)/cbf_file.h \ $(INCLUDE)/cbf_lex.h \ $(INCLUDE)/cbf_packed.h \ $(INCLUDE)/cbf_predictor.h \ $(INCLUDE)/cbf_read_binary.h \ $(INCLUDE)/cbf_read_mime.h \ $(INCLUDE)/cbf_string.h \ $(INCLUDE)/cbf_stx.h \ $(INCLUDE)/cbf_tree.h \ $(INCLUDE)/cbf_uncompressed.h \ $(SRC)/global.h \ $(SRC)/img.h \ $(SRC)/md5.h # # Compile the library and examples # all: $(LIB)/libcbf.a # # Directories # $(LIB): mkdir $(LIB) $(BIN): mkdir $(BIN) # # Parser # #$(SRC)/cbf_stx.c: $(SRC)/cbf.stx # bison -d $(SRC)/cbf.stx # mv $(SRC)/cbf.stx.tab.c $(SRC)/cbf_stx.c # mv $(SRC)/cbf.stx.tab.h $(INCLUDE)/cbf_stx.h # # CBF library # $(LIB)/libcbf.a: $(SOURCE) $(HEADERS) $(COMMONDEP) $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -c $(SOURCE) $(AR) cr $@ *.o $(RANLIB) $@ mostlyclean-compile: -rm -f `find . -name "*.o" -print` -rm -f `find . -name "core" -print` -rm -f `find . -name "*.core" -print` clean-generic:; -rm -f `find . -name "*~" -print` clean: clean-lib clean-generic mostlyclean-compile distclean-generic: -rm -f Makefile -rm -f config.cache config.log stamp-h stamp-h[0-9]* clean-lib: -test -z "$(LIB)/libcbf.a" || rm -f $(LIB)/libcbf.a distclean: distclean-generic clean -rm -f `find . -name "*.a" -print` -rm -f config.status config.h realclean: distclean -rm -f $(SOURCE) $(HEADERS) config.sub config.guess config.h.in configure install-sh Makefile.in uninstall: clean-lib