#
# Makefile for uart.xdd
#

# include path to FreeMiNT
INCLUDE = -I/home/fnaumann/mint-1.15/src/include

# compiler settings
CC = gcc -pipe
AS = $(CC) -c
LD = $(CC) -nostdlib -Wl,--entry -Wl,_init
CP = cp
RM = rm -f

#CPU = -m68030
CPU = -m68040
#CPU = -m68020-60

OPTS =	-fomit-frame-pointer \
	-g -O2 $(CPU)

WARN = \
	-Wall \
	-Wmissing-prototypes \
	-Wshadow \
	-Wpointer-arith \
	-Wcast-qual \
	-Waggregate-return

# the -mshort flag is mandatory
CFLAGS = -mshort $(INCLUDE) $(WARN) $(OPTS)
LDFLAGS = -lc16

TARGET = uart.xdd
OBJS = pc16550.o

$(TARGET): $(OBJS)
	$(LD) -o $@ $(OBJS) $(LDFLAGS)

boot:
	$(CP) $(TARGET) /c/multitos

clean:
	$(RM) $(OBJS)

distclean:
	$(MAKE) clean;
	$(RM) *~
