
PROG = startup

SRC	= .
INC	= .

TARGET = 68040

RASTER_INCLUDES = /rgi/vrtx/include
SPECTRA_INCLUDES = $(SPECTRA)/target/include
SPECTRA_LIBS = $(SPECTRA)/target/lib/$(TARGET)/microtec

# tools to build the application program

CC = mcc68k
AS = asm68k
LD = lnk68k
AR = lib68k


# Flags used for compiling/assembling

DEFINES = -p$(TARGET) -DMC68K -g -Gf -nOR -Z2 -DVRTX -U_SIZE_T -D__READY_EXTENSIONS__ -c
INCLUDES = -J$(INC)  -J$(RASTER_INCLUDES) -J$(SPECTRA_INCLUDES)
CFLAGS	= $(DEFINES) $(INCLUDES)
68040CFLAGS = -DMC68040 -DMV162 -W1,\"-ON3002\" $(DEFINES) $(INCLUDES)
LDFLAGS = -L$(SPECTRA_LIBS)


OBJS = gauge1.o fgauge_1.o

LIBS = ../../lib/rg.lib $(SPECTRA_LIBS)/rtnofp.lib


# The following definition lists which object modules make up
# the relocatable application modules.

#-------------------------------------------------------------------------#
#
# Create program $(PROG) module
#
# ------------------------------------------------------------------------#

all:	gauge1

gauge1 : $(OBJS) $(LIBS)
	$(LD) -o  $@.tmp -f i,r $(OBJS) $(LIBS)
	mv $@.tmp $@

#
# Compile/assemble standard source files
# --------------------------------------

.c.o:
	@if [ "$(TARGET)" = 68040 ]; then \
		echo "$(CC) $(68040CFLAGS) $(SRC)/$<" ;\
		$(CC) $(68040CFLAGS) $(SRC)/$< ;\
	else \
		echo "$(CC) $(CFLAGS) $(SRC)/$<" ;\
		$(CC) $(CFLAGS) $(SRC)/$< ;\
	fi

clean:
	rm -f $(OBJS) $(PROG)

# ---- End of makefile ----


