##########################################################################
# Copyright 1992 to 1998 MBARI
##########################################################################
# Summary  : Makefile for usrTime
# Filename : Makefile
# Author   : Bob Herlien
# Project  : Tiburon
# Version  : Version 1.0
# Created  : 03/24/98
# Modified : 04/30/98
# Archived :
##########################################################################
# Modification History:
# $Header: $
# $Log:    $
#
##########################################################################

## Features include:
##	MICROTIME - include microtime() call in {get,set}timeofday()
##		    This increases clock resolution from 16.67 ms (for 60 Hz
##		    tick) to the resolution of microtime() (1 us for MVME-162)
##
##      SYNCRTC   - Sync the real-time clock chip hardware to the software-
##                  maintained time-of-day.  This only makes sense if
##                  you're running NTP.
##
##      SET_TZ   -  Set the TIMEZONE environment variable according to
##                  the compiled-in timezone information.
##
##      US_DST   -  If SET_TZ set, uses US algorithm to set daylight savings.
##		    This option, when used with SET_TZ, will maintain both
##		    the timezone name and offset through changes in DST.

###########################################################################

FEATURES = -DMICROTIME -DSET_TZ -DUS_DST

CC	    = cc68k
LD	    = ld68k

DEBUG 	    =

CFLAGS 	    = $(DEBUG) -c -m68040 -Wall -ansi -pipe -nostdinc -fno-builtin \
              -DCPU=MC68040 -DINCLUDE_PROTOTYPES $(IFLAGS) $(FEATURES)

CCFLAGS     = $(DEBUG) -c -m68040 -Wall -ansi -pipe -nostdinc -fno-builtin \
              -DCPU=MC68040 -DINCLUDE_PROTOTYPES $(IFLAGS) $(FEATURES)

IFLAGS	    = -I. -I$(MBARI_VW)/h -I$(VW)/target/h -I$(VW)/target/config/mv162

LDFLAGS     = -r

LIBS	    =
	
PROGRAM	    = usrTime

SRCS	    = usrTime.c sysMicroClock.c sysRtc.c

CC_SRCS     =

OBJS	    = $(SRCS:.c=.o) $(CC_SRCS:.cc=.o)

all:          $(PROGRAM)

$(PROGRAM):   $(OBJS) $(LIBS) Makefile
	      $(LD) $(LDFLAGS) $(OBJS) $(LIBS) -o $(PROGRAM)

##########################################################################
# Do not modify anything below this line unless absolutely necessary

%.d: %.c
	    @echo Generating dependencies for $?
	    @$(CC) -M $(CFLAGS) $? > $@

%.d: %.cc
	    @echo Generating dependencies for $?
	    @$(CC) -M $(CCFLAGS) $? > $@

%.o: %.c
	    $(CC) $(CFLAGS) $< -o $@	

%.o: %.cc
	    $(CC) $(CCFLAGS) $< -o $@

DEST	    = .

INSTALL     = install

MAKEFILE    = Makefile

include       $(SRCS:.c=.d) $(CC_SRCS:.cc=.d)

depend:	
	
echo:;        @echo $(PROGRAM) from $(SRCS) $(CC_SRCS)

clean:
	      rm -f $(PROGRAM) $(OBJS) $(OBJS:.o=.d)

get_release:


put_release:

##########################################################################







