2 |
|
|
3 |
|
# defines that should be set |
4 |
|
DEFS= |
5 |
+ |
# libraries that should be set |
6 |
+ |
LIBS= |
7 |
|
|
8 |
|
# where libukcprog can be found for compiling |
9 |
|
LIBUKCPROG = libukcprog |
10 |
|
# where libstatgrab can be found for compiling |
11 |
< |
LIBSTATGRAB = statgrab |
11 |
> |
LIBSTATGRAB = libstatgrab |
12 |
|
|
13 |
|
CFLAGS = -O3 -Wall |
14 |
|
|
15 |
|
INCLUDES = -I${LIBUKCPROG} -I${LIBSTATGRAB} |
16 |
< |
LIBS = ${LIBUKCPROG}/libukcprog.a ${LIBSTATGRAB}/libstatgrab.a \ |
15 |
< |
-lnsl -lsocket |
16 |
> |
OURLIBS = ${LIBSTATGRAB}/libstatgrab.a ${LIBUKCPROG}/libukcprog.a |
17 |
|
|
18 |
|
all: |
19 |
|
@echo "Must use one of the following targets :-" |
32 |
|
${CC} ${DEFS} ${CFLAGS} -c ${INCLUDES} ihost.c |
33 |
|
|
34 |
|
ihost: ihost.o ${LIBUKCPROG}/libukcprog.a ${LIBSTATGRAB}/libstatgrab.a |
35 |
< |
${CC} ${CFLAGS} -o ihost ihost.o ${LIBS} |
35 |
> |
${CC} ${CFLAGS} -o ihost ihost.o ${OURLIBS} ${LIBS} |
36 |
|
|
37 |
|
solaris: |
38 |
< |
$(MAKE) ihost DEFS=-DSOLARIS |
38 |
> |
$(MAKE) ihost DEFS="-DSOLARIS" LIBS="-lnsl -lsocket -lkstat" |
39 |
|
|
40 |
|
linux: |
41 |
< |
$(MAKE) ihost DEFS=-DLINUX |
41 |
> |
$(MAKE) ihost DEFS="-DLINUX" |
42 |
|
|
43 |
|
freebsd: |
44 |
< |
$(MAKE) ihost DEFS=-DFREEBSD |
44 |
> |
$(MAKE) ihost DEFS="-DFREEBSD" |
45 |
|
|
46 |
|
oldlinux: |
47 |
|
$(MAKE) ihost DEFS="-DOLDLINUX -DLINUX" |