#Buildtemplate for date subdirectory

SOURCES = date.c

OBJECTS = date.$(OBJSUFFIX)

INCLUDES= -I../mi

ALL = date.$(MACHINE)

LINT = lint -ps

date.$(MACHINE):  $(OBJECTS)
	$(CC) $(MIFLAGS) $(MDFLAGS) -o $(ALL) $(OBJECTS) $(LIBRARIES)

# How to make "tags":
#   Sometimes it is necessary to delete "tags" in order to build
#   it (i.e. when you get the message "'tags' is up to date.").

tags:
	csh -c \
	"ctags -tw {.,../$(MACHINE),../mi,$(VSYS)/include/{mi,$(MACHINE)}}/*.[ch]"

# How to make the "dependencies" file using makedep.
depend:
	makedep -N -e $(OBJSUFFIX) -o dependencies -t $(MACHINE) $(VPATH)/*.c

install: date.$(MACHINE)
	$(NETINSTALL) date.$(MACHINE) $(VSYS)/bin

lint:	$(SOURCES)
	$(LINT) $(SOURCES)

clean:
	rm -f *.CKP *.BAK *.$(OBJSUFFIX) date.$(MACHINE)

relink:
	rm -f *.$(MACHINE)

backup:
	cd ..; cpdir date ../../Vbackup/cmds/date
