#         __   __
#         \/   \/ __ __   __ ________  TM
#         ||_  || \/ \ \  \/ |/~||~\|
#         ||-\-|| || ||\\ ||    ||
#         ||  ~|| || || \\||    ||
#         /\   /\ /\ /\  \ |    /\
#         ~~   ~~ ~~ ~~   \/    ~~
#
#  Creating HINT(tm) for single ARM machines (port by N. Douglas):
#      1: Pull out amu, and stick this makefile through it. You will also
#         need cc and link off <Run$Path> if you're using RISC-OS. Possibly
#         if you're running something newer than RISC-OS you may need to do
#         some tweaks (though I doubt it).
#         Note: to lose UnixLib I replaced gettimeofday() in When() in hint.c
#               with the vastly more inaccurate but Acorn-friendly clock()
#               from <time.c>. Seeing as RISC-OS provides nothing better than
#               a centisecond clock (3rd part utilites can remedy this though)
#               however, I'm afraid I can't see much better.
#      2. Set DATATYPE to the appropriate C data type to run your test on.
#         We have found that setting DATATYPE equal to DOUBLE is large enough
#         to sufficiently exercise most architectures. For integer testing, you
#         need to use at least a 32 bit integer. Supported data types are:
#            DOUBLE     double
#            FLOAT      float
#            LONGLONG   long long
#            LONG       long
#            INT        int
#      3. CC has been set to the default of cc - the Norcroft compiler. Alter
#         this for Easy C, GCC, etc.
#      4. Set the various FLAGS variables appropriately for whatever compiler.
#         The  "-D$(ARCH) -D$(DATATYPE)"  _MUST_ be present on both the 
#         KERN_CFLAGS and the DRIV_CFLAGS.
#         Note: You may need to change the location of your stubs (mine's
#               %.o.stubs) in the linking stage below.
#      5. Save the Makefile and type 'make' to create the executables.
#         To run the benchmark double-click on the executable produced (or
#         run it from the command-line)

DSIZE      = int
ISIZE      = int

DRIV_SRC   = hint.c
KERN_SRC   = hkernel.c
INCLUDES   = hint.h typedefs.h
TARGET     = hint
DATAFILE   = $(DATATYPE)

CC         = v506.cc
KERN_CFLAGS= -throwback -c -DARMRO -DDSIZE=$(DSIZE) -DISIZE=$(ISIZE) -Otime
DRIV_CFLAGS= -throwback -c -DARMRO -DDSIZE=$(DSIZE) -DISIZE=$(ISIZE) -Otime
LINK       = v500.link
LFLAGS     = -aif

targets:    $(TARGET)


run:    $(TARGET) $(DATAFILE)


rerun:
		/bin/rm -f  $(DATAFILE)
		make run

clean:
		/bin/rm -f  $(DATAFILE) hint.o hkernel.o

clobber:
		/bin/rm -f  $(DATAFILE)
		/bin/rm -f  $(TARGET)


#
# This section of the Makefile is for compiling the binaries
#
hint: hint.o hkernel.o armro.o
		$(link) hint.o hkernel.o armro.o %.v500.o.stubs -o hint $(LFLAGS) 

hint.o: $(DRIV_SRC) $(INCLUDES) makefilero
		$(CC) $(DRIV_CFLAGS) $(DRIV_SRC) -o hint.o

hkernel.o: $(KERN_SRC) $(INCLUDES) makefilero
		$(CC) $(KERN_CFLAGS) $(KERN_SRC) -o hkernel.o

armro.o: s.armro
		objasm -depend !Depend -throwback -Stamp -quit -CloseExec -o o.armro s.armro

#
# This section has the data file dependancies
# Dynamic dependencies:
