# Main makefile for the mpeg_edit programme. # # 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 # CC = gcc CPP = ${CXX} RM = rm -f DEPFILE = Dependancies SUBDIRS = ui MpegCodec editor xuseless HEADERS = SOURCES = main.C globals/version.c OBJS = main.o globals/version.o ARCHIVES = editor/editor.a ui/ui.a MpegCodec/mpeg.a LIBS = -L$(X11BASE)/lib -L$(LOCALBASE)/lib -lXext -lX11 -lnetpbm -lm # # CPPFLAGS -Wall all warnings # -pipe speeds up compilation (remove only if not using g++) # -O4 makes g++ optimise the code # -DDEBUG some debugging info on stdout # -DDEBUG2 (-DDEBUG needed as well) extra debug info # # CFLAGS -Wall all warnings # -pipe speeds up compilation (remove only if not using g++) # -O4 makes gcc optimise the code # # SHMEM -DSH_MEM enables shared memory # # CACHE_FLAGS # -DCACHE_SIZE sets size of frame cache (in units of 1K) # -DCACHE_GRANULARITY sets how many frames to kill from cache # when space is needed in the cache # # PBMDIR The location of the pbmplus header files, which is # /usr/include/gr on my Linux machine. PBMDIR = $(LOCALBASE)/include INCLUDES = -Iglobals -Iui -IMpegCodec -IMpegCodec/decoder \ -IMpegCodec/encoder -Ieditor -I$(X11BASE)/include CPPFLAGS = ${CXXFLAGS} #CFLAGS = -Wall -pipe -O4 SHMEM = -DSH_MEM CACHE_FLAGS = -DCACHE_SIZE=12288 -DCACHE_GRANULARITY=5 .SUFFIXES: .C $(SUFFIXES) .C.o: $(CPP) $(CPPFLAGS) $(INCLUDES) $(EXTRA) -c $< all: mpeg_edit ui/ui.a: cd ui && $(MAKE) ui.a EXTRA="$(EXTRA)" CPPFLAGS="$(CPPFLAGS)" \ CFLAGS="$(CFLAGS)" && cd .. MpegCodec/mpeg.a: cd MpegCodec && $(MAKE) mpeg.a EXTRA="$(EXTRA)" CPPFLAGS="$(CPPFLAGS)" \ CFLAGS="$(CFLAGS)" CACHE_FLAGS="$(CACHE_FLAGS)" && cd .. editor/editor.a: cd editor && $(MAKE) editor.a EXTRA="$(EXTRA)" CPPFLAGS="$(CPPFLAGS)" \ CFLAGS="$(CFLAGS)" SHMEM="$(SHMEM)" PBMDIR="$(PBMDIR)" && cd .. mpeg_edit: $(ARCHIVES) $(DEPFILE) $(OBJS) $(CPP) -o mpeg_edit $(OBJS) $(ARCHIVES) $(LIBS) ppmtorle: MpegCodec/mpeg.a editor/editor.a $(DEPFILE) ppmtorle.o $(CPP) -o ppmtorle ppmtorle.o MpegCodec/frame.o editor/yuv.o $(LIBS) globals/version.o: $(ARCHIVES) $(CC) $(CFLAGS) $(EXTRA) -c globals/version.c -o globals/version.o clean: $(RM) mpeg_edit main.o globals/version.o set -e; for i in $(SUBDIRS); do cd $$i && $(MAKE) clean && cd .. ; done dep: FORCE set -e; for i in $(SUBDIRS) ; do cd $$i && $(MAKE) dep EXTRA="$(EXTRA)" \ CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" SHMEM="$(SHMEM)" \ PBMDIR="$(PBMDIR)" && cd .. ; done $(RM) $(DEPFILE) $(MAKE) $(DEPFILE) FORCE: $(DEPFILE): set -e; for i in $(SOURCES) ; do $(CPP) $(INCLUDES) -M $$i >>$(DEPFILE) ; done # # include a dependency file if one exists # #ifeq ($(DEPFILE),$(wildcard $(DEPFILE))) #include $(DEPFILE) #endif