`# $Id: Makefile.host,v 2.10 2010/12/14 18:47:25 ksb Exp $ # platform recipe for an rrd disk update (rrdisk), msrc 2008 PROG= rrdisk BIN= ${DESTDIR}/usr/local/libexec DOC= ${DESTDIR}/usr/local/man I=/usr/include S=/usr/include/sys L=/usr/include/local P= INCLUDE= DEBUG= -O CDEFS= -D'HOSTTYPE`'ifelse(HOSTTYPE,`FREEBSD',` -DGETTIMEOFDAY_HAS_ZONE')` CFLAGS= ${DEBUG} ${CDEFS} ${INCLUDE} LDFLAGS='ifelse(HOSTTYPE,SUN5,-lnsl -lsocket -lresolv)` CC='ifelse(HOSTTYPE,`HPUX9',`gcc', HOSTTYPE,`HPUX10',`gcc', HOSTTYPE,`HPUX11',`gcc', `cc')` GENC= main.c GENH= main.h GEN= ${GENC} ${GENH} rrrdupdate.m rrrdupdate.mc rrrdupdate.mi HDR= machine.h SRC= DEP= ${GENC} ${LINKC} ${SRC} OBJ= main.o MAN= rrdisk.man OTHER= README TODO INSTALL op.wrap.m4 rrd rrdisk.m dynpaths.m sudo.m SOURCE= Makefile ITO.spec ${OTHER} ${MAN} ${HDR} ${SRC} all: ${PROG} ${PROG}:$P ${OBJ} ${CC} -o $@ ${CFLAGS} ${OBJ} ${LDFLAGS} rrrdupdate.m rrrdupdate.mc rrrdupdate.mi: explode -s $@ main.h: main.c main.c: ${PROG}.m rrrdupdate.m rrrdupdate.mc rrrdupdate.mi mkcmd ${PROG}.m'ifelse(USE_SUDO,yes,`` sudo.m'')ifelse(USE_DYNPATHS,yes,`` dynpaths.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] clean: FRC rm -f Makefile.bak ${PROG} ${GEN} ${LINK} *.o a.out core errs lint.out tags calls: ${SRC} ${HDR} ${GEN} FRC calls ${CDEFS} ${INCLUDE} ${DEP} deinstall: ${MAN} ${DOC} FRC install -R ${BIN}/${PROG} mkcat -r${DOC} -D ${MAN} depend: ${SRC} ${HDR} ${GEN} ${LINK} FRC maketd ${CDEFS} ${INCLUDE} ${DEP} dirs: ${BIN} ${DOC} distrib: FRC distrib -c ${BIN}/${PROG} HOST install: all dirs FRC install -cs ${PROG} ${BIN}/${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} ${BIN} ${DOC}: install -dr $@ ${SOURCE}: co -q $@ FRC: # DO NOT DELETE THIS LINE - make depend DEPENDS ON IT main.o: main.c machine.h # *** Do not add anything here - It will go away. *** 'dnl