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


EXECUTABLES =


OBJECTS     = afm.o \
              afm_keywords.o \
              afm_line.o \
              afm_token.o \
              afmkeyword_to_string.o \
              afmtokentype_to_string.o


LIBRARIES   = libvx_afm.a


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


HEADERS     = afm.h \
              afm_keywords.h \
              afmkeyword_to_string.h \
              afm_line.h \
              afm_token.h \
              afm_token_types.h \
              afmtokentype_to_string.h


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


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


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


   ##
   ##  objects
   ##


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

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

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

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

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

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


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


   ##
   ##  libraries
   ##


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


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


.PHONY: all clean


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

