# # This file is a product of Sun Microsystems, Inc. and is provided for # unrestricted use provided that this legend is included on all tape # media and as a part of the software program in whole or part. Users # may copy or modify this file without charge, but are not authorized to # license or distribute it to anyone else except as part of a product # or program developed by the user. # # THIS FILE IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE # WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR # PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. # # This file is provided with no support and without any obligation on the # part of Sun Microsystems, Inc. to assist in its use, correction, # modification or enhancement. # # SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE # INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY THIS FILE # OR ANY PART THEREOF. # # In no event will Sun Microsystems, Inc. be liable for any lost revenue # or profits or other special, indirect and consequential damages, even # if Sun has been advised of the possibility of such damages. # # Sun Microsystems, Inc. # 2550 Garcia Avenue # Mountain View, California 94043 # # # @(#)Makefile.client 9.9 88/01/18 # # Copyright (c) 1987 by Sun Microsystems, Inc. # # Global macro definitions INSDIR=/usr/NeWS BINDIR=${INSDIR}/bin DEMODIR=${INSDIR}/demo LIBDIR=${INSDIR}/lib INCLUDEDIR=${INSDIR}/include INCLUDE=../include LIBNEWS=../lib/NeWS # don't include emacs in this list because there's no Makefile there SUBDIRS=psterm nterm sc # --- Global macro definitions --- OPT=-O #refer to top-level makefile for when to set TARGET_ARCH TARGET_ARCH= TERMLIB= SYSV_NETLIB= OSI=SUN VER=SUNREF SYSV_NETWORK= TERMFLAG=-DSUNTGETENT BYTES= COPTS=${BYTES} # --- Sun Specific Files ---- SUNSPECIFICSRC= SUNSPECIFICOBJ= SUNSPECIFICHDR= SUNSPECIFICPROG= SUNSPECIFICLIB= # CFLAGS=${OPT} ${COPTS} -I${INCLUDE} -D${OSI} -D${VER} -D${SYSV_NETWORK} ######################## definitions of file sets ########################### LDFLAGS=${LIBNEWS}/libcps.a ${SUNSPECIFICLIB} -lm ${TERMLIB} ${SYSV_NETLIB} # "Special" binary program - the binary name doesn't match the C file name due # to file name length restrictions on different UNIX systems. SPBINPROGSRC=news_sel.c SPBINPROGOBJ=news_sel.o SPBINPROGHDR=news_sel.h # "Normal" binary programs - the binary names match the C file names. BINPROGSRCS=psh.c say.c psman.c psview.c psload.c setnewshost.c ${SUNSPECIFICSRC} BINPROGOBJS=psh.o say.o psman.o psview.o psload.o setnewshost.o ${SUNSPECIFICOBJ} BINPROGHDRS=psh.h say.h psman.o psview.h psload.h ${SUNSPECIFICHRD} # Demo programs - generated from C code; the resultant binary names match the # associated C file names. DEMOPROGSRCS=roundclock.c go.c ico.c DEMOPROGOBJS=roundclock.o go.o ico.o DEMOPROGHDRS=roundclock.h go.h ico.h PROGSRCS=${SPBINPROGSRC} ${BINPROGSRCS} ${DEMOPROGSRCS} PROGOBJS=${SPBINPROGOBJ} ${BINPROGOBJS} ${DEMOPROGOBJS} PROGHDRS=${SPBINPROGHDR} ${BINPROGHDRS} ${DEMOPROGHDRS} SRCS=${PROGHDRS} ${PROGSRCS} SPBINPROG=news_selection BINPROGS=psh say psman psview psload setnewshost ${SUNSPECIFICPROG} DEMOPROGS=go roundclock ico PROGS=${BINPROGS} ${DEMOPROGS} ############################## dependencies ################################# all: ${PROGS} psterm/Makefile nterm/Makefile ${SPBINPROG} -for i in ${SUBDIRS}; do \ ( echo "Descending into directory: $$i"; \ cd $$i; make -k OPT='${OPT}' COPTS='${COPTS}' OSI='${OSI}' \ VER='${VER}' TERMLIB='${TERMLIB}' TERMFLAG='${TERMFLAG}'\ DEFAULTNEWSHOME='${DEFAULTNEWSHOME}' \ DESTDIR='${DESTDIR}' INSDIR='${INSDIR}' \ SYSV_NETWORK='${SYSV_NETWORK}' SYSV_NETLIB='${SYSV_NETLIB}' \ ); done ${PROGS}: ${LIBNEWS}/libcps.a ${PROGOBJS} cc -o $@ $@.o ${LDFLAGS} ${LIBNEWS}/libcps.a: FRC -cd ${LIBNEWS}; make -k OPT='${OPT}' COPTS='${COPTS}' OSI='${OSI}' \ VER='${VER}' TERMLIB='${TERMLIB}' \ DEFAULTNEWSHOME='${DEFAULTNEWSHOME}' \ DESTDIR='${DESTDIR}' INSDIR='${INSDIR}' \ SYSV_NETWORK='${SYSV_NETWORK}' SYSV_NETLIB='${SYSV_NETLIB}' \ SUNSPECIFICSRC='${SUNSPECIFICSRC}' \ SUNSPECIFICOBJ='${SUNSPECIFICOBJ}' \ SUNSPECIFICHDR='${SUNSPECIFICHDR}' \ SUNSPECIFICPROG='${SUNSPECIFICPROG}' \ SUNSPECIFICLIB='${SUNSPECIFICLIB}' ${VER}CPSlib ${LIBNEWS}/cps: FRC -cd ${LIBNEWS}; make -k OPT='${OPT}' COPTS='${COPTS}' OSI='${OSI}' \ VER='${VER}' TERMLIB='${TERMLIB}' \ DEFAULTNEWSHOME='${DEFAULTNEWSHOME}' \ DESTDIR='${DESTDIR}' INSDIR='${INSDIR}' \ SYSV_NETWORK='${SYSV_NETWORK}' SYSV_NETLIB='${SYSV_NETLIB}' \ SUNSPECIFICSRC='${SUNSPECIFICSRC}' \ SUNSPECIFICOBJ='${SUNSPECIFICOBJ}' \ SUNSPECIFICHDR='${SUNSPECIFICHDR}' \ SUNSPECIFICPROG='${SUNSPECIFICPROG}' \ SUNSPECIFICLIB='${SUNSPECIFICLIB}' cps say.h: say.cps ${LIBNEWS}/cps ico.h: ico.cps ${LIBNEWS}/cps go.h: go.cps ${LIBNEWS}/cps roundclock.h: roundclock.cps ${LIBNEWS}/cps psload.h: psload.cps ${LIBNEWS}/cps psview.h: psview.cps ${LIBNEWS}/cps news_sel.h: news_sel.cps ${LIBNEWS}/cps ${SPBINPROG}: ${SPBINPROGOBJ} ${LIBNEWS}/libcps.a cc ${CFLAGS} -o ${SPBINPROG} ${SPBINPROGOBJ} ${LDFLAGS} ############################## installation ################################# # SYSTEM V NOTE: # The client demo shell programs are not in this directory. On a # 4.2 system, they require no changes. However, on a System V system, # they need to be modified to run because of the lack of the csh. # # The following is an example of how to change the shell programs to # work on System V (where SHDEMOPROGS is the list of the shell demo # programs): # # -for i in ${SHDEMOPROGS}; do \ # ( echo "psh << E_O_F" > ${DEMODIR}/$$i ; \ # cat $$i >> ${DEMODIR}/$$i ; \ # echo "E_O_F" >> ${DEMODIR}/$$i \ # ); done # # install: all bininstall demoinstall bininstall: bincinstall demoinstall: democinstall bincinstall: ${BINPROGS} ${SPBINPROG} psterm/Makefile nterm/Makefile (cd ${BINDIR}; rm -f ${BINPROGS} ${SPBINPROG}) cp ${BINPROGS} ${BINDIR} cp ${SPBINPROG} ${BINDIR} -for i in ${SUBDIRS}; do \ ( echo "Descending into directory: $$i"; \ cd $$i; make -k OPT='${OPT}' COPTS='${COPTS}' OSI='${OSI}' \ VER='${VER}' TERMLIB='${TERMLIB}' TERMFLAG='${TERMFLAG}'\ DEFAULTNEWSHOME='${DEFAULTNEWSHOME}' \ DESTDIR='${DESTDIR}' INSDIR='${INSDIR}' \ SYSV_NETWORK='${SYSV_NETWORK}' SYSV_NETLIB='${SYSV_NETLIB}' \ install \ ); done democinstall: (cd ${DEMODIR}; rm -f ${DEMOPROGS}) cp ${DEMOPROGS} ${DEMODIR} clean: psterm/Makefile nterm/Makefile rm -f ${PROGS} ${SPBINPROG} *.o ${PROGHDRS} *.BAK -for i in ${SUBDIRS}; do \ ( echo "Descending into directory: $$i"; \ cd $$i; make ${MFLAGS} clean \ ); done depend: ../makedepend ${SRCS} ../makedepend ${INCLUDE} FRC: .SUFFIXES: .h .cps .cps~ .cps~.cps: ${GET} -G$*.cps $< .cps~.h: ${GET} -G$*.cps $< ${LIBNEWS}/cps $*.cps .cps.h: ${LIBNEWS}/cps $*.cps # START OF AUTOMATICALLY GENERATED DEPENDENCIES roundclock.o: roundclock.c roundclock.h go.o: go.c go.h ico.o: ico.c ico.h kbd_mode.o: kbd_mode.c psh.o: psh.c psview.o: psview.c psview.h psman.o: psman.c say.o: say.c say.h setnewshost.o: setnewshost.c news_sel.o: news_sel.h news_sel.c psload.o: psload.h psload.c