# Makefile for STOX. Johan Ihren.

.SUFFIXES:

.SUFFIXES:	.sc .o

.sc.o: ;	$(SCC) -c $(SCCFLAGS) $*.sc
#		ar r ../libstox.a $*.o

SCCFLAGS  = -O -On -Ob -Og
SCC	  = scc

STOXSRC = stox.sc dfsm.sc buttons.sc stredit.sc label.sc scrollbar.sc \
          text.sc menus.sc util.sc boxes.sc container.sc widget.sc

STOXOBJ = dfsm.o stox.o buttons.o stredit.o label.o scrollbar.o \
	  text.o menus.o util.o boxes.o container.o widget.o

../libstox.a:	$(STOXOBJ)
		cd ../csrc ; $(MAKE) ../libstox.a
		ar r ../libstox.a $(STOXOBJ)
		ranlib ../libstox.a

stox.sc:	../Makefile
		sed -e "s@^(define scix-load-path.*@(define scix-load-path \'$(SLP))@" stox.sc > stox.new
		mv stox.new stox.sc

$(STOXOBJ):	../macros/extsyntax.sc ../macros/oos.sc

clean: ;	rm -f core *.o *~ *.c SC-TO-C* #*
