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