head	1.2;
access;
symbols;
locks
	yap:1.2; strict;
comment	@# @;


1.2
date	2006.11.20.18.22.35;	author yap;	state Exp;
branches;
next	1.1;

1.1
date	2006.11.20.18.21.19;	author yap;	state Exp;
branches;
next	;


desc
@@


1.2
log
@*** empty log message ***
@
text
@# Makefile for stm projects

# !! THIS VERSION ASSUME THE DOT-H version of stm.c

#
# COURSE V22.0202: Operating Systems, Fall 2006
# Prof.Yap 
# 
############################################################

############################################################
# VARIABLES
############################################################

# EXE should be .exe for windows and cygwin, and blank for unix.
EXE=
EXE=.exe

OS=sos

p=stm
p=sos

############################################################
# TARGETS
############################################################

######################################### Testing Primes
t1 test1 primes: ${OS}${EXE} primes.stm
	@@echo "Type any positive number n, and this program will compute"
	@@echo "    all primes less than n.  E.g. n=7 will print 2, 3, 5."
	${OS}${EXE} primes.stm
	@@echo "End of testing primes"

######################################### Testing Sort
t2 test2 sort: ${OS}${EXE} sort.stm
	@@echo "Type any list of numbers (separated by white spaces or newlines)."
	@@echo "    newlines).  End with -1." 
	@@echo "    The list will be printed in sorted order."
	@@echo "    E.g., typing 5 2 1 9 -1 will result in 1 2 5 9."
	${OS}${EXE} sort.stm
	@@echo "End of testing sort"

######################################### Testing Sort
t3 test3 fraction: ${OS}${EXE} fraction.stm
	@@echo "Type four number: N D B L "
	@@echo "    (separated by white spaces or newlines)." 
	@@echo "    The sort program will print L digits of the fraction N/D"
	@@echo "    in base B.  E.g., typing 1 3 10 4 will result in 3 3 3 3."
	@@echo "    (Since 1/3 in base 10 is 0.3333...).  Try 1 2 10 4."
	@@echo "    Make sure that N < D."
	${OS}${EXE} fraction.stm
	@@echo "End of testing fraction"

######################################### 
p:
	gcc -o ${p}${EXE} ${p}.c

######################################### 
stm stm.o:
	gcc -c stm.c -o stm.o 

######################################### 
os sos ${OS}${EXE}: stm.o
	gcc stm.o ${OS}.c -o ${OS}${EXE}

############################################################
# House keeping
############################################################
clean:
	rm -f *.o

veryclean: clean
	rm -f *.exe
############################################################
# END
############################################################
@


1.1
log
@Initial revision
@
text
@d68 8
@
