components/net-snmp/sun/sdk/demo/demo_module_9/Makefile
changeset 252 ee0fb1eabcbf
equal deleted inserted replaced
251:f527656d334f 252:ee0fb1eabcbf
       
     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_9.so
       
    19 # 
       
    20 # usage:
       
    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
       
    25 #
       
    26 
       
    27 
       
    28 ARCH=64
       
    29 LDFLAGS_64=-g -m64 -I.
       
    30 LDFLAGS_32=-g -I.
       
    31 LDFLAGS=$(LDFLAGS_$(ARCH))
       
    32 
       
    33 LDLIBS=
       
    34 
       
    35 PROG= demo_module_9.so
       
    36 SRCS= demo_module_9.c
       
    37 OBJS = $(SRCS:.c=.o)
       
    38 
       
    39 all:$(PROG)
       
    40 $(PROG): $(OBJS)
       
    41 	$(CC) $(LDFLAGS) $(LDLIBS) -G -o $@ $(OBJS)
       
    42 .c.o:
       
    43 	$(CC) $(LDFLAGS) -g  -o $@ -c $<
       
    44 
       
    45 clean:
       
    46 	rm -f *.o *.so
       
    47 
       
    48