Subversion Repositories shark

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 pj 1
# Step 1:
2
#	Set CC to the C compiler you want to use.  On Sun, gcc
3
#	produces faster code.  Your mileage may vary.
4
CC            = gcc
5
#CC            = cc
6
 
7
# Step 2:
8
#	Set INCLUDEDIR equal to -I followed by include directory
9
#	path for X11 include files.
10
 
11
INCLUDEDIR    = -I/usr/include -I/usr/include/X11
12
 
13
# For Solaris/openwindows
14
#INCLUDEDIR = -I/usr/include -I/usr/openwin/share/include -I/usr/openwin/include -I/usr/dt/include
15
 
16
#
17
# Step 3:
18
#	Set CFLAGS.  Below are def's for some machines.  Uncomment the
19
#	appropriate one or make one of your own. If you want the player
20
#       to gather statistics about the video stream, add -DANALYSIS to
21
#       CFLAGS. If you do NOT want to use shared memory, remove
22
#       -DSH_MEM from CFLAGS.
23
#       Use -DSIG_ONE_PARAM if the function passed to signal takes
24
#         one parameter (linux, Solaris)
25
#         Do not use it if it takes none (SunOS, HPUX, Ultrix, OSF1, )
26
#         It works either way, (i think), just gets rid of a warning.
27
#
28
#       Use -NDEBUG for speed, -DDEBUG for resiliance.  On invalid MPEG
29
#         streams a DEBUG compiled mpeg_play will exit gracefully, while
30
#         a NDEBUG one will dump core.  But NDEBUG is faster.
31
 
32
#       Use -DQUIET to have mpeg_play print little by default (useful for
33
#         when it is called by another program like netscape).
34
 
35
#       Use -DQUALITY if you want the default to play streams that conform
36
#         strictly to the MPEG standard but take longer to display by defualt.
37
#         It is also available as -quality on at runtime
38
 
39
#       Use -DFLOATDCT to enable using the computationally expensive but
40
#         accurate floating point DCT through the -quality parameter.
41
 
42
#       Use -DDEFAULT_ORDERED_DITHER to use ORDERED_DITHER instead of
43
#         ORDERED2_DITHER.  On some machines (e.g., Intel Pentiums),
44
#         ORDERED_DITHER is much faster than ORDERED2_DITHER.
45
#       Use -DNOCONTROLS to totally disable the X user interface.  See
46
#         also HDRS, OBJS, and SRCS below.
47
#       To compile as a library (especially reentrant library, see README.lib)
48
 
49
# gcc
50
CFLAGS	      =  -O3 -DNDEBUG -DNONANSI_INCLUDES -DSH_MEM $(INCLUDEDIR)
51
 
52
#Sun Solaris/Openwindows
53
#CFLAGS = -O3 -DNDEBUG -DBSD -DNONANSI_INCLUDES -DSH_MEM -DSIG_ONE_PARAM $(INCLUDEDIR)
54
 
55
#Linux C Flags
56
#CFLAGS	      =  -O3 -fomit-frame-pointer -ffast-math -finline-functions -m486 -DNDEBUG -DNONANSI_INCLUDES -DSH_MEM -DSIG_ONE_PARAM $(INCLUDEDIR) -DDEFAULT_ORDERED_DITHER
57
 
58
#HP C Flags
59
#CFLAGS        = -Ac +O3 -DSH_MEM -DNDEBUG $(INCLUDEDIR)
60
 
61
#DEC C Flags    (On some Alpha's you need -lbsd also)
62
#CFLAGS        = -O -DSH_MEM -DNDEBUG $(INCLUDEDIR)
63
 
64
#RS6000 C Flags -- Most RS6000's do not support shared memory,
65
# but we include it 'cuz it helps so much if you have it.
66
# by the way, if you want to give us a version of libXext with them, feel free
67
#CFLAGS        = -O -DSH_MEM $(INCLUDEDIR)
68
 
69
#SGI C Flags
70
#CFLAGS        = -O -cckr -DSH_MEM $(INCLUDEDIR)
71
 
72
#MIPGS RISC/os 4.5{1,2} C Flags
73
#CFLAGS        = -O -systype sysv -DSH_MEM -DNONANSI_INCLUDES -DMIPS
74
 
75
#PTX Flags (Dynix)
76
#CFLAGS        = -O -DNDEBUG $(INCLUDEDIR)
77
 
78
#NEWS C Flags
79
#CFLAGS	       = -O2 -DSh_MEM -DNO_LRAND48 -DNDEBUG -DNONANSI_INCUDES $(INCLUDEDIR)
80
 
81
#
82
#NeXT C Flags
83
#CFLAGS	       = -O -DNO_LRAND48 -DNDEBUG $(INCLUDEDIR)
84
 
85
#CETIA Unigraph/X C Flags
86
#CFLAGS	       = -O -DNDEBUGS -DBSDCOMPAT -DBSD_LARGE -DCETIA -DX_NOT_STDC_ENV $(INCLUDEDIR)
87
 
