# *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
# ** Copyright UCAR (c) 1992 - 2013
# ** University Corporation for Atmospheric Research (UCAR)
# ** National Center for Atmospheric Research (NCAR)
# ** Research Applications Lab (RAL)
# ** P.O.Box 3000, Boulder, Colorado, 80307-3000, USA
# *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*

########################################################################
#
# Makefile for the vx_render library
#
########################################################################


EXECUTABLES =


OBJECTS     = ascii85_filter.o \
              bit_filter.o \
              hex_filter.o \
              ps_filter.o \
              psout_filter.o \
              render_pbm.o \
              render_pcm.o \
              render_pgm.o \
              render_ppm.o \
              renderinfo.o \
              rle_filter.o \
              uc_queue.o


LIBRARIES   = libvx_render.a


########################################################################


HEADERS     = ascii85_filter.h \
              bit_filter.h \
              hex_filter.h \
              ps_filter.h \
              psout_filter.h \
              vx_render.h \
              renderinfo.h \
              rle_filter.h \
              uc_queue.h


########################################################################


all: $(OBJECTS) $(LIBRARIES) $(EXECUTABLES)
	@ echo
	@ echo "*** Finished Making the vx_render Library ***"
	@ echo


########################################################################


   ##
   ##  objects
   ##


ascii85_filter.o: ascii85_filter.cc
	$(CXX) ascii85_filter.cc $(CXX_FLAGS) -c -I$(MET_INC_DIR)

bit_filter.o: bit_filter.cc
	$(CXX) bit_filter.cc $(CXX_FLAGS) -c -I$(MET_INC_DIR)

hex_filter.o: hex_filter.cc
	$(CXX) hex_filter.cc $(CXX_FLAGS) -c -I$(MET_INC_DIR)

ps_filter.o: ps_filter.cc
	$(CXX) ps_filter.cc $(CXX_FLAGS) -c -I$(MET_INC_DIR)

psout_filter.o: psout_filter.cc
	$(CXX) psout_filter.cc $(CXX_FLAGS) -c -I$(MET_INC_DIR)

render_pbm.o: render_pbm.cc
	$(CXX) render_pbm.cc $(CXX_FLAGS) -c -I$(MET_INC_DIR)

render_pcm.o: render_pcm.cc
	$(CXX) render_pcm.cc $(CXX_FLAGS) -c -I$(MET_INC_DIR)

render_pgm.o: render_pgm.cc
	$(CXX) render_pgm.cc $(CXX_FLAGS) -c -I$(MET_INC_DIR)

render_ppm.o: render_ppm.cc
	$(CXX) render_ppm.cc $(CXX_FLAGS) -c -I$(MET_INC_DIR)

renderinfo.o: renderinfo.cc
	$(CXX) renderinfo.cc $(CXX_FLAGS) -c -I$(MET_INC_DIR)

rle_filter.o: rle_filter.cc
	$(CXX) rle_filter.cc $(CXX_FLAGS) -c -I$(MET_INC_DIR)

uc_queue.o: uc_queue.cc
	$(CXX) uc_queue.cc $(CXX_FLAGS) -c -I$(MET_INC_DIR)


########################################################################


   ##
   ##  libraries
   ##


libvx_render.a: $(OBJECTS)
	ar -rs libvx_render.a $(OBJECTS) 2>&1
	ranlib libvx_render.a
	cd $(MET_INC_DIR) ; rm -f $(HEADERS)
	cp $(HEADERS) $(MET_INC_DIR)
	rm -f $(MET_LIB_DIR)/libvx_render.a
	cp libvx_render.a $(MET_LIB_DIR)


########################################################################


   ##
   ##  executables
   ##


########################################################################


clean:
	rm -f *.a *.o temp junk core a.out $(OBJECTS) $(LIBRARIES) $(EXECUTABLES)
	cd $(MET_INC_DIR) ; rm -f $(HEADERS)
	rm -f $(MET_LIB_DIR)/libvx_render.a


########################################################################


.PHONY: all clean


########################################################################

