#########################################################################
#                   Make file for MPEGTool Version 1.02                 #
#########################################################################
# The following option can be selected as FLAG_OPT ( -D<option> )       #
#                                                                       #
# DISPLACE=<n>    : The searching area of MOTION VECTOR (deafult=15)    #
# FAST_MV         : Fast (abbreviated) motion estimation                #
# NO_PROGRESS     : Hide progress report window during encode           #
# FREQUENT_UPDATE : Progress report update in every slice               #
# DISPSTAT        : Display statistic report on console during encode   #
# DEBUG           : Debug mode. This displays progress resport and      #
#                   some other parameter information to console.	#
# BLOCK_LENGTH=<n>: Block length of input data on tape device           #
#                   (default=1024)                                      #
# WRITE_LENGTH=<n>: Block length of encoded data on tape device         #
#                   (default=4096)					#
# MOTIF_NEW       : To be used if compiling for Motif 1.2               #
#########################################################################
#-----------------------------------------------------------------------#
# Set MPEGTool compile options
#
FLAG_OPT = -DFAST_MV 
#-----------------------------------------------------------------------#
# C Compiler Selection
#   Sun SparcStation --> gcc 
#   HP 9000's        --> cc
#   IBM RS6000's     --> gcc
#	
CC = gcc
#CC = cc 
#-----------------------------------------------------------------------#
#
#
#   Set location of X11 and Motif includes ( -I<directory> )
#
# For HP 9000
#
#INCDIR = -I/usr/include/Motif1.2 -I/usr/include/X11R5 
#
# Set C flags
#
# for Sun Sparcstations
#
CFLAGS = -O3 $(INCDIR) -I. $(FLAG_OPT) 
#
# For HP 9000's
#
#CFLAGS = +O3 +OS $(INCDIR) -I. $(FLAG_OPT)
#-----------------------------------------------------------------------#
# Set location for X11 and Motif libraries ( -L<directory> )
#
# Libraries for Sun Sparcstations
LIBDIR =
#
# Libraries for HP9000's
#LIBDIR = -L/usr/lib/X11R5 -L/usr/lib/Motif1.2  
#
# Libraries for SVR4/Solaris 2.x, add
#
#	-lnsl -lsocket -lgen
#
# EXTRALIBS= -lnsl -lsocket -lgen#
#
LIBS= $(LIBDIR) -lm -lXm -lXt -lX11 $(EXTRALIBS)
#-----------------------------------------------------------------------#
EXECFILE = MPEGTool 
#-----------------------------------------------------------------------#
OBJ0 = MOTIF_main.o MOTIF_info.o MOTIF_utils.o MOTIF_error.o 
OBJ1 = MOTIF_mpeg.o MOTIF_configure.o MOTIF_stat.o MOTIF_working.o
OBJ2 = MT_mpeg_param_set.o MT_stat_param_set.o 
OBJ3 = MTE_code.o MTE_construct_mv.o MTE_encoder.o 
OBJ4 = MTE_header.o MTE_interpolate.o MTE_intra.o MTE_utils.o 
OBJ5 = MTS_statmain.o MTS_plot.o MTS_utils.o 
DCTOBJ = jrevdct.o jfwddct.o
#-----------------------------------------------------------------------#
OBJ =  $(OBJ0) $(OBJ1) $(OBJ2) $(OBJ3) $(OBJ4) $(OBJ5) $(DCTOBJ)
#-----------------------------------------------------------------------#
$(EXECFILE):	$(OBJ) $(DCTOBJ)
		$(CC) $(CFLAGS) -o $(EXECFILE) $(OBJ) $(LIBS)
#-----------------------------------------------------------------------#
clean:
	rm *.o
	rm MPEGTool
#-----------------------------------------------------------------------#
# DEPENDENCIES
#----------------- motif related files ------------------#
MOTIF_configure.o : global.h
MOTIF_error.o     : errormsg.h
MOTIF_main.o      : global.h
MOTIF_mpeg.o      : global.h
MOTIF_stat.o      : global.h
MOTIF_working.o   : global.h errorhandle.h
MOTIF_utils.o     : 
MT_mpeg_param_set.o : global.h errorhandle.h
MT_stat_param_set.o : global.h
#----------------- mpeg encoder related files------------------#
MTE_code.o          : global.h mpeg_code.h errorhandle.h
MTE_construct_mv.o  : construct_mv.h
MTE_encoder.o       : global.h mpeg_encode.h
MTE_header.o        : 
MTE_idct1.o         :
MTE_interpolate.o   : global.h
MTE_intra.o         : global.h mpeg.h
MTE_utils.o         : global.h utils.h errorhandle.h
#----------------- dct related files --------------------#
jrevdct.o           : jinclude.h
jfwddct.o           : jinclude.h
#----------------- stats related files --------------------#
MTS_statmain.o      : global.h errorhandle.h
MTS_utils.o         : global.h errorhandle.h
MTS_plot.o          : global.h gnuplotcommand.h

