--- projects/cms/source/ihost/Makefile 2002/05/13 12:05:22 1.1 +++ projects/cms/source/ihost/Makefile 2002/05/16 17:57:30 1.5 @@ -1,18 +1,20 @@ -# $Id: Makefile,v 1.1 2002/05/13 12:05:22 tdb Exp $ +# $Id: Makefile,v 1.5 2002/05/16 17:57:30 tdb Exp $ # defines that should be set DEFS= +# libraries that should be set +LIBS= # where libukcprog can be found for compiling LIBUKCPROG = libukcprog # where libstatgrab can be found for compiling -LIBSTATGRAB = statgrab +LIBSTATGRAB = libstatgrab -CFLAGS = -O3 -Wall +#CFLAGS = -O3 -Wall +CFLAGS = -O3 -Wall -g INCLUDES = -I${LIBUKCPROG} -I${LIBSTATGRAB} -LIBS = ${LIBUKCPROG}/libukcprog.a ${LIBSTATGRAB}/libstatgrab.a \ - -lnsl -lsocket +OURLIBS = ${LIBSTATGRAB}/libstatgrab.a ${LIBUKCPROG}/libukcprog.a all: @echo "Must use one of the following targets :-" @@ -22,25 +24,25 @@ all: @echo " $(MAKE) oldlinux" ${LIBUKCPROG}/libukcprog.a: - cd ${LIBUKCPROG} && $(MAKE) libukcprog.a + cd ${LIBUKCPROG} && $(MAKE) libukcprog.a CFLAGS="${CFLAGS}" ${LIBSTATGRAB}/libstatgrab.a: - cd ${LIBSTATGRAB} && $(MAKE) libstatgrab.a DEFS="${DEFS}" + cd ${LIBSTATGRAB} && $(MAKE) libstatgrab.a DEFS="${DEFS}" CFLAGS="${CFLAGS}" ihost.o: ihost.c ${LIBUKCPROG}/ukcprog.h ${LIBSTATGRAB}/statgrab.h ${CC} ${DEFS} ${CFLAGS} -c ${INCLUDES} ihost.c ihost: ihost.o ${LIBUKCPROG}/libukcprog.a ${LIBSTATGRAB}/libstatgrab.a - ${CC} ${CFLAGS} -o ihost ihost.o ${LIBS} + ${CC} ${CFLAGS} -o ihost ihost.o ${OURLIBS} ${LIBS} solaris: - $(MAKE) ihost DEFS=-DSOLARIS + $(MAKE) ihost DEFS="-DSOLARIS" LIBS="-lnsl -lsocket -lkstat" linux: - $(MAKE) ihost DEFS=-DLINUX + $(MAKE) ihost DEFS="-DLINUX" freebsd: - $(MAKE) ihost DEFS=-DFREEBSD + $(MAKE) ihost DEFS="-DFREEBSD" LIBS="-lkvm" oldlinux: $(MAKE) ihost DEFS="-DOLDLINUX -DLINUX"