Fix problem building RT library on Solaris 10 with debug info
[dyninst.git] / dyninstAPI_RT / sparc-sun-solaris2.9 / Makefile
1 #
2 # $Id: Makefile,v 1.14 2008/02/20 08:31:08 jaw Exp $
3 #
4
5 # Define any symbols needed to invoke configuration changes in make.config
6
7 # none
8
9 # Include standard make configuration stuff that applies to everything
10 # in the paradyn tree.
11
12 include ../../make.config 
13
14 # Now make any necessary architecture specific changes to variables:
15
16 NATIVE_CC = cc
17 ifneq (,$(findstring WorkShop,$(shell $(NATIVE_CC) -V 2>&1)))
18 USES_NATIVE_CC = true
19 endif
20 ifneq (,$(findstring Sun C,$(shell $(NATIVE_CC) -V 2>&1)))
21 USES_NATIVE_CC = true
22 endif
23
24 # if we want to produce a shared object...
25
26 CFLAGS          += -I. -I../.. 
27 ifdef USES_NATIVE_CC
28 CC              = $(NATIVE_CC) 
29 LD              = $(NATIVE_CC)
30 # OVERRIDE CFLAGS (we need to strip -O2)
31 CFLAGS          = $(IFLAGS) $(UNIFIED_DEF) $(COMMON_WARNINGS)
32 CFLAGS          += -Kpic -D_NATIVESO_  -xarch=v8plus 
33 LDFLAGS         += -ldl  -lsocket -dy -G -z text -z initarray=libdyninstAPI_RT_init
34 ASFLAGS         += -K PIC
35 else
36 CC              = $(GCC)
37 LD              = $(GCC)
38 CFLAGS          += -fpic
39 LDFLAGS         = -ldl   -lsocket -shared -nostdlib -lgcc -z initarray=libdyninstAPI_RT_init
40 #ccw 19 nov 2001
41 endif
42
43 #CFLAGS += -DDEBUG_PRINT_RT      # enable debug/trace messages from library
44
45 SRCS            += ../src/RTposix.c \
46                    ../src/RTsolaris.c \
47                    ../src/RTheap.c \
48                    ../src/RTheap-solaris.c \
49                    ../src/RTheap-svr4.c \
50                         ../src/RTthread.c \
51                         ../src/RTthread-index.c \
52                         ../src/RTthread-sparc-asm.S
53 #                       ../src/RTmutatedBinary.c \
54 #                       ../src/RTmutatedBinary_ELF.c \
55
56
57 # Include the module-specific Makefile, which defines everything about
58 # the module that is common across architectures.
59
60 include ../make.module.tmpl
61
62 # Include the "standard program template".  This defines all the
63 # common targets like "clean", "install", etc.
64
65 include ../../make.library.tmpl
66
67
68 #       $(CC) $(CPPFLAGS) $(CFLAGS) -c -o RTthread-sparc-asm.o ../src/RTthread-sparc-asm.S
69
70 RTthread-sparc-asm.o: ../src/RTthread-sparc-asm.S
71         $(CC) -fpic -c -o RTthread-sparc-asm.o ../src/RTthread-sparc-asm.S