#include "../../config"

/* 
   The tape_clock routine is implemented using the gettimeofday
   system call. However, depending on the architecture of the machine,
   the implementation can be optimized using assembly language routines.
   This eliminates the gettimeofday system call overhead.

   To add a new implementation of tape_clock do the following:

   1) add a subdirectory with the machine dependent assembly and/or
      C sources (eg, RS),
   2) create an Imakefile in that directory to generate the necessary
      object modules,
   3) add an #ifdef construct to *this* Imakefile specifying SUBDIRS,
      ALLOBJS and DEFINES,
   4) add an #ifdef construct to tape_clock.c and implement the tape_clock
      routine using your additional assembly and/or C routines

   This Imakefile will produce a library with the tape_clock routine
   and the associated auxiliary routines.
*/


SRCS = tape_clock.c
OBJS = tape_clock.o

#ifdef RsArchitecture

/* RS6K nodes of IBM SP1 */

#define IHaveSubdirs
SUBDIRS = RS
ALLOBJS = $(OBJS) ./$(SUBDIRS)/timer.o ./$(SUBDIRS)/second.o
DEFINES = -DRsArchitecture -D$(TAPE_PVM_VERSION)

#else

/* Default using gettimeofday */

ALLOBJS = $(OBJS)
DEFINES = -DDefaultArchitecture -D$(TAPE_PVM_VERSION)

#endif


/* Compile auxiliary routines if any */

#ifdef IHaveSubdirs

#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
MakeSubdirs($(SUBDIRS))
DependSubdirs($(SUBDIRS))

#endif

/* build the objects */

AllTarget($(OBJS))

install::

DependTarget()
