head     40.1;
branch   ;
access   ;
symbols  V40_1:40.1;
locks    ; strict;
comment  @# @;


40.1
date     93.06.07.16.51.19;  author mks;  state Exp;
branches ;
next     ;


desc
@Workbench library finder for ROMs without workbench.library
@



40.1
log
@*** empty log message ***
@
text
@#
# lmkfile for wbfind - workbench.library finder...
#

#
# Server directory for the data...
#
REMOTE = V:src/kickstart/wbfind
VERSION= 40

#
# Name of the module
#
MODNAME	= wbfind

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

#
# Compiler, assembler, and linker
#
CC = sc
AS = hx68 -a
LN = slink

#
# Compiler flags...
#
CFLAGS	= MEMORYSIZE=HUGE DATA=FARONLY PARAMETERS=REGISTER NOSTACKCHECK NOMULTIPLEINCLUDES STRINGMERGE STRUCTUREEQUIVALENCE MULTIPLECHARACTERCONSTANTS DEBUG=LINE NOVERSION OPTIMIZE OPTIMIZERSIZE OPTIMIZERINLINE OPTIMIZERINLOCAL NOICONS

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

#
# Linker flags
#
LFLAGS		= ADDSYM SMALLCODE SMALLDATA MAP $(MODNAME).map HLSXF PLAIN SWIDTH 16 NOICONS QUIET
LFLAGS_STRIP	= ND NOICONS

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

#
# My headers...
#
MY_HDR	=

#
# My C source...
#
MY_C	=

#
# My Assebly source...
#
MY_A	=

#
# My object files...
#
MY_OBJS	=	wbfind.o \
		patch.o \
		end.o

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

#
# Build the LD file...
#
$(LD_FILE):	$(MY_OBJS)
	$(LN) <with <
FROM $(MY_OBJS)
TO $(LD_FILE)
LIB $(LIBS)
$(LFLAGS)
<

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

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

#
# Specific dependancies...
#
wbfind.o:	wbfind.asm $(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 the current build to the server
#
internal:
	@@delete $(REMOTE)/((\#?.(c|h|asm|i|ld|ld.strip|rev))|smakefile)
	@@protect ((\#?.(c|h|asm|i|ld|ld.strip|rev))|smakefile) +r quiet
	@@copy ((\#?.(c|h|asm|i|ld|ld.strip|rev))|smakefile) $(REMOTE)

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

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

$(MODNAME).doc:	$(MY_C) $(MY_A)
	@@Echo "Making $(MODNAME).doc"
	@@Join $(MY_C) $(MY_A) as T:$(MODNAME).tmp.doc
	@@AutoDoc >$(MODNAME).doc T:$(MODNAME).tmp.doc
	@@Delete T:$(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 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..."
@
