#  Makefile for run-time helpers
#
#  Copyright 1996, 1997 Arizona Board of Regents; see COPYRIGHT file for 
#  details.


CC = cc
CFLAGS = -I../packages/API/include -I../packages/TOBA/include $(CBUILD)
THREADS = null

DONE = runtime.done
UPDATED = runtime.updated

HELP = alloc.c binary_loader.c file.c finalizer.c helpers.c \
       monitor.c runtime.c sthreads.c structs.c throw.c

API = awt_image_ColorModel.c io_File.c io_FileDescriptor.c \
  io_FileInputStream.c io_FileOutputStream.c io_RandomAccessFile.c \
  lang_Class.c lang_ClassLoader.c lang_Compiler.c lang_Double.c \
  lang_Float.c lang_Math.c lang_Object.c lang_Runtime.c \
  lang_SecurityManager.c lang_System.c lang_Thread.c \
  lang_Throwable.c net_DatagramSocket.c net_InetAddress.c \
  net_PlainSocketImpl.c net_SocketInputStream.c \
  net_SocketOutputStream.c util_Date.c $(PROC)

SRC = $(HELP) $(API)
OBJ = $(SRC:.c=.o)


default:  $(DONE)

$(DONE):  $(OBJ)
	touch $(UPDATED) $(DONE)

$(OBJ): toba.h runtime.h

alloc.o finalizer.o lang_Thread.o:		sthreads.h
monitor.o runtime.o sthreads.o: 		sthreads.h
alloc.o lang_Runtime.o runtime.o sthreads.o:	../gc/gc.h


lint:
	lint -I../packages/API/include $(SRC)

sthreads.c sthreads.h : sthreads_$(THREADS).c sthreads_$(THREADS).h
	rm -f sthreads.c sthreads.h
	cp sthreads_$(THREADS).c sthreads.c
	cp sthreads_$(THREADS).h sthreads.h

clean:
	rm -f *.o sthreads.c sthreads.h $(DONE)
