# Generic rule to make an installed executable: ${BIN}/SO%: SO% cp -vup SO$* ${BIN} # "make progs" makes all executables: progs: ${LIBHOFILES} ${LIBFILE} for p in ${PROGS} ; do \ ${MAKE} PROG=$$p prog-single ; \ done ####################################################################### # Rules for recursive "make" -- must define ${PROG} PROG := PROG.IS.UNDEFINED ifneq "${PROG}" "PROG.IS.UNDEFINED" # "make PROG=foo prog-single" builds and exports the executable "foo": prog-single: installlib ${BIN}/${PROG} # Rule to build the executable and copy it to the export dir: ${BIN}/${PROG}: ${PROG} cp -vup ${PROG} ${BIN} # Rule to build the executable: ${PROG}: ${PROG}.o ${LIB}/${LIBFILE} ${OTHERLIBS} /usr/bin/gcc ${CFLAGS} ${IFLAGS} -o ${PROG} ${PROG}.o ${LIB}/${LIBFILE} ${OTHERLIBS} \ -lm endif # ######################################################################