#Buildfile for debug/m68k

#include ../../../buildprefix


SOURCES = debug.c commands.c breakpoint.c memoryaccess.c stack.c typeout.c ioutilities.c symbols.c disasm.c tabs68.c
OBJECTS = debug.b commands.b breakpoint.b memoryaccess.b stack.b typeout.b ioutilities.b symbols.b disasm.b tabs68.b
HEADERS = Vdb.h

#ifdef X
C68FLAGS = -O -V -vx -DAddr24
#else X
C68FLAGS = -O -V -DAddr24
#endif X
LIBS = 


.SUFFIXES: .b .ls .a68 .c

# how to compile a 68000 file
.c.b:
	cc68 $(C68FLAGS) -c $*.c 

# how to make an assembly file (Not deleting it or assembling it)
.c.s:
	cc68 $(C68FLAGS) -S $*.c

# how to make an assembly listing
.c.ls:
	cc68 $(C68FLAGS) -c -L $*.c


all: debug.m68k

debug.m68k: $(OBJECTS) $(HEADERS)
	cc68 $(C68FLAGS) -r -o debug.m68k $(OBJECTS) $(LIBS)


install: debug.m68k 
	$(NETINSTALL) -p debug.m68k $(VSYS)/bin

clean: 
	rm -f *BAK *CKP .emacs* sym.out *.b debug

cleanbak:
	rm -f *BAK *CKP .emacs* sym.out

backup:
	cd ..; cpdir debug ../../Vbackup/cmds/debug


tags:
	ctags $(SOURCES)

relink:
	rm -f debug.m68k





