#	Makefile for programs in directory gbin/detail/pcommands
#
#	$Header: /ufs/pcvs/src/support/source/iris/Makefile.iris,v 1.1.1.1 1996/05/29 23:53:34 prisms Exp $
#
#	$Log: Makefile.iris,v $
# Revision 1.1.1.1  1996/05/29  23:53:34  prisms
# Initial release
#
# Revision 1.2  90/09/14  13:13:22  prisms
# *** empty log message ***
# 
# Revision 1.1  90/09/14  12:56:45  prisms
# Initial revision
# 
#
#	COMMENTS

.INCLUDE:	"Prisms.make"

#
# C programs that live in this directory
#
# Please keep these in alphabetical order.  That way one can tell easily
# how far down the list one has progressed when compiling etc. 
#

PROGRAMS	=	set60 \
			setntsc \
			setpal

SOURCES		=	set60.c \
			setntsc.c \
			setpal.c
#
# Programs that are shell scripts
#
#SCRIPTS		=

#
# Manual pages must exist for PROGRAMS and SCRIPTS
#
# Again, keep these in alphabetical order too, please.

MANS		=	

MANSOURCES	=	

# DEBUG		=	-DDEBUG -g
DEFINES		=	$(DEBUG) -D$(MACHINE) -D$(UNIX)
OPTIMIZER 	= 	-O

COMMON_CFLAGS	= 	$(DEFINES) $(INCFLAG) $(OPTIMIZER)

COMMON_LIBS	=	-ltools -lm
FOURDLIBS	=	-lgl_s -lc_s
IRISLIBS	=	-lbsd

all:	progs mans

progs:  $(PROGRAMS)

mans:	$(MANS)

$(PROGRAMS):
	$(CC) $(CFLAGS) -o $@ $@.c $(LIBFLAG) $(LIBS)

#$(SCRIPTS):
#	@echo "'$@' is a shell script.  It only needs to be installed.

tags:
	ctags -t $(DEFINES) $(INCLUDES) $(PROGRAMS)

clean:
	rm -f a.out core *.o *lint.out $(PROGRAMS) $(MANS)

install: progs mans
	for prog in $(PROGRAMS); do \
	    strip $$prog ; \
	    $(INSTALL) -s -c -o prisms -g prisms -m 555 $$prog $(GBINDIR); \
	done
#	for script in $(SCRIPTS); do \
#	    $(INSTALL)    -c -o prisms -g prisms -m 555 $$script.sh \
#							$(GBINDIR)/$$script; \
#	done
	-( if [ '$(INSTALLMAN)' = 'YES' ]; then	\
	for man in $(MANS); do \
		$(INSTALL) -c -o prisms -g prisms -m 444 $$man \
			$(CAT1DIR)/`basename $$man .man`.1; \
	done; fi )

lint:
	for prog in $(PROGRAMS); do \
		(lint -ab $(INCFLAG) $$prog >$$prog.lint.out); \
	done

print:
	cpr -s Makefile $(INCLUDES) $(SOURCES) $(SCRIPTS)

.INCLUDE:	"Remote.make"

