252N/A#
252N/A# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
252N/A#
252N/A# U.S. Government Rights - Commercial software. Government users are subject
252N/A# to the Sun Microsystems, Inc. standard license agreement and applicable
252N/A# provisions of the FAR and its supplements.
252N/A#
252N/A# Use is subject to license terms.
252N/A#
252N/A# This distribution may include materials developed by third parties. Sun,
252N/A# Sun Microsystems, the Sun logo and Solaris are trademarks or registered
252N/A# trademarks of Sun Microsystems, Inc. in the U.S. and other countries.
252N/A#
252N/A#
252N/A
252N/A#
252N/A#
252N/A# Makefile to generate demo_module_6.so
252N/A#
252N/A# usage:
252N/A# "make" : generate library for 64bit / sparc
252N/A# "make ARCH=32" : generate library for 32bit / sparc
252N/A# "make ARCH=32 MACH=x86" : generate library for 32bit / x86
252N/A# "make clean" : remove *.o , *.so
252N/A#
252N/A
252N/AARCH=64
252N/ALIB32=/usr/lib
252N/ALIB64=/usr/lib/sparcv9
252N/ALD=/usr/ccs/bin/ld
252N/A
252N/AOBJS1=demo_module_6.so
252N/ATARGETS=demo_module_6.so
252N/A
252N/A#CFLAGS_64=-g -I. -Dsolaris_2 -m64
252N/ACFLAGS_64=-I. -Dsolaris_2 -m64
252N/A#CFLAGS_32=-g -I. -Dsolaris_2
252N/ACFLAGS_32=-I. -Dsolaris_2
252N/ACFLAGS=$(CFLAGS_$(ARCH))
252N/A
252N/ABUILDAGENTLIBS_64=-R../lib -L$(LIB64) -lnetsnmpagent -lnetsnmpmibs -l netsnmphelpers -lnetsnmp -ldl -lkvm -lz -lpkcs11 -lkstat -lelf -lm -ldl -lnsl -lsocket -ladm
252N/ABUILDAGENTLIBS_32=-R../lib -L$(LIB32) -lnetsnmpagent -lnetsnmpmibs -l netsnmphelpers -lnetsnmp -ldl -lkvm -lz -lpkcs11 -lkstat -lelf -lm -ldl -lnsl -lsocket -ladm
252N/ABUILDAGENTLIBS=$(BUILDAGENTLIBS_$(ARCH))
252N/A
252N/A
252N/A
252N/A# shared library flags (assumes gcc)
252N/A#DLFLAGS=-fPIC -shared
252N/A# shared library flags (assumes cc)
252N/ADLFLAGS=-dy -G
252N/A
252N/Aall: $(TARGETS)
252N/A
252N/A#example-demon-testTypesA32: $(OBJS1)
252N/A#$(CC) $(CFLAGS) -o example-demon-testTypesA32 $(OBJS1) $(BUILDAGENTLIBS)
252N/A
252N/Aclean:
252N/A rm $(OBJS1) $(TARGETS)
252N/A
252N/Ademo_module_6.so: demo_module_6.o Makefile
252N/A $(CC) $(CFLAGS) -c -o demo_module_6.o demo_module_6.c
252N/A $(LD) $(DLFLAGS) $(LIBS1) -o demo_module_6.so demo_module_6.o
252N/A