head     39.2;
branch   ;
access   ;
symbols  V39_3:39.1 V39_2:39.1 V39_1:39.0;
locks    ; strict;
comment  @# @;


39.2
date     92.07.13.10.43.12;  author darren;  state Exp;
branches ;
next     39.1;

39.1
date     92.04.20.09.30.25;  author mks;  state Exp;
branches ;
next     39.0;

39.0
date     92.01.20.16.16.25;  author mks;  state Exp;
branches ;
next     ;


desc
@Native build makefile
@


39.2
log
@Explicit path for inclusion of debug.lib
@
text
@###############################################################################
#
# lmkfile for timer.device
#
###############################################################################

#
# Server directory for the data...
#
REMOTE = V:src/kickstart/timer
VERSION= 39

#
# Name of the module
#
MODNAME	= timer

#
# The ".LD" file we want to produce.
#
LD_FILE	= $(MODNAME).ld
LD_STRIP= $(MODNAME).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	= -cqs -i include: -o

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

.asm.o:
	$(AS) $*.asm $(AFLAGS) $*.o

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

#
# System libraries
#
LIBS= LIB:small.lib LIB:debug.lib LIB:debug.lib

#
# My headers...
#
PUBLIC_HDR =	timer.i

MY_HDR	=	asmsupp.i constants.i debug.i internal.i macros.i $(PUBLIC_HDR)

#
# My C source...
#
MY_C	=

#
# My Assebly source...
#
MY_A	=	asmsupp.asm \
main.asm \
libentry.asm \
device.asm \
eclock.asm \
waituntil.asm \
micro.asm \
vblank.asm \
endcode.asm

#
# My object files...
#
MY_OBJS	=	asmsupp.o \
main.o \
libentry.o \
device.o \
eclock.o \
waituntil.o \
micro.o \
vblank.o \
endcode.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 $(MODNAME).map HLSXF PLAIN SWIDTH 16
$(LFLAGS)
<

#
# Depend...
#
asmsupp.o: asmsupp.asm $(MY_HDR) $(MODNAME)_rev.i

#
# Bump the version...
#
version:
	@@bumprev $(VERSION) $(MODNAME)_rev

$(MODNAME)_rev.i:
	@@bumprev $(VERSION) $(MODNAME)_rev

$(MODNAME)_rev.h:
	@@bumprev $(VERSION) $(MODNAME)_rev

#
# Release just the headers
#
headers:	$(PUBLIC_HDR)
	copy $(PUBLIC_HDR) V:include/devices NOPRO

#
# 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)
	@@copy \#?.doc V:doc NOPRO
	@@copy \#?.sfd V:lib/sfd NOPRO

#
# Blow away all files that would need to be rebuilt
#
clean:
	@@delete (\#?.o|\#?.o.\#?|$(MODNAME).doc|$(MODNAME).ld\#?)

#
# Make the AutoDocs
#
doc:	$(MODNAME).doc

$(MODNAME).doc:	$(MY_C) $(MY_A)
	@@Echo "Making $(MODNAME).doc"
	@@Join $(MY_C) $(MY_A) as RAM:$(MODNAME).tmp.doc
	@@AutoDoc >$(MODNAME).doc RAM:$(MODNAME).tmp.doc
	@@Delete RAM:$(MODNAME).tmp.doc QUIET
	@@Protect $(MODNAME).doc rwd

#
# Make a complete new release (This still is in testing...)
#
release:
	lmk clean
	lmk version
	lmk doc
	lmk $(LD_FILE)
	lmk $(LD_STRIP)
	lmk headers
	lmk internal

#
# 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..."
@


39.1
log
@Slight update to the build rules
@
text
@d59 1
a59 1
LIBS= LIB:small.lib LIB:debug.lib debug.lib
@


39.0
log
@Initial release
@
text
@d39 1
a39 1
AFLAGS	= -cqsy -i include: -o
a47 1
	@@Echo "$*.asm: " NOLINE
@
