#/bin/sh

.SUFFIXES :
.SUFFIXES : .cpp .d .o

do_ranlib = @DO_RANLIB@
CXX_FLAGS = @CXXFLAGS@ $(CXX_OPT)

#COBJS = tpx_files.o
COBJS = Methane.o Nitrogen.o Oxygen.o Water.o Hydrogen.o RedlichKwong.o \
        CarbonDioxide.o Heptane.o lk.o Sub.o utils.o HFC134a.o

FOBJS = 

CXX_LIBS = @LIBS@
CXX_INCLUDES = -I../include 
TPLIB = @buildlib@/libtpx.a

DEPENDS = $(COBJS:.o=.d)

all:  $(TPLIB)

%.d:
	g++ -MM $(CXX_INCLUDES) $*.cpp > $*.d

.cpp.o:
	@CXX@ -c $< @DEFS@ $(CXX_FLAGS) $(CXX_INCLUDES)

.f.o:
	@F77@ -c $< $(F77_FLAGS) 

$(TPLIB): $(COBJS) $(FOBJS)
	@ARCHIVE@ $(TPLIB) $(COBJS) $(FOBJS) > /dev/null
ifeq ($(do_ranlib),1)
	@RANLIB@ $(TPLIB)
endif

clean:
	$(RM) $(COBJS) $(FOBJS) *~ *.d .depends

depends: $(DEPENDS)
	cat *.d > .depends
	$(RM) $(DEPENDS)

ifeq ($(wildcard .depends), .depends)
include .depends
endif

