# Makefile for the mpeg decoder part of the mpeg_edit programme
# (decoder directory)
#
#  Copyright (C) 1995 Alexis Ashley
# 
#  email:	milamber@ripley.demon.co.uk
#
#  mail:	Mr A S Ashley, 61/63 Underwood Road, Plympton, Plymouth,
#		Devon, PL7 3SZ, ENGLAND
#
#  This program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software
#  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
#                       Mr A S R Ashley B.Eng (Hons)    23rd July 1995
#

AR 		= ar r
RM 		= rm -f
CC		= gcc
CPP 		= g++
RANLIB          = ranlib
DEPFILE 	= Dependencies
CCOPTIMISATIONS = -O6 -funroll-loops -fomit-frame-pointer
ANALYSIS 	= -DANALYSIS
DEFINES		= -DSEEK_SET=0
        
HEADERS = util.h decoder.h parseblock.h motionvector.h huffman.h jrevdct.h \
	  decls.h dmpeg.h
SOURCES = util.c decoder.c parseblock.c motionvector.c huffman.c jrevdct.c
OBJS    = util.o decoder.o parseblock.o motionvector.o huffman.o jrevdct.o
OTHERS  = Makefile
ALL     = ar

.c.o:	
	$(CC) $(CFLAGS) $(DEFINES) $(EXTRA) -c $< 

all:	$(ALL) 

ar:	$(DEPFILE) $(OBJS)
	$(AR) ../mpeg.a $(OBJS)

clean:
	$(RM) decoder.a $(OBJS) $(DEPFILE) 

FORCE:


dep:	FORCE
	$(RM) $(DEPFILE) 
	make $(DEPFILE) 

$(DEPFILE):
	set -e; for i in $(SOURCES); do $(CC) -M $$i >>$(DEPFILE); done
	
#
# include a dependency file if one exists
#
#ifeq ($(DEPFILE),$(wildcard $(DEPFILE)))
include $(DEPFILE)
#endif
