1 |
tdb |
1.7 |
# $Id: Makefile,v 1.6 2002/05/14 15:11:14 tdb Exp $ |
2 |
tdb |
1.1 |
|
3 |
|
|
DEFS = |
4 |
|
|
|
5 |
tdb |
1.6 |
LIBUKCPROG = ../libukcprog |
6 |
|
|
|
7 |
|
|
CFLAGS = -g -I${LIBUKCPROG} |
8 |
tdb |
1.1 |
|
9 |
|
|
CCFLAGS = ${CFLAGS} ${ARCH_CFLAGS} ${MORE_CFLAGS} |
10 |
|
|
|
11 |
|
|
CCLINE = ${CC} ${DEFS} ${CCFLAGS} -c |
12 |
|
|
|
13 |
|
|
MAKE_LIBRARY = ar cq |
14 |
|
|
|
15 |
tdb |
1.5 |
OBJS = load_stat.o disk_stat.o os_info.o user_stats.o cpu_stats.o |
16 |
tdb |
1.1 |
|
17 |
|
|
HDRS = statgrab.h |
18 |
|
|
|
19 |
|
|
LIB = libstatgrab.a |
20 |
|
|
|
21 |
tdb |
1.2 |
all: |
22 |
|
|
@echo "Must use one of the following targets :-" |
23 |
|
|
@echo " $(MAKE) solaris" |
24 |
|
|
@echo " $(MAKE) linux" |
25 |
|
|
@echo " $(MAKE) freebsd" |
26 |
|
|
@echo " $(MAKE) oldlinux" |
27 |
tdb |
1.1 |
|
28 |
|
|
${LIB}: ${OBJS} |
29 |
|
|
${MAKE_LIBRARY} $@ ${OBJS} |
30 |
|
|
|
31 |
tdb |
1.2 |
solaris: |
32 |
|
|
$(MAKE) ${LIB} DEFS=-DSOLARIS |
33 |
|
|
|
34 |
|
|
linux: |
35 |
|
|
$(MAKE) ${LIB} DEFS=-DLINUX |
36 |
|
|
|
37 |
|
|
freebsd: |
38 |
|
|
$(MAKE) ${LIB} DEFS=-DFREEBSD |
39 |
|
|
|
40 |
|
|
oldlinux: |
41 |
|
|
$(MAKE) ${LIB} DEFS="-DOLDLINUX -DLINUX" |
42 |
|
|
|
43 |
tdb |
1.1 |
clean: |
44 |
|
|
rm -f ${OBJS} ${LIB} |
45 |
|
|
|
46 |
|
|
load_stat.o: load_stat.c ${HDRS} |
47 |
|
|
${CCLINE} load_stat.c |
48 |
|
|
disk_stat.o: disk_stat.c ${HDRS} |
49 |
|
|
${CCLINE} disk_stat.c |
50 |
tdb |
1.3 |
os_info.o: os_info.c ${HDRS} |
51 |
|
|
${CCLINE} os_info.c |
52 |
tdb |
1.4 |
user_stats.o: user_stats.c ${HDRS} |
53 |
|
|
${CCLINE} user_stats.c |
54 |
tdb |
1.5 |
cpu_stats.o: cpu_stats.c ${HDRS} |
55 |
|
|
${CCLINE} cpu_stats.c |
56 |
tdb |
1.7 |
process_stats.o: process_stats.c ${HDRS} |
57 |
|
|
${CCLINE} process_stats.c |
58 |
tdb |
1.5 |
|