ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/ihost/Makefile
Revision: 1.4
Committed: Thu May 16 15:38:12 2002 UTC (22 years, 7 months ago) by tdb
Branch: MAIN
Changes since 1.3: +2 -2 lines
Log Message:
Added libs for FreeBSD.

File Contents

# User Rev Content
1 tdb 1.4 # $Id: Makefile,v 1.3 2002/05/16 15:23:40 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 tdb 1.3 LIBSTATGRAB = libstatgrab
12 tdb 1.1
13     CFLAGS = -O3 -Wall
14    
15     INCLUDES = -I${LIBUKCPROG} -I${LIBSTATGRAB}
16 tdb 1.3 OURLIBS = ${LIBSTATGRAB}/libstatgrab.a ${LIBUKCPROG}/libukcprog.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.4 $(MAKE) ihost DEFS="-DFREEBSD" LIBS="-lkvm"
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