# 
# SUMMARY:      makefile for DHSVM
# USAGE:        make DHSVM
#
# AUTHOR:       DHSVM Project (Bart Nijssen)
# ORG:          University of Washington, Department of Civil Engineering
# ORIG-DATE:    28-Aug-1996 at 18:00:04
# Last Changed: Mon Mar  3 14:36:55 2003 by Scott Waichler <waichler@tuff.pnl.gov>
# DESCRIPTION:  makefile for DHSVM - 
#                 The Distributed Hydrology-Soil-Vegetation Model      
# DESCRIP-END.

#	$Id: makefile_linux_hja,v 1.1.2.1 2001/04/06 21:07:46 waichler Exp $	

# Use gnumake, not make!

OBJS = ArrayBuilder.o AllConversions3.o

SRCS = $(OBJS:%.o=%.c,.C)

HDRS = ArrayBuilder.h 

OTHER = 

DEFS =
LDFLAGS = 
#CFLAGS = -g $(DEFS)
CFLAGS = -O3
CC = gcc
LD = 
FLEX = flex
LIBS = -lm

fileconvert: $(OBJS)
	$(LINK.C) $(OBJS) $(CFLAGS) -o fileconvert $(LIBS)

clean::
	rm -f fileconvert


# -------------------------------------------------------------
# rules for individual objects (created with make depend)
# -------------------------------------------------------------
ArrayBuilder.o: ArrayBuilder.c ArrayBuilder.h
AllConversions3.o: AllConversions3.c ArrayBuilder.h


# -------------------------------------------------------------
# sources
# -------------------------------------------------------------
sources: $(SRCS) $(HDRS) $(OTHER)

clean::
	rm -f $(OBJS)
	rm -f *~

# -------------------------------------------------------------
# tags 
# so we can find our way around
# -------------------------------------------------------------
tags: TAGS
TAGS: $(SRCS) $(HDRS)
	etags $(SRCS) $(HDRS)

clean::
	rm -f TAGS


# -------------------------------------------------------------
# depend
# -------------------------------------------------------------
depend: .depend
.depend: $(SRCS)
	$(CC) $(CFLAGS) -MM $(SRCS) > $@

clean:: 
	rm -f .depend






