#
# Makefile for FNRAMFS.XFS
#

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

# compiler settings
CC = gcc
AS = $(CC) -c
LD = $(CC) -nostdlib
STRIP = strip
CP = cp
RM = rm -f

#CPU = -m68030
#CPU = -m68040

OPTS =	-finline-functions \
	-fno-defer-pop \
	-fomit-frame-pointer \
	-fstrength-reduce \
	-O3 $(CPU)

# the -mshort flag is mandatory
CFLAGS = $(INCLUDE) -Wall -Wmissing-prototypes -mshort $(OPTS)
LDFLAGS = -lgnu16

TARGET = fnramfs.xfs
OBJS = start.o fnramfs.o

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

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

clean:
	$(RM) $(OBJS)

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