#   DASM    -small systems cross assembler.  The source is compilable on
#	     Amiga's, UNIX systems, and IBM-PCs with the appropriate
#	     #define in asm.h (no #define == Amiga).  some functions from
#	     my amiga support library are needed (or write your own)
#
#   (C)Copyright 1988-1989 Matthew Dillon, All Rights Reserved.
#
#   This Makefile is for Linux.  Changes for Linux are by Jay Carlson
#                         nop@theory.cs.mankato.msus.edu
#

CC = gcc

CFLAGS= -m486 -O2

LDFLAGS = -s
SMALLLDFLAGS = -s -N

OBJS = main.o ops.o globals.o exp.o symbols.o mne6303.o mne6502.o mne68705.o mne6811.o

all: dasm ftohex ftos

install: dasm ftohex ftos 
	cp dasm ftohex ftos /usr/local/bin

clean:
	rm -f *.o dasm ftohex ftos core

distclean:
	rm -f *.o core *~

dasm: $(OBJS)
	gcc $(CFLAGS) $(LDFLAGS) $(OBJS) -o dasm

ftohex:	ftohex.o
	$(CC) $(CFLAGS) $(SMALLLDFLAGS) ftohex.o -o ftohex

ftos: ftos.o
	$(CC) $(CFLAGS) $(SMALLLDFLAGS) ftos.o -o ftos

exp.o : exp.c asm.h 
ftos.o : ftos.c 
ftohex.o : ftohex.c 
globals.o : globals.c asm.h 
main.o : main.c asm.h 
mne6303.o : mne6303.c asm.h 
mne6502.o : mne6502.c asm.h 
mne6811.o : mne6811.c asm.h 
mne68705.o : mne68705.c asm.h 
ops.o : ops.c asm.h 
symbols.o : symbols.c asm.h 
