#	"@(#)Makefile	1.4 AVS 93/11/18"
#			Copyright (c) 1993 by
#			Advanced Visual Systems Inc.
#			All Rights Reserved
#	
#	This software comprises unpublished confidential information of
#	Advanced Visual Systems Inc. and may not be used, copied or made
#	available to anyone, except in accordance with the license
#	under which it is furnished.
#	
# For more information, please send email to avsemail@ncsc.org
# Makefile for 	   : bit_movie
# Module Author    : Ian Curington


# variable and override it during the make as in:
#    setenv AVS_PATH /my_dir/avs
#    make -e

AVS_PATH=/usr/avs
INC_FILE=$(AVS_PATH)/include/Makeinclude
include $(INC_FILE)

#
# Special Stub patch for Sunos 4.1:
#
###SUN_FLUSH = ./flush.o
#
AVS_LIBS = $(AVS_PATH)/lib
BASELIBS=-lgeom -lutil -lgeom -lm $(SUN_FLUSH)
FLOWLIBS=-L$(AVS_LIBS) -lflow_c $(BASELIBS) $(LASTLIBS)
CSIMLIBS=-L$(AVS_LIBS) -lsim_c $(BASELIBS) $(LASTLIBS)
F77_FLOWLIBS=-L$(AVS_LIBS) -lflow_f $(BASELIBS) $(LASTLIBS)
F77_SIMLIBS=-L$(AVS_LIBS) -lsim_f $(BASELIBS) $(LASTLIBS)
F77_BIND = $(AVS_PATH)/bin/f77_binding
AVS_INC = -I$(AVS_PATH)/include
F77_INC = $(AVS_PATH)/include
CFLAGS=$(ACFLAGS) $(AVS_INC) -Dsep_exe -DSEPARATE_MODULES -DSEP_EXE
F77FLAGS=$(AFFLAGS)
FFLAGS=$(F77FLAGS)
PORTNAME=$(PORT)_$(PORTVERS)


# -----------------------------------------------------------------

all: bit_movie 

port_mods: bit_movie_$(PORTNAME)

bit_movie:	
	rm -rf bit_movie
	$(MAKE) bit_movie_$(PORTNAME)
	ln -s bit_movie_$(PORTNAME) bit_movie

bit_movie_$(PORTNAME):  bit_movie.c
	$(CC) $(CFLAGS) -o bit_movie_$(PORTNAME) \
	bit_movie.c \
	$(CSIMLIBS) \
	$(AVS_X11LIBS)

clean:
	rm -f core *.o bit_movie 

port_mods_clean:
	rm -f bit_movie_$(PORTNAME)

port_mods_flush:
	rm -f bit_movie_*