# Step 1:
#	Set CC to the C compiler you want to use.  On Sun, gcc 
#	produces faster code.  Your mileage may vary.
#CC            = gcc
CC            = cc

# Step 2:
#	Set INCLUDEDIR equal to -I followed by include directory
#	path for X11 include files. 

INCLUDEDIR    = /usr/include

#
# Step 3:
#	Set CFLAGS.  Below are def's for some machines.  Uncomment the
#	appropriate one or make one of your own. If you want the player
#       to gather statistics about the video stream, add -DANALYSIS to
#       CFLAGS. If you do NOT want to use shared memory, remove 
#       -DSH_MEM from CFLAGS.
#
#
#NeXT C Flags
CFLAGS	       = -O -Wall

#
# Step 4:
#	Set LIBS equal to path of libX11.a and libXext.a or the loader
#	flag equivalents (i.e. -lX11 -lXext).
#       If you are NOT using shared memory, libXext.a is unecessary.
#       NOTE: below the default definition are
#             a few definitions for specific architectures.
LIBS	      = -lNeXT_s
#LIBS	      = /usr/lib/libX11.a /usr/lib/libXext.a

#
# Step 5:
#	Set DEST to pathname of final destination of player...
#
DEST	      = .

#
# That's it!  The rest of this shouldn't need any modifications...
#
EXTHDRS	      =

HDRS	      = util.h video.h decoders.h dither.h

INSTALL	      = /etc/install

LD	      = $(CC)

LDFLAGS	      =

MAKEFILE      = Makefile

OBJS          = util.o video.o parseblock.o motionvector.o decoders.o \
		gray.o main.o mono.o jrevdct.o 24bit.o gnext.o

PRINT	      = pr

PROGRAM       = mpegDecode

SHELL	      = /bin/sh

SRCS	      = util.c video.c parseblock.c motionvector.c decoders.c \
		gray.c main.c mono.c jrevdct.c 24bit.c gnext.c

SYSHDRS	      = 

all:		$(PROGRAM)

$(PROGRAM):	$(OBJS)
		$(LD) $(LDFLAGS) $(OBJS) $(LIBS) -lm -o $(PROGRAM)

clean:;		@rm -f *.o core
 
clobber:;	@rm -f $(OBJS) $(PROGRAM) core tags

depend:;	@mkmf -f $(MAKEFILE) ROOT=$(ROOT)

echo:;		@echo $(HDRS) $(SRCS)

index:;		@ctags -wx $(HDRS) $(SRCS)

install:	$(PROGRAM)
		@echo Installing $(PROGRAM) in $(DEST)
		@-strip $(PROGRAM)
		@if [ $(DEST) != . ]; then \
		(rm -f $(DEST)/$(PROGRAM); $(INSTALL) -f $(DEST) $(PROGRAM)); fi

print:;		@$(PRINT) $(HDRS) $(SRCS)

tags:           $(HDRS) $(SRCS); @ctags $(HDRS) $(SRCS)

update:		$(DEST)/$(PROGRAM)
