# Makefile for the mpeg encoder part of the mpeg_edit programme
# (encoder 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++
DEPFILE 	= Dependencies
CCOPTIMISATIONS = -O6 -funroll-loops -fomit-frame-pointer


HEADERS = all.h ansi.h basic_frame.h bframe.h bitio.h block.h bsearch.h \
	  byteorder.h dct.h decls.h encoders_frame.h frames.h fsize.h \
	  general.h huff.h iframe.h mheaders.h mtypes.h noparallel.h \
	  pframe.h postdct.h psearch.h search.h subsample.h

SOURCES = basic_frame.c bframe.c bitio.c block.c bsearch.c frames.c \
	  fsize.c huff.c iframe.c mfwddct.c mheaders.c noparallel.c \
	  pframe.c postdct.c psearch.c subsample.c

OBJS =    basic_frame.o bframe.o bitio.o block.o bsearch.o frames.o \
	  fsize.o huff.o iframe.o mfwddct.o mheaders.o noparallel.o \
	  pframe.o postdct.o psearch.o subsample.o

OTHERS  = Makefile

ALL     = $(OBJS) 

.SUFFIXES:	.C $(SUFFIXES) 

.C.o:	
	$(CPP) $(CPPFLAGS) $(EXTRA) -c $< 

.c.o:	
	$(CC) $(CFLAGS) $(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 $(DEFINES) >>$(DEPFILE); done
	
#
# include a dependency file if one exists
#
#ifeq ($(DEPFILE),$(wildcard $(DEPFILE)))
include $(DEPFILE)
#endif
