1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
--- Makefile.orig Mon Jul 24 02:00:40 1995
+++ Makefile Sat Jul 6 13:53:51 2002
@@ -23,8 +23,8 @@
#
# Mr A S R Ashley B.Eng (Hons) 23rd July 1995
- CC = gcc
- CPP = g++
+# CC = gcc
+ CPP = ${CXX}
RM = rm -f
DEPFILE = Dependancies
@@ -33,7 +33,7 @@
SOURCES = main.C globals/version.c
OBJS = main.o globals/version.o
ARCHIVES = editor/editor.a ui/ui.a MpegCodec/mpeg.a
- LIBS = -lXext -lX11 -lpnm -lppm -lpbm -lpgm -lm
+ 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++)
@@ -55,11 +55,11 @@
# PBMDIR The location of the pbmplus header files, which is
# /usr/include/gr on my Linux machine.
-PBMDIR = /usr/include/X11R5/X11
+PBMDIR = $(LOCALBASE)/include
INCLUDES = -Iglobals -Iui -IMpegCodec -IMpegCodec/decoder \
- -IMpegCodec/encoder -Ieditor
-CPPFLAGS = -Wall -pipe -O4
-CFLAGS = -Wall -pipe -O4
+ -IMpegCodec/encoder -Ieditor -I$(X11BASE)/include
+CPPFLAGS = ${CXXFLAGS}
+#CFLAGS = -Wall -pipe -O4
SHMEM = -DSH_MEM
CACHE_FLAGS = -DCACHE_SIZE=12288 -DCACHE_GRANULARITY=5
@@ -70,22 +70,22 @@
all: mpeg_edit
-ui.a:
- cd ui && make ui.a EXTRA="$(EXTRA)" CPPFLAGS="$(CPPFLAGS)" \
+ui/ui.a:
+ cd ui && $(MAKE) ui.a EXTRA="$(EXTRA)" CPPFLAGS="$(CPPFLAGS)" \
CFLAGS="$(CFLAGS)" && cd ..
-mpeg.a:
- cd MpegCodec && make mpeg.a EXTRA="$(EXTRA)" CPPFLAGS="$(CPPFLAGS)" \
+MpegCodec/mpeg.a:
+ cd MpegCodec && $(MAKE) mpeg.a EXTRA="$(EXTRA)" CPPFLAGS="$(CPPFLAGS)" \
CFLAGS="$(CFLAGS)" CACHE_FLAGS="$(CACHE_FLAGS)" && cd ..
-editor.a:
- cd editor && make editor.a EXTRA="$(EXTRA)" CPPFLAGS="$(CPPFLAGS)" \
+editor/editor.a:
+ cd editor && $(MAKE) editor.a EXTRA="$(EXTRA)" CPPFLAGS="$(CPPFLAGS)" \
CFLAGS="$(CFLAGS)" SHMEM="$(SHMEM)" PBMDIR="$(PBMDIR)" && cd ..
-mpeg_edit: ui.a mpeg.a editor.a $(DEPFILE) $(OBJS)
+mpeg_edit: $(ARCHIVES) $(DEPFILE) $(OBJS)
$(CPP) -o mpeg_edit $(OBJS) $(ARCHIVES) $(LIBS)
-ppmtorle: mpeg.a editor.a $(DEPFILE) ppmtorle.o
+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)
@@ -93,24 +93,24 @@
clean:
$(RM) mpeg_edit main.o globals/version.o
- set -e; for i in $(SUBDIRS); do cd $$i && make clean && cd .. ; done
+ 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)" \
+ 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)
+ $(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)
+#include $(DEPFILE)
#endif
|