# 
# Copyright (c) 1995 The Regents of the University of California.
# All rights reserved.
# 
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose, without fee, and without written agreement is
# hereby granted, provided that the above copyright notice and the following
# two paragraphs appear in all copies of this software.
# 
# IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
# DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
# OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
# CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# 
# THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
# ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
# PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
# 

#######################
# Name of the program #
#######################
PROGRAM = mpeg_blocks

############
# Compiler #
############
CC = gcc

#######################
# Location of *.tcl   #
#  and bitmaps dir    #
#######################

BLOCKS_DIR = \".\"
#BLOCKS_DIR = \"/usr/local/etc/mpeg_blocks\"

################################
# Search path for include file #
################################
INCLUDEPATH = -I/usr/include
#INCLUDEPATH = -I/usr/include -I/usr/include/tcl 

#################################
# Search path for library file  #
#################################
LIBPATH = -L/usr/X11/lib

##################
# Library files  #
##################
LIBS = -ltk -ltcl -lXext -lX11 -lm 

###################
# Compiler option #
###################
OFLAGS = -O
#OFLAGS = -g -DANALYSIS

##################
# Compiler flags #
##################
CFLAGS = $(OFLAGS) $(INCLUDEPATH) $(LIBPATH) -DBLOCKS_LIB=$(BLOCKS_DIR)

################
# Object files #
################
OBJS = show.o util.o video2.o parseblock.o motionvector.o decoders.o \
       fs2.o fs2fast.o fs4.o hybrid.o hybriderr.o 2x2.o \
       gdith2.o gray.o mono.o playframe2.o jrevdct.o 24bit.o \
       util32.o ordered.o ordered2.o mb_ordered.o monofs4.o \
       halftone.o rgbl.o big_ordered.o 2x2slow.o readfile.o 

SRCS = show.c util.c video2.c parseblock.c motionvector.c decoders.c \
       fs2.c fs2fast.c fs4.c hybrid.c hybriderr.c 2x2.c \
       gdith2.c gray.c mono.c playframe2.c jrevdct.c 24bit.c \
       util32.c ordered.c ordered2.c mb_ordered.c monofs4.c \
       halftone.c rgbl.c big_ordered.c 2x2slow.c readfile.c 

all: $(PROGRAM)

$(PROGRAM): $(OBJS)
	$(CC) $(CFLAGS) $(OBJS) $(LIBS) -o $(PROGRAM)
	strip $(PROGRAM)

clean: 
	rm -f $(OBJS) core 
	@make depend

depend:
	makedepend -- $(CFLAGS) -- $(SRCS)

# DO NOT DELETE THIS LINE -- make depend depends on it.

