1 |
tdb |
1.2 |
# $Id: Makefile,v 1.1 2002/05/13 12:05:22 tdb Exp $ |
2 |
tdb |
1.1 |
|
3 |
|
|
# defines that should be set |
4 |
|
|
DEFS= |
5 |
tdb |
1.2 |
# libraries that should be set |
6 |
|
|
LIBS= |
7 |
tdb |
1.1 |
|
8 |
|
|
# where libukcprog can be found for compiling |
9 |
|
|
LIBUKCPROG = libukcprog |
10 |
|
|
# where libstatgrab can be found for compiling |
11 |
|
|
LIBSTATGRAB = statgrab |
12 |
|
|
|
13 |
|
|
CFLAGS = -O3 -Wall |
14 |
|
|
|
15 |
|
|
INCLUDES = -I${LIBUKCPROG} -I${LIBSTATGRAB} |
16 |
tdb |
1.2 |
OURLIBS = ${LIBUKCPROG}/libukcprog.a ${LIBSTATGRAB}/libstatgrab.a |
17 |
tdb |
1.1 |
|
18 |
|
|
all: |
19 |
|
|
@echo "Must use one of the following targets :-" |
20 |
|
|
@echo " $(MAKE) solaris" |
21 |
|
|
@echo " $(MAKE) linux" |
22 |
|
|
@echo " $(MAKE) freebsd" |
23 |
|
|
@echo " $(MAKE) oldlinux" |
24 |
|
|
|
25 |
|
|
${LIBUKCPROG}/libukcprog.a: |
26 |
|
|
cd ${LIBUKCPROG} && $(MAKE) libukcprog.a |
27 |
|
|
|
28 |
|
|
${LIBSTATGRAB}/libstatgrab.a: |
29 |
|
|
cd ${LIBSTATGRAB} && $(MAKE) libstatgrab.a DEFS="${DEFS}" |
30 |
|
|
|
31 |
|
|
ihost.o: ihost.c ${LIBUKCPROG}/ukcprog.h ${LIBSTATGRAB}/statgrab.h |
32 |
|
|
${CC} ${DEFS} ${CFLAGS} -c ${INCLUDES} ihost.c |
33 |
|
|
|
34 |
|
|
ihost: ihost.o ${LIBUKCPROG}/libukcprog.a ${LIBSTATGRAB}/libstatgrab.a |
35 |
tdb |
1.2 |
${CC} ${CFLAGS} -o ihost ihost.o ${OURLIBS} ${LIBS} |
36 |
tdb |
1.1 |
|
37 |
|
|
solaris: |
38 |
tdb |
1.2 |
$(MAKE) ihost DEFS="-DSOLARIS" LIBS="-lnsl -lsocket -lkstat" |
39 |
tdb |
1.1 |
|
40 |
|
|
linux: |
41 |
tdb |
1.2 |
$(MAKE) ihost DEFS="-DLINUX" |
42 |
tdb |
1.1 |
|
43 |
|
|
freebsd: |
44 |
tdb |
1.2 |
$(MAKE) ihost DEFS="-DFREEBSD" |
45 |
tdb |
1.1 |
|
46 |
|
|
oldlinux: |
47 |
|
|
$(MAKE) ihost DEFS="-DOLDLINUX -DLINUX" |
48 |
|
|
|
49 |
|
|
clean: |
50 |
|
|
rm -f ihost ihost.o |
51 |
|
|
cd ${LIBUKCPROG} && $(MAKE) clean |
52 |
|
|
cd ${LIBSTATGRAB} && $(MAKE) clean |