`# $Id: Makefile.host,v 8.15 2012/07/25 00:02:33 ksb Exp $ # platform recipe for console server # You might change SBIN below to where you would like the console server # installed. I would not change the name, that is to many docs changes. SHELL=/bin/sh PROG= conserver SBIN= ${DESTDIR}/usr/local/sbin DOC= ${DESTDIR}/usr/local/man 'ifdef(`HAVEPTYD',`',`define(HAVEPTYD,ifelse(HOSTTYPE,`S81',`yes',`no'))')dnl `# if we have to PUCC ptyd daemon we can use it to get ptys, else use fallback.o # and change the CDEFS line below to -DHAVEPTYD=0 FALLBACK='ifelse(HAVEPTYD,`yes',`',`fallback.o')` PUCCLIB='ifelse(HAVEPTYD,`yes',`-lpucc',`')` #FALLBACK='ifelse(HAVEPTYD,`yes',`fallback.o',`')` #PUCCLIB='ifelse(HAVEPTYD,`yes',`',`-lpucc')` I=/usr/include S=/usr/include/sys L=/usr/'ifelse(HOSTTYPE,`SUN5',`local/`include'',``include'/local')` P='ifelse( HOSTTYPE,`S81',`&', HOSTTYPE,`PTX2',`&', HOSTTYPE,`PTX4',`&')` INCLUDE= DEBUG='ifelse(HOSTTYPE,`V386',`',`-O')` CDEFS=-D'HOSTTYPE` -DHAVE_PTYD='ifelse(HAVEPTYD,`no',`0',`1')`'dnl ifelse( HOSTTYPE,`PTX2',` -DDO_VIRTUAL=0', HOSTTYPE,`PTX4',` -DDO_VIRTUAL=0', HOSTTYPE,`LINUX',` -DDO_VIRTUAL=1', HOSTTYPE,`SUN5',` -DDO_VIRTUAL=1', HOSTTYPE,`IBMR2',` -D_BSD -D_BSD_INCLUDES -DUSE_TERMIO', HOSTTYPE,`EPIX',` -systype bsd43')`'dnl ifdef(`MAXGRP',`` -DMAXGRP='MAXGRP')`'dnl ifdef(`MAXMEMB',`` -DMAXMEMB='MAXMEMB')` CFLAGS= ${DEBUG} ${CDEFS} ${INCLUDE} GENh= main.h GENc= main.c GEN= ${GENh} ${GENc} HDR= cons.h \ access.h client.h consent.h daemon.h group.h machine.h master.h \ readcfg.h SRC= access.c client.c consent.c daemon.c group.c master.c \ readcfg.c fallback.c DEP= ${SRC} ${GENc} OBJ= access.o client.o consent.o daemon.o group.o main.o master.o \ readcfg.o ${FALLBACK} MAN= conserver.man OTHER= Sun-serial FAQ.html HowMany.c conserver.m conserver.sh \ stamper.sh vty.boot vty.ttys SOURCE= Makefile README TODO INSTALL ITO.spec ${OTHER} ${MAN} ${HDR} ${SRC} all: ${PROG} ${PROG}:$P ${OBJ} ${CC} -o $@ ${CFLAGS} ${OBJ} ${PUCCLIB}'ifelse( HOSTTYPE,`PTX2',` -lsocket -linet -lnsl -lseq -lsec', HOSTTYPE,`PTX4',` -lsocket -lnsl -lseq -lsec', HOSTTYPE,`IRIX5',`', HOSTTYPE,`IRIX6',`', HOSTTYPE,`386BSD',` -lcrypt', HOSTTYPE,`NETBSD',` -lcrypt', HOSTTYPE,`FREEBSD',` -lcrypt', HOSTTYPE,`DARWIN',` -Wl,-root_safe', HOSTTYPE,`LINUX',` -lcrypt', HOSTTYPE,`SUN5',` -lsocket -lnsl', HOSTTYPE,`IBMR2',` -lbsd', HOSTTYPE,`V386',` -lsocket')` main.h: main.c main.c: conserver.m mkcmd conserver.m -(cmp -s prog.c main.c || (mv prog.c main.c && echo main.c updated)) -(cmp -s prog.h main.h || (mv prog.h main.h && echo main.h updated)) rm -f prog.[ch] clean: FRC rm -f Makefile.bak ${PROG} ${GEN} prog.[ch] a.out *.o core errs lint.out tags deinstall: ${MAN} ${DOC} FRC install -R ${SBIN}/${PROG} mkcat -r${DOC} -D ${MAN} depend: ${HDR} ${SRC} ${GEN} FRC maketd ${CDEFS} ${INCLUDE} ${DEP} dirs: ${SBIN} ${LIB} distrib: FRC distrib -c ${SBIN}/${PROG} install: all dirs FRC install -c -s ${PROG} ${SBIN}/${PROG} lint: ${HDR} ${SRC} ${GEN} FRC lint -h ${CDEFS} ${INCLUDE} ${DEP} mkcat: ${MAN} ${DOC} FRC mkcat -r${DOC} ${MAN} print: source FRC lpr -J"${PROG} source" ${SOURCE} source: ${SOURCE} spotless: clean rcsclean ${SOURCE} tags: ${HDR} ${SRC} ctags -t ${HDR} ${SRC} / ${SBIN} ${LIB}: install -dr $@ ${SOURCE}: co -q $@ FRC: # DO NOT DELETE THIS LINE - maketd DEPENDS ON IT access.o: access.c access.h client.h cons.h consent.h group.h machine.h main.h \ readcfg.h client.o: client.c client.h cons.h consent.h machine.h consent.o: client.h cons.h consent.c consent.h machine.h main.h daemon.o: daemon.c machine.h group.o: access.h client.h cons.h consent.h group.c group.h machine.h main.h master.o: access.h client.h cons.h consent.h group.h machine.h main.h master.c \ master.h readcfg.h readcfg.o: access.h client.h cons.h consent.h group.h machine.h main.h \ master.h readcfg.c readcfg.h fallback.o: cons.h fallback.c machine.h main.o: access.h client.h cons.h consent.h daemon.h group.h machine.h main.c \ master.h readcfg.h # *** Do not add anything here - It will go away. *** 'dnl