88
# Convex 3820 (ConvexOS)
89
#CFLAGS	      =  -O3 -DNDEBUG -DNONANSI_INCLUDES $(INCLUDEDIR) -DNO_LRAND48
90
 
91
#
92
# Step 4:
93
#	Set LIBS equal to path of libXext.a and libX11.a or the loader
94
#	flag equivalents (i.e. -lXext -lX11).
95
#       If you are NOT using shared memory, libXext.a is unecessary.
96
#       NOTE: below the default definition are
97
#             a few definitions for specific architectures.
98
 
99
LIBS	      = -L/usr/lib/X11 -lXext -lX11
100
 
101
# LIBS for MIPS RISC/os 4.5{1,2}
102
#LIBS         = -systype sysv -lXext -lX11 -lbsd
103
 
104
# LIBS for PTX/Dynix
105
#LIBS         = -lXext -lX11 -lsocket -linet -lnsl -lseq
106
 
107
# LIBS for CETIA Unigraph/X
108
#LIBS	      = -lX11 -lbsd
109
 
110
# LIBS for Solaris/Openwindows (some also need  -lucb)
111
#LIBS = -lXext -lX11 -lsocket -lnsl -lw -ldl -lelf
112
 
113
# LIBS for SunOS 4.1.3/Openwindows
114
#LIBS = -lXext -lX11 -lnsl -ldl
115
 
116
 
117
# Some versions of Linux need this
118
#LIBS	      =  -L/usr/X11/lib -L/usr/lib/X11 -lXext -lX11
119
 
120
#
121
# Step 5:
122
#	Set DEST to pathname of final destination of player...
123
#
124
DEST	      = ~/bin
125
 
126
 
127
#
128
# Step 6 (System Dependant Stuff):
129
# On SOLARIS a user reports:
130
# Some systems are missing regcmp, to fix
131
# add -lgen to CFLAGS
132
# Also, uncomment the special SOLARIS INSTALL and LDFLAGS parameters.
133
 
134
#
135
# That's it!  The rest of this shouldn't need any modifications...
136
#
137
 
138
EXTHDRS	      =
139
 
140
HDRS	      = util.h video.h decoders.h fs2.h dither.h fs4.h ctrlbar.h
141
 
142
INSTALL	      = /etc/install
143
 
144
#Solaris INSTALL
145
#INSTALL       = /usr/sbin/install
146
 
147
LD            = $(CC)
148
 
149
LDFLAGS       =
150
 
151
#Solaris LDFLAGS
152
#LDFLAGS       = -R/usr/openwin/lib:/usr/dt/lib -L/usr/openwin/lib -L/usr/dt/lib
153
 
154
 
155
MAKEFILE      = Makefile
156
 
157
OBJS          = util.o video.o parseblock.o motionvector.o decoders.o \
158
                fs2.o fs2fast.o fs4.o hybrid.o hybriderr.o 2x2.o floatdct.o\
159
                gdith.o gray.o mono.o main.o jrevdct.o 16bit.o util32.o\
160
                ordered.o ordered2.o mb_ordered.o readfile.o ctrlbar.o
161
 
162
PRINT	      = pr
163
 
164
PROGRAM       = mpeg_play
165
 
166
SHELL	      = /bin/sh
167
 
168
SRCS	      = util.c video.c parseblock.c motionvector.c decoders.c \
169
                main.c gdith.c fs2.c fs2fast.c fs4.c hybrid.c hybriderr.c \
170
                2x2.c gray.c mono.c jrevdct.c 16bit.c util32.c ordered.c \
171
                ordered2.c mb_ordered.c readfile.c floatdct.c ctrlbar.c
172
 
173
SYSHDRS	      =
174
 
175
all:		$(PROGRAM)
176
 
177
$(PROGRAM):	$(OBJS)
178
		$(LD) $(LDFLAGS) $(OBJS) $(LIBS) -lm -o $(PROGRAM)
179
		strip $(PROGRAM)
180
 
181
clean:;		rm -f $(OBJS) core
182
		@make depend
183
 
184
clobber:;	rm -f $(OBJS) $(PROGRAM) core tags
185
 
186
depend:;	makedepend -- $(CFLAGS) -- $(SRCS)
187
 
188
echo:;		@echo $(HDRS) $(SRCS)
189
 
190
index:;		@ctags -wx $(HDRS) $(SRCS)
191
 
192
install:	$(PROGRAM)
193
		@echo Installing $(PROGRAM) in $(DEST)
194
		@-strip $(PROGRAM)
195
		@if [ $(DEST) != . ]; then \
196
		(rm -f $(DEST)/$(PROGRAM); $(INSTALL) -f $(DEST) $(PROGRAM)); fi
197
 
198
print:;		@$(PRINT) $(HDRS) $(SRCS)
199
 
200
tags:           $(HDRS) $(SRCS); @ctags $(HDRS) $(SRCS)
201
 
202
update:		$(DEST)/$(PROGRAM)
203
 
204
# DO NOT DELETE THIS LINE -- make depend depends on it.