head     1.1;
branch   ;
access   ;
symbols  ;
locks    jerryh:1.1; strict;
comment  @# @;


1.1
date     93.02.23.08.40.59;  author jerryh;  state Exp;
branches ;
next     ;


desc
@makefile for hardstart
,
@



1.1
log
@Initial revision
@
text
@###############################################################################
#
# lmkfile for hardstart - The CDTV-CR Hardware startup code...
#
###############################################################################

#
# Server directory for the data...
#
REMOTE = CDTV:src/hardstart
VERSION= 37

#
# Name of the module
#
MODULE	= hardstart

CFILES	=
AFILES	= hardstart.asm

#
# The ".LD" file we want to produce.
#
LD_FILE	= $(MODULE).ld
LD_STRIP= $(MODULE).ld.strip

#
# Compiler, assembler, and linker
#
CC = lc
AS = hx68 -a
LN = blink

#
# Compiler flags...
#
CFLAGS	= -b0 -v -me -ms -cfistqm -d1 -O

#
# Assembler flags...  NOTE how they are used below...
#
AFLAGS	= -cqsy -i include: -o

#
# Default rules...
#
.c.o:
	$(CC) $(CFLAGS) $*.c

.asm.o:
	@@Echo "$*.asm: " NOLINE
	$(AS) $*.asm $(AFLAGS) $*.o

#
# Linker flags
#
LFLAGS		= ADDSYM SMALLCODE SMALLDATA
LFLAGS_STRIP	= ND

#
# System libraries
#
LIBS=

#
# My headers...
#
PUBLIC_HDR =

MY_HDR	=

#
# My C source...
#
MY_C	=

#
# My Assebly source...
#
MY_A	=	hardstart.asm

#
# My object files...
#
MY_OBJS	=	hardstart.o

#
# My library objects...
#
MY_LIB_OBJS =

#
# My library files...
#
MY_LIBS	=


ALL:	$(LD_STRIP)

#
# Build the stripped LD file...
#
$(LD_STRIP):	$(LD_FILE)
	$(LN) FROM $(LD_FILE) TO $(LD_STRIP) $(LFLAGS_STRIP)

#
# Build the various versions
#
$(LD_FILE):	$(MY_OBJS)
	$(LN) <with <
FROM $(MY_OBJS)
TO $(LD_FILE)
LIB $(MY_LIBS) $(LIBS)
MAP $(MODULE).map HLSXF PLAIN SWIDTH 16
$(LFLAGS)
<

#
# depend
#
hardstart.o:	hardstart.asm hardstart_rev.i

version:
	@@copy $(REMOTE)/$(MODULE)_rev.rev ""
	@@bumprev $(VERSION) $(MODULE)_rev
	@@copy $(MODULE)_rev.\#? $(REMOTE)

release:
	@@lmk clean
	@@lmk version
	@@lmk
	@@copy $(MODULE).ld\#? $(REMOTE)
	@@execute < < 
	failat 21 ;
	cd $(REMOTE) ;
	co $(CFILES) $(AFILES);
	co $(HDRS) lmkfile ;
	<

clean:
	@@delete (\#?.o|\#?.pre|\#?.tmp|\#?.ld\#?)


#
# Release the current build to the server
#
internal:
	@@delete $(REMOTE)/((\#?.(c|h|asm|i|rev|doc|sfd|ld|ld.\#?))|makefile|lmkfile)
	@@protect ((\#?.(c|h|asm|i|ld|rev|doc|sfd))|makefile|lmkfile) +r quiet
	@@copy ((\#?.(c|h|asm|i|rev|doc|sfd|ld|ld.\#?))|makefile|lmkfile) $(REMOTE)

#
# The following rule is to bring the source down to the local directory
# To do the following you should copy this LMKfile to the local directory
# and make sure it is readable.  Then type MAKE ToLocal to have the
# code copied down...
#
tolocal:
	@@protect \#? rwed QUIET
	@@copy $(REMOTE)/\#? ""
	@@protect \#? +r QUIET
	@@protect \#?_rev\#? rwd QUIET
	@@Echo "Local is updated..."
@
