|
1 # |
|
2 # Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. |
|
3 # |
|
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. |
|
7 # |
|
8 # Use is subject to license terms. |
|
9 # |
|
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. |
|
13 # |
|
14 # |
|
15 |
|
16 # |
|
17 # |
|
18 # Makefile to generate demo_module_11.so |
|
19 # |
|
20 # usage: |
|
21 # To point to a particular compiler, set CC. |
|
22 # Example: setenv CC /usr/dist/share/forte_dev/bin/cc |
|
23 # "make" : generate library for 64bit |
|
24 # "make ARCH=32" : generate library for 32bit |
|
25 # "make clean" : remove *.o , *.so |
|
26 # |
|
27 |
|
28 ARCH=64 |
|
29 CFLAGS_64=-g -m64 -I/usr/include/sma_snmp -I. |
|
30 CFLAGS_32=-g -I/usr/include/sma_snmp -I. |
|
31 CFLAGS=$(CFLAGS_$(ARCH)) |
|
32 |
|
33 LDLIBS_64= -B dynamic -L /usr/lib/sparcv9 -l entity |
|
34 LDLIBS_32= -B dynamic -l entity |
|
35 LDLIBS=$(LDLIBS_$(ARCH)) |
|
36 |
|
37 PROG= demo_module_11.so |
|
38 SRCS= MyTable.c |
|
39 OBJS = $(SRCS:.c=.o) |
|
40 |
|
41 all:$(PROG) |
|
42 $(PROG): $(OBJS) |
|
43 $(CC) $(CFLAGS) $(LDLIBS) -G -o $@ $(OBJS) |
|
44 .c.o: |
|
45 $(CC) $(CFLAGS) -g -o $@ -c $< |
|
46 |
|
47 clean: |
|
48 rm -f MyTable.o demo_module_11.so |
|
49 |
|
50 |