# --------------------------------- makefile ---------------------------------

#
# This is part of the flight simulator 'fly8'.
# Author: Eyal Lebedinsky (eyal@ise.canberra.edu.au).
#

#
# makefile for shapes, c7
#

CC=	cl
CFLAGS=	-I..\

SHAPES= runway.vxx m61.vxx mk82.vxx gtarget.vxx target.vxx viewer.vxx \
	plane.vxx crater.vxx house.vxx smoke.vxx tower.vxx broken.vxx \
	box.vxx chute.vxx

ACM=	runway.avx tower.avx f16.avx
ACMF=	f16.fvx


.SUFFIXES: .vx .vxx .acm .avx .fvx

.vx.vxx:
	$(CC) $(CFLAGS) -E $*.vx >$*.002
	awk -f f8shape.awk $*
	del $*.002
	del $*.003

.acm.avx:
	awk -f acm2avx.awk $*
	$(CC) $(CFLAGS) -E $*.001 >avx.002
	del $*.001
	awk -f f8shape.awk avx
	del avx.002
	del avx.003
	if exist $*.avx del $*.avx
	ren avx.vxx $*.avx

.acm.fvx:
	awk -f acm2fvx.awk $*
	$(CC) $(CFLAGS) -E $*.001 >fvx.002
	del $*.001
	awk -f f8shape.awk fvx
	del fvx.002
	del fvx.003
	if exist $*.fvx del $*.fvx
	ren fvx.vxx $*.fvx

all:	shapes

shapes:	$(SHAPES) $(ACM) $(ACMF)

copy:	shapes
	copy *.vxx ..

clean:
	-del *.vxx
	-del *.fvx
	-del *.avx
