head     39.7;
branch   ;
access   ;
symbols  V40_1:39.7 V39_5:39.5 V39_4:39.5 V39_2:39.3 V39_1:39.1;
locks    ; strict;
comment  @# @;


39.7
date     93.05.18.10.42.39;  author mks;  state Exp;
branches ;
next     39.6;

39.6
date     93.02.15.16.34.12;  author mks;  state Exp;
branches ;
next     39.5;

39.5
date     92.04.06.14.35.34;  author mks;  state Exp;
branches ;
next     39.4;

39.4
date     92.04.06.14.07.19;  author mks;  state Exp;
branches ;
next     39.3;

39.3
date     92.02.27.17.49.41;  author mks;  state Exp;
branches ;
next     39.2;

39.2
date     92.02.27.17.49.07;  author mks;  state Exp;
branches ;
next     39.1;

39.1
date     92.02.25.20.48.58;  author mks;  state Exp;
branches ;
next     ;


desc
@Makefile for the native build of the A3000 bonus
@


39.7
log
@Updated the conditional assembly to be A4000
@
text
@###############################################################################
#
# lmkfile for the bonus module
#
###############################################################################

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

#
# Name of the module
#
MODNAME	= bonus

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

#
# Magic loop-back to do the various versions
#
# $(TYPE)   = The type extention of the file.
# $(MACHINE)= The machine name definition.
#
ALL:
	lmk -s TYPE=.a3000 MACHINE=MACHINE_A3000 $(LD_STRIP).a3000
	lmk -s TYPE=.a4000 MACHINE=MACHINE_A4000 $(LD_STRIP).a4000
	lmk -s TYPE=       MACHINE=MACHINE_A2000 $(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 MAP $(MODNAME).map$(TYPE) HLSXF PLAIN SWIDTH 16
LFLAGS_STRIP	= ND

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

#
# My headers...
#
MY_HDR	=

#
# My C source...
#
MY_C	=

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

#
# My object files...
#
MY_OBJS	=	bonus.o$(TYPE)

#
# 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)
<

#
# Specific dependancies...
#
bonus.o$(TYPE):	bonus.asm bonus_rev.i
	$(AS) $*.asm $(AFLAGS) $*.o$(TYPE) -D $(MACHINE)=1

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

#
# 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|\#?.map|\#?.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 -a 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 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.6
log
@Builds as V40
@
text
@d32 1
a33 1
	lmk -s TYPE=.a1000 MACHINE=MACHINE_A1000 $(LD_STRIP).a1000
@


39.5
log
@Cleaned up to use simpler method of doing multiple builds
@
text
@d11 1
a11 1
VERSION= 39
@


39.4
log
@Slight cleanup...
@
text
@d21 2
a22 2
LD_FILE	= $(MODNAME).ld
LD_STRIP= $(MODNAME).ld.strip
d25 11
d50 1
a50 1
AFLAGS	= -cqsy -i include: -o
d64 1
a64 1
LFLAGS		= ADDSYM SMALLCODE SMALLDATA MAP $(MODNAME).map HLSXF PLAIN SWIDTH 16
d90 1
a90 1
MY_OBJS	=		bonus.o
a101 4
ALL:	$(LD_STRIP)		\
	$(LD_STRIP).a3000	\
	$(LD_STRIP).a1000

a107 6
$(LD_STRIP).a3000:	$(LD_FILE).a3000
	$(LN) FROM $(LD_FILE).a3000 TO $(LD_STRIP).a3000 $(LFLAGS_STRIP)

$(LD_STRIP).a1000:	$(LD_FILE).a1000
	$(LN) FROM $(LD_FILE).a1000 TO $(LD_STRIP).a1000 $(LFLAGS_STRIP)

a118 16
$(LD_FILE).a3000:	$(MY_OBJS).a3000 $(MY_LIBS)
	$(LN) <with <
FROM $(MY_OBJS).a3000
TO $(LD_FILE).a3000
LIB $(MY_LIBS) $(LIBS)
$(LFLAGS)
<

$(LD_FILE).a1000:	$(MY_OBJS).a1000 $(MY_LIBS)
	$(LN) <with <
FROM $(MY_OBJS).a1000
TO $(LD_FILE).a1000
LIB $(MY_LIBS) $(LIBS)
$(LFLAGS)
<

d122 2
a123 8
bonus.o:	bonus.asm bonus_rev.i
	$(AS) $*.asm $(AFLAGS) $*.o

bonus.o.a3000:	bonus.asm bonus_rev.i
	$(AS) $*.asm $(AFLAGS) $*.o.a3000 -D MACHINE_A3000=1

bonus.o.a1000:	bonus.asm bonus_rev.i
	$(AS) $*.asm $(AFLAGS) $*.o.a1000 -D MACHINE_A1000=1
@


39.3
log
@Removed the term "A3000" from the comment (forgot it last time)
@
text
@a47 1
	@@Echo "$*.asm: " NOLINE
a137 1
	@@Echo "$*.asm: " NOLINE
a140 1
	@@Echo "$*.asm: " NOLINE
a143 1
	@@Echo "$*.asm: " NOLINE
@


39.2
log
@Brand new bonus build for variant hardware within the same
directory...
@
text
@d3 1
a3 1
# lmkfile for the A3000 bonus module
@


39.1
log
@Initial release
@
text
@d10 1
a10 1
REMOTE = V:src/kickstart/bonus.3000
d80 1
a80 1
MY_OBJS	=	bonus.o
d92 4
d102 6
d119 16
d139 10
@
