# File : Makefile
#
# $Project:         BindNames
#
# $Description:         
#
# $Module Id:         
# $Original Author:   Robert Hardy
# $Date Started:      Sun Aug  7 1994
#
# $Header: sqa:BobsStuff/BindNames/Makefile-v 1.9 1995/11/06 01:57:07 Bob Exp $
#
# $Revision: 1.9 $
#
# $State: Exp $
#
# $Locker:  $
#
# $Log: Makefile-v $
# Revision 1.9  1995/11/06  01:57:07  Bob
# Fixing distributions targest.
#
# Revision 1.8  1995/11/05  19:35:07  Bob
# Added revdate: target.  Set the write bit on distribution icons and
# added the names directory to the distribution archive.
#
# Revision 1.7  1995/09/07  06:23:50  Bob
# Fixed problem with c:delete when there are no files to delete.
#
# Revision 1.6  1995/09/07  06:02:39  Bob
# Changed #? to * in DIST:
#
# Revision 1.5  1995/09/07  04:55:20  Bob
# Added $(RELEASE) for archive name.
#
# Revision 1.4  1995/08/08  03:02:45  Bob
# Opps, a few boo-boos.
#
# Revision 1.3  1995/08/08  02:52:44  Bob
# Added full path to `dist' lines.
#
# Revision 1.2  1995/08/08  02:51:04  Bob
# Added RCS header and RCS support for bumping the revision.
# 
#
#
#

RELEASE=36_19

OBJDIR = Object
OBJ = $(OBJDIR)/

MAKE =smake
COMPILE=sc
LINK=slink

#DBG=DEFINE=DBG
DBG=
CLIB=lib:sc.lib lib:amiga.lib
STARTUP=lib:cres.o 

#OPTIM=
OPTIM= OPTIMIZE OPTPEEP

OPTS = OBJECTNAME=object/ $(OPTIM) $(DBG)

MAINMODULE = BindNames

FILES = $(OBJ)$(MAINMODULE).o $(OBJ)Icon.o

.c.o:
	$(COMPILE) $(OPTS) $*.c

system : $(OBJDIR) $(MAINMODULE)

rev:
	rcs:co -x-v -l $(MAINMODULE)_rev.h $(MAINMODULE)_rev.rev
	bumprev $(MAINMODULE)_rev.h
	rcs:ci -x-v -u "-mIncrementing Revsion" $(MAINMODULE)_rev.h $(MAINMODULE)_rev.rev

revdate:
	rcs:co -x-v -l $(MAINMODULE)_rev.h $(MAINMODULE)_rev.rev
	bumprev $(MAINMODULE)_rev.h DATE
	rcs:ci -x-v -u "-mIncrementing Revsion" $(MAINMODULE)_rev.h $(MAINMODULE)_rev.rev
	$(MAKE)

 
	# Since c:delete returns WARN if there are no file to delete,
	# I use the kludge of calling it through rexx.
all:
	rx "address command 'delete $(OBJ)/*.o'
	$(MAKE)

new:
	rx "address command 'delete $(OBJ)/*.o'

DIST :
	scr:rcsupdate
	$(MAKE) revdate
	$(MAKE) archive

archive:
	rx "address command 'delete ul:BindNames*.lha'
	protect *.info +w
	ex:lha a ul:BindNames$(RELEASE) $(MAINMODULE) makefile SCOPTIONS ReadMe BindNames_rev.rev
	ex:lha a ul:BindNames$(RELEASE) *.c *.h *.info *.org
	ex:lha -x a ul:BindNames$(RELEASE) names/*
	protect *.info -w


$(OBJDIR) :
	makedir $(OBJDIR)

$(MAINMODULE) : $(FILES) $(HKLIB)
	$(LINK) ${STARTUP} $(FILES)\
	SC SD lib $(HKLIB) $(CLIB) to $(MAINMODULE)

$(OBJ)$(MAINMODULE).o : $(MAINMODULE).c BindNames.h $(MAINMODULE)_rev.h

$(OBJ)Icon.o : Icon.c BindNames.h

