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


1.1
date     93.01.13.11.16.13;  author mks;  state Exp;
branches ;
next     ;


desc
@Make file for the MMU tool
@



1.1
log
@Initial revision
@
text
@#
# smakefile for MMU
#

#
# Server directory for the data...
#
REMOTE = V:aug/src/MMU
REMOTEBIN = V:aug/bin
REMOTEDOC = V:aug/doc
VERSION = 37

#
# Name of the module
#
MODNAME	= MMU

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

ALL:	$(LD_STRIP)

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

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

#
# 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
LFLAGS_STRIP	= ND

#
# System libraries
#
LIBS= LIB:amiga.lib

#
# My headers...
#
MY_HDR	=

#
# My C source...
#
MY_C	=	MMU.c

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

#
# My object files...
#
MY_OBJS	=	MMU.o handler.o

#
# My library objects...
#
MY_LIB_OBJS =

#
# My library files...
#
MY_LIBS	=

#
# 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) $(MY_LIBS)
	$(LN) <with <
FROM $(MY_OBJS)
TO $(LD_FILE)
LIB $(MY_LIBS) $(LIBS)
$(LFLAGS)
<

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

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

#
# Specific rules
#
handler.o:	handler.asm	$(MODNAME)_rev.i

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

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

#
# Release the current build to the server
#
internal:
	@@delete $(REMOTE)/((\#?.(c|h|asm|i|ld|rev|doc|info))|makefile|smakefile)
	@@protect ((\#?.(c|h|asm|i|ld|rev|doc|info))|makefile|smakefile) +r QUIET
	@@copy ((\#?.(c|h|asm|i|ld|rev|doc|info))|makefile|smakefile) $(REMOTE)
	@@copy $(LD_STRIP) $(REMOTE)
	@@copy $(LD_STRIP) $(REMOTEBIN)
	@@copy \#?.doc $(REMOTEDOC)

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

#
# 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:
	make clean
	make version
	make doc
	make $(LD_FILE)
	make $(LD_STRIP)
	make internal
@
