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