#
# Makefile for SOS
# $Id: Makefile,v 1.7 1993/02/26 03:50:15 cph Exp $
#

# Redefine this appropriately for your machine:
CFLAGS = -Xa -O

SCFILES = mitutil.sc random.sc cache.sc sos.sc macros.sc
CFILES = mitutil.c random.c cache.c sos.c macros.c
OBJECTS = mitutil.o random.o cache.o sos.o macros.o

all: sos

sos: $(OBJECTS)
	scc -i -o sos \
	-m mitutil -m random -m soscache -m sos -m sosmacro \
	$(OBJECTS)

tsos: $(OBJECTS) microbench.o ptime.o
	scc -i -o tsos \
	-m mitutil -m random -m soscache -m sos -m sosmacro -m microbench \
	$(OBJECTS) microbench.o ptime.o

clean:
	rm -f $(CFILES) microbench.c *.o sos tsos

.SUFFIXES:	.o .c .sc

.sc.c:
	scc -Og -Ot -Ob -On -C $*.sc

.c.o:
	scc $(CFLAGS) -c $*.c

mitutil.c: mitutil.sc mitutil.sch

random.c: random.sc mitutil.sch
	scc -Og -Ot -Ob -C random.sc

cache.c: cache.sc mitutil.sch random.sch cache.sch

sos.c: sos.sc mitutil.sch cache.sch

macros.c: macros.sc mitutil.sch macros.sch

microbench.c: microbench.sc mitutil.sch sos.sch macros.sch ptime.sch
	scc -Og -Ot -Ob -C microbench.sc

ptime.o: ptime.c
	cc $(CFLAGS) -c ptime.c
