#
#                                 Makefile for bufrtables
#
LIBRARY  = ../lib$(LIB)$(R64).a
#
include ../config/config.$(ARCH)$(CNAME)$(R64)$(A64)
#
include ../options/options_$(ARCH)
#
TARGETS      = all clean
#
SOURCES.F=

LINKS=    B0000000000099010001.TXT \
          D0000000000098011000.TXT \
          D0000000000078011007.TXT \
          B0000000000098011000.TXT \
          B0000000000098010000.TXT \
          B0000000000089011255.TXT \
          B0000000000078011007.TXT \
          D0000000000099010001.TXT \
          D0000000000089012001.TXT \
          D0000000000078011008.TXT \
          D0000000000034011001.TXT \
          B0000000000089012001.TXT \
          B0000000000078011008.TXT \
          B0000000000034011001.TXT \
          B0000000000254010001.TXT \
          D0000000000254010001.TXT \
          B0000000000000007000.TXT \
          D0000000000000007000.TXT \
          B0000000000000008000.TXT \
          D0000000000000008000.TXT \
          B0000000000000009000.TXT \
          D0000000000000009000.TXT \
          B0000000000000010000.TXT \
          D0000000000000010000.TXT \
          B0000000000000011000.TXT \
          D0000000000000011000.TXT \
          B0000000000000012000.TXT \
          D0000000000000012000.TXT \
          B0000000000098007001.TXT \
          D0000000000098007001.TXT \
          B0000000000098008001.TXT \
          D0000000000098008001.TXT \
          B0000000000098009001.TXT \
          D0000000000098009001.TXT \
          B0000000000098010001.TXT \
          D0000000000098010001.TXT \
          B0000000000098011001.TXT \
          D0000000000098011001.TXT \
          B0000000000098012001.TXT \
          D0000000000098012001.TXT 


#
OBJECTS.F    = $(SOURCES.F:.F=.o) 
OBJECTS.c    = $(SOURCES.c:.c=.o)
OBJECTS      = $(OBJECTS.F) $(OBJECTS.c) 
#
#
all:  links bufr2txt_tables bufr_split_tables txt2bufr_tables

links: 
	./links.sh

bufr2txt_tables: bufr2txt_tables.f
	$(FC) $(FFLAGS) -o bufr2txt_tables bufr2txt_tables.f $(LIBRARY)
bufr_split_tables: bufr_split_tables.f
	$(FC) $(FFLAGS) -o bufr_split_tables bufr_split_tables.f $(LIBRARY)
txt2bufr_tables: txt2bufr_tables.f
	$(FC) $(FFLAGS) -o txt2bufr_tables txt2bufr_tables.f $(LIBRARY)

clean:
	\rm -f $(LINKS) *.o
	\rm -f bufr2txt_tables; \rm -f bufr_split_tables; \rm -f txt2bufr_tables
