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