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_1.so
252N/A#
252N/A# usage:
252N/A# setenv CC /usr/bin/cc (or correct path)
252N/A# "make" : generate library for 64bit
252N/A# "make ARCH=32" : generate library for 32bit
252N/A# "make clean" : remove *.o , *.so
252N/A#
252N/A
252N/AARCH=64
252N/ALDFLAGS_64=-g -m64 -I.
252N/ALDFLAGS_32=-g -I.
252N/ALDFLAGS=$(LDFLAGS_$(ARCH))
252N/A
252N/ALDLIBS=
252N/A
252N/APROG= demo_module_1.so
252N/ASRCS= demo_module_1.c
252N/AOBJS = $(SRCS:.c=.o)
252N/A
252N/Aall:$(PROG)
252N/A$(PROG): $(OBJS)
252N/A $(CC) $(LDFLAGS) $(LDLIBS) -G -o $@ $(OBJS)
252N/A.c.o:
252N/A @if test "$(CC)" = "" ; then \
252N/A echo "Environment variable CC must be set with compiler path" ; \
252N/A exit 1 ; \
252N/A fi
252N/A $(CC) $(LDFLAGS) -g -o $@ -c $<
252N/A
252N/Aclean:
252N/A rm -f demo_module_1.o demo_module_1.so
252N/A
252N/A
252N/A