net-snmp sun mods install: make sure destdirs exist
[unleashed-userland.git] / components / sysutils / net-snmp / sun / agent / modules / healthMonitor / Makefile
blobdc51b6ccf58db53868afe12a284bd383057ee24b
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
18 # usage:
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
27 MARCH=$(ARCH)
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))
33 CFLAGS_32=-fPIC -DPIC
34 CFLAGS_sparcv9=-fPIC -DPIC
35 CFLAGS_amd64=--fPIC -DPIC
36 CFLAGS=$(CFLAGS_$(MARCH))
38 LDLIBS_sparcv9= -L/usr/lib/sparcv9 -l kstat
39 LDLIBS_32= -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
47 OBJS = $(SRCS:.c=.o)
49 all: $(PROG)
50 $(PROG): $(OBJS)
51 $(CC) $(LDFLAGS) $(LDLIBS) -G -o $@ $(OBJS)
52 .c.o:
53 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ -c $<
54 clean:
55 rm -f *.o *.so
57 install:
58 mkdir -p $(ROOT)/etc/net-snmp/snmp
59 /usr/bin/cp health_monitor.conf $(ROOT)/etc/net-snmp/snmp ; \