# *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
# ** 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_tc_util library
#
########################################################################


EXECUTABLES =


OBJECTS     = atcf_line.o \
              track_point.o \
              track_info.o \
              track_pair_info.o \
              tc_hdr_columns.o \
              tc_columns.o \
              tc_stat_line.o


LIBRARIES   = libvx_tc_util.a


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


HEADERS     = atcf_line.h \
              track_point.h \
              track_info.h \
              track_pair_info.h \
              tc_hdr_columns.h \
              tc_columns.h \
              tc_stat_line.h \
              vx_tc_util.h


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


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


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


   ##
   ##  objects
   ##


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

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

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

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

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

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

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


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


   ##
   ##  libraries
   ##


libvx_tc_util.a: $(OBJECTS)
	ar -rs libvx_tc_util.a $(OBJECTS) 2>&1
	ranlib libvx_tc_util.a
	cd $(MET_INC_DIR) ; rm -f $(HEADERS)
	cp $(HEADERS) $(MET_INC_DIR)
	rm -f $(MET_LIB_DIR)/libvx_tc_util.a
	cp libvx_tc_util.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_tc_util.a


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


.PHONY: all clean


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

