makefile.original 1.29 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
MODULES = 	Stdlib.hs MGRlib.hs \
		GeomNum.hs Rationals.hs \
		Euclid.hs EuclidGMS.hs \
		BSPT.hs Merge.hs Render.hs \
		Interface.hs Interpret.hs Init.hs Input.hs Params.hs \
		Main.hs Prog.hs 
		
INTERFACES=$(MODULES:%.hs=%.hi)

YMODS = ${MODULES} Libfuns.hs
YINTS=$(YMODS:%.hs=%.hi)
YOBJS=$(YMODS:%.hs=%.o)
 
HC=hc

.PRECIOUS: $(YINTS) $(YOBJS) 

%.hs : %.lhs
	lit2pgm -q -o $@ $<

%.o: %.hs
	${HC} ${HFLAGS} -c $<

%.hi: %.o
	@if test ! -f $@ ; then \
    	    rm $< ; \
	    ${MAKE} $@ ; \
	fi

main: ${YOBJS}
	${HC} ${HFLAGS} -o main ${YOBJS}

        
# extra dependencies
MGRlib.o	:
Stdlib.o	: 
Libfuns.o	:

Rationals.o	: 
GeomNum.o	: Rationals.hi Params.hi 

Euclid.o	: GeomNum.hi Stdlib.hi MGRlib.hi Params.hi 
EuclidGMS.o	: Euclid.hi GeomNum.hi Stdlib.hi Params.hi

BSPT.o		: EuclidGMS.hi GeomNum.hi Stdlib.hi Libfuns.hi
Merge.o		: BSPT.hi EuclidGMS.hi GeomNum.hi Libfuns.hi
Render.o	: BSPT.hi EuclidGMS.hi GeomNum.hi Stdlib.hi MGRlib.hi Params.hi Libfuns.hi

Interface.o	: Interpret.hi Init.hi BSPT.hi Merge.hi Render.hi GeomNum.hi Stdlib.hi Params.hi
Interpret.o	: EuclidGMS.hi GeomNum.hi Stdlib.hi Params.hi 
Init.o		: Stdlib.hi MGRlib.hi Params.hi
Input.o		: Interpret.hi Rationals.hi Params.hi 
Params.o	: 

Prog.o          : Interface.hi Interpret.hi Init.hi Input.hi BSPT.hi 
Main.o          : Prog.hi