`# $Id: Makefile.host,v 2.14 2012/07/24 16:21:20 ksb Exp $ # platform recipe for installus, msrc 2008 SHELL=/bin/sh PROG= installus ETC= ${DESTDIR}/usr/local/sbin DOC= ${DESTDIR}/usr/man I=/usr/include S=/usr/include/sys L=/usr/local/include P= # under HPUX11 I needed -Dbsize_t=uint64_t -Dsbsize_t=int64_t CC='ifelse(HOSTTYPE,`HPUX9',`gcc', HOSTTYPE,`HPUX10',`gcc', HOSTTYPE,`HPUX11',`gcc', `cc')` INCLUDE= DEBUG='ifelse(HOSTTYPE,`V386',`', `-O')` CDEFS= -D'HOSTTYPE` CFLAGS= ${DEBUG} ${CDEFS} ${INCLUDE} GENC= main.c ckpass.c GENH= main.h ckpass.h GEN= ${GENC} ${GENH} HDR= argvutil.h control.h glob.h machine.h sendfd.h SRC= argvutil.c control.c glob.c machine.c sendfd.c DEP= ${GENC} ${SRC} OBJ= main.o argvutil.o control.o glob.o machine.o sendfd.o ckpass.o MAN= installus.man owners.man OTHER= README INSTALL Installus.pl Owners TODO installus.m mkowner.ksh SOURCE= Makefile ${OTHER} ${MAN} ${HDR} ${SRC} all: ${PROG} ${PROG}:$P ${OBJ} ${CC} -o $@ ${CFLAGS} ${OBJ}'ifelse( HOSTTYPE,`SUN5',` -lsocket', HOSTTYPE,`DARWIN',`` -Wl,-setuid_safe,-root_safe'', HOSTTYPE,`FREEBSD',` -lcrypt', HOSTTYPE,`NETBSD',` -lcrypt', HOSTTYPE,`LINUX',` -lcrypt')` main.h: main.c main.c: ${PROG}.m mkcmd ${PROG}.m -(cmp -s prog.c main.c || (cp prog.c main.c && echo main.c updated)) -(cmp -s prog.h main.h || (cp prog.h main.h && echo main.h updated)) rm -f prog.[ch] ckpass.c ckpass.h: MACHINE_H="#include \"machine.h\"" explode -s $@ clean: FRC rm -f Makefile.bak ${PROG} ${GEN} *.o a.out core errs lint.out tags calls: ${SRC} ${HDR} ${GEN} FRC calls ${CDEFS} ${INCLUDE} ${DEP} deinstall: ${MAN} ${DOC} FRC install -R ${ETC}/${PROG} mkcat -r${DOC} -D ${MAN} depend: ${SRC} ${HDR} ${GEN} FRC maketd ${CDEFS} ${INCLUDE} ${DEP} dirs: ${ETC} distrib: FRC distrib -c ${ETC}/${PROG} HOST install: all dirs FRC install -cs -o root -m 4711 ${PROG} ${ETC}/${PROG} lint: ${SRC} ${HDR} ${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} ${GEN} ctags -t ${HDR} ${SRC} ${GEN} ${ETC}: install -dr $@ ${SOURCE}: co -q $@ FRC: # DO NOT DELETE THIS LINE - make depend DEPENDS ON IT main.o: argvutil.h control.h installus.m machine.h main.c sendfd.h argvutil.o: argvutil.c control.o: ckpass.h control.c glob.h installus.m machine.h main.h glob.o: glob.c machine.o: machine.c machine.h sendfd.o: machine.h sendfd.c sendfd.h # *** Do not add anything here - It will go away. *** 'dnl