
#CC=gcc -I. -O2
CHARMC = ../../bin/charmc -seq -I.

all: qt stp testpgm

qt: md/i386.h qt.c md/i386.s
	rm -f qtmd.h
	ln -s md/i386.h qtmd.h
	$(CHARMC) -o qt.o qt.c
	as --32 -o qtmds.o md/i386.s
	CHARMINC=..; . ../conv-config.sh;	\
	$(CHARMC) -shared -o libqt.$$CMK_SHARED_SUF qt.o qtmds.o
	ar q libqt.a qt.o qtmds.o

stp:
	$(CHARMC) -c stp.c
	ar q libstp.a stp.o

testpgm:
	$(CHARMC) -c meas.c
	as --32  -o qtmdb.o md/i386_b.s
	$(CHARMC) -o run meas.o qtmdb.o libstp.a libqt.a
