#*******************************************************************************
#
# University of Western Australia
# Department of Computer Science
# Copyright (c) University of Western Australia
#
# SYSTEM :              VIP
# RELEASE:		3
# SUBSYSTEM:		SPLASH            
# MODULE:		Makefile		
# REVISION:             3.4
# AUTHOR:               
# CREATION DATE:        
# REVISION DATE:	4/26/94        
#
#*******************************************************************************
#
# REVISION LOG
#
# REVISION:
# REVISION DATE:	26 April 1994
# COMMENT:		Fixed up for Xview build
# BY:			PK
#
# REVISION:
# REVISION DATE:	16 Dec 1993
# COMMENT:		Fixed up for Motif build
# BY:			CFF
#
# REVISION:
# REVISION DATE:	28 June 1993
# COMMENT:		Removed utilities.c etc...		
# BY:			CFF
#
# REVISION:
# REVISION:
# REVISION DATE:	21 Sept 1992
# COMMENT:		Added utilities.c etc...		
# BY:			CFF
#
# REVISION:
# REVISION DATE:	14 July 1992
# COMMENT:		ANSIfied and SCCS'd
# BY:			CFF
#
# @(#)Makefile	3.4 4/26/94
#
#******************************************************************************/


# Section that you will need to edit for your own installation of VIP

# The main variables that you will have to set are:
# VIP_DIR
# VIP_MACHINE
# VIP_LIB_DIR
# VIP_BIN_DIR

# We set VIP_MACHINE, VIP_LIB_DIR and VIP_BIN_DIR via environment
# variables to automatically invoke the correct compilation depending on
# the type of machine one is logged into.  If you are working on just
# one architecture you may not wish to do this, nor will you need to
# have separate library or bin subdirectories.

# It is suggested that you only try to build 'splash' for Xview 
# or 'splm' for Motif envirinments.  The other programs are
# a bit experimental.


# REQUIRED ENVIRONMENT VARIABLES

# VIP_MACHINE   SUN or DEC_ALPHA or LINUX
# VIP_LIB_DIR   sunlib or declib or linuxlib
# VIP_BIN_DIR   sunbin or decbin or linuxbin

# ========== libraries and headers ==========
VIP_DIR    = /proj/robvis/ansi_vip
BIN_DIR    = $(VIP_DIR)/bin/${VIP_BIN_DIR}
LIB_DIR    = $(VIP_DIR)/lib/${VIP_LIB_DIR}
INCLUDE    = -I$(VIP_DIR)/include  -I${OPENWINHOME}/include

LIBPATH   = -L$(LIB_DIR)

# Flags and Options - remove -DXVIEW for Motif

fla	= -O -Wall -D${VIP_MACHINE} -DXVIEW
CFLAGS  = $(INCLUDE) $(fla)

# Use the following for Xview
LDFLAGS = $(LIBPATH) -lvip -lxview -lolgx -lX11 -lm

# Use the following for Motif
#LDFLAGS = $(LIBPATH) -lXm -lXt -lX11 -lPW -lm -lvip

#--------- End of section that you will need to edit -------------

# ========== Building rules for Makefile ==========

splash: splash.o graphics.o
	$(LINK.c) -o $(BIN_DIR)/splash splash.o graphics.o -L$(LIB_DIR) -lvip -lxview -lolgx -lX11 -lm
	chmod 775 $(BIN_DIR)/splash

splashx: splashx.o graphics.o
	$(LINK.c) -o $(BIN_DIR)/splashx splashx.o graphics.o -L$(LIB_DIR) -lvip -lxview -lolgx -lX11 -lm
	chmod 775 $(BIN_DIR)/splashx

splash.o: splash.c
	$(COMPILE.c)  splash.c
	chmod 664 splash.c

splashx.o: splashx.c
	$(COMPILE.c) splashx.c
	chmod 664 splashx.c

graphics.o: graphics.c
	$(COMPILE.c) graphics.c
	chmod 664 graphics.c

splm: splashm.o splash_motif.o graphics.o
	gcc -o splm splashm.o splash_motif.o graphics.o $(LDFLAGS)

