2 # Copyright (c) 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 # Use is subject to license terms.
10 # This distribution may include materials developed by third parties. Sun,
11 # Sun Microsystems, the Sun logo and Solaris are trademarks or registered
12 # trademarks of Sun Microsystems, Inc. in the U.S. and other countries.
18 # Makefile to generate demo_module_6.so
21 # "make" : generate library for 64bit / sparc
22 # "make ARCH=32" : generate library for 32bit / sparc
23 # "make ARCH=32 MACH=x86" : generate library for 32bit / x86
24 # "make clean" : remove *.o , *.so
29 LIB64
=/usr
/lib
/sparcv9
32 OBJS1
=demo_module_6.so
33 TARGETS
=demo_module_6.so
35 #CFLAGS_64=-g -I. -Dsolaris_2 -m64
36 CFLAGS_64
=-I.
-Dsolaris_2
-m64
37 #CFLAGS_32=-g -I. -Dsolaris_2
38 CFLAGS_32
=-I.
-Dsolaris_2
39 CFLAGS
=$(CFLAGS_
$(ARCH
))
41 BUILDAGENTLIBS_64
=-R..
/lib
-L
$(LIB64
) -lnetsnmpagent
-lnetsnmpmibs
-l netsnmphelpers
-lnetsnmp
-ldl
-lkvm
-lz
-lpkcs11
-lkstat
-lelf
-lm
-ldl
-lnsl
-lsocket
-ladm
42 BUILDAGENTLIBS_32
=-R..
/lib
-L
$(LIB32
) -lnetsnmpagent
-lnetsnmpmibs
-l netsnmphelpers
-lnetsnmp
-ldl
-lkvm
-lz
-lpkcs11
-lkstat
-lelf
-lm
-ldl
-lnsl
-lsocket
-ladm
43 BUILDAGENTLIBS
=$(BUILDAGENTLIBS_
$(ARCH
))
47 # shared library flags (assumes gcc)
48 #DLFLAGS=-fPIC -shared
49 # shared library flags (assumes cc)
54 #example-demon-testTypesA32: $(OBJS1)
55 #$(CC) $(CFLAGS) -o example-demon-testTypesA32 $(OBJS1) $(BUILDAGENTLIBS)
58 rm $(OBJS1
) $(TARGETS
)
60 demo_module_6.so
: demo_module_6.o Makefile
61 $(CC
) $(CFLAGS
) -c
-o demo_module_6.o demo_module_6.c
62 $(LD
) $(DLFLAGS
) $(LIBS1
) -o demo_module_6.so demo_module_6.o