# Makefile for the mpeg_edit programme (editor 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
CC       = gcc
CPP      = g++
RANLIB   = ranlib
RM       = rm -f
INCLUDES = -I../globals -I../ui -I../MpegCodec -I../MpegCodec/decoder \
	   -I../MpegCodec/encoder -I$(PBMDIR) 

DEPFILE  = Dependancies
HEADERS  = yuv.H 2x2_window.H mono_window.H bw_window.H effects.H \
	   yuv_window.H effects.H codec.H time_win.H help.H \
	   tiny_window.H colour_window.H editor.H
SOURCES  = yuv.C 2x2_window.C mono_window.C bw_window.C effects.C \
	   time_win.C help.C tiny_window.C colour_window.C editor.C
OBJS     = yuv.o 2x2_window.o mono_window.o bw_window.o effects.o \
	   time_win.o help.o tiny_window.o colour_window.o editor.o
ALL      = editor.a

.SUFFIXES:	.C $(SUFFIXES) 

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

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

all:	$(ALL) 

editor.a:	$(DEPFILE) $(OBJS) 
	$(RM) $@ 
	$(AR) $@ $(OBJS)
	$(RANLIB) $@ 

clean:
	rm -f editor.a $(OBJS) $(DEPFILE)

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

FORCE:


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