#
# Makefile for SmartDisk 1.4.1
#

# Manx CC
#CC = cc

# Manx CC 68020 code
# FAILS on non working BITFIELD code...
#CC = cc -3 +2 -5


# GNU CC
CC = gcc -c

# GNU CC 68020 code
#CC = gcc -m68020 -mbitfield -c


# same (Manx) linker for both
LD = ln


# Best optimize for GNU CC ( no defer pop to keep stackusage small )
CFLAGS = -O -fomit-frame-pointer -fstrength-reduce -finline-functions \
	      -ffunction-cse -fno-defer-pop

# Memory modell and best optimize for Manx
#CFLAGS = -mc -md -r4 -sa -sn -sr -su

# -w keep symbols in to make debugging easier
#LDFLAGS = -w
LDFLAGS =

LIBS = -lunixg -lgnulib -lcl


smart: smartdisk.o
       $(LD)  $(LDFLAGS) -o smart smartdisk.o $(LIBS)


smartdisk.o: smartdisk.c
	$(CC) $(CFLAGS) smartdisk.c
