2 # Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
4 # U.S. Government Rights - Commercial software. Government users are subject
5 # to the Sun Microsystems, Inc. standard license agreement and applicable
6 # provisions of the FAR and its supplements.
8 # This distribution may include materials developed by third parties. Sun,
9 # Sun Microsystems, the Sun logo and Solaris are trademarks or registered
10 # trademarks of Sun Microsystems, Inc. in the U.S. and other countries.
16 # Makefile to generate libhealthMonitor.so
19 # "make" : generate library for 64bit / sparc
20 # "make ARCH=32" : generate library for 32bit / sparc
21 # "make ARCH=32 MACH=x86" : generate library for 32bit / x86
22 # "make ARCH=amd64" : generate 64bit AMD64 libraries
23 # "make clean" : remove *.o , *.so
28 LDFLAGS_sparcv9
=-m64
-I
$(ROOT
)$(CFGPREFIX
)/include -I.
29 LDFLAGS_32
=-I
$(ROOT
)$(CFGPREFIX
)/include -I.
30 LDFLAGS_amd64
=-m64
-I
$(ROOT
)$(CFGPREFIX
)/include -I.
31 LDFLAGS
=$(LDFLAGS_
$(MARCH
))
34 CFLAGS_sparcv9
=-fPIC
-DPIC
35 CFLAGS_amd64
=--fPIC
-DPIC
36 CFLAGS
=$(CFLAGS_
$(MARCH
))
38 LDLIBS_sparcv9
= -L
/usr
/lib
/sparcv9
-l kstat
40 LDLIBS_amd64
= -L
/usr
/lib
/amd64
-lkstat
41 LDLIBS
=$(LDLIBS_
$(MARCH
))
44 TARGET
= libhealthMonitor.so
45 PROG
= libhealthMonitor.so
46 SRCS
= dsr.c kr_iostat.c kr_memory.c kr_nfsstat.c kr_vmstat.c healthMonitor.c
51 $(CC
) $(LDFLAGS
) $(LDLIBS
) -G
-o
$@
$(OBJS
)
53 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o
$@
-c
$<
58 mkdir
-p
$(ROOT
)/etc
/net-snmp
/snmp
59 /usr
/bin
/cp health_monitor.conf
$(ROOT
)/etc
/net-snmp
/snmp
; \