2 # Common makefile template for rtinst library. This file is not
3 # intended to be a useful Makefile in isolation; instead, it should be
4 # included from within an architecture-specific Makefile.
6 # $Id: make.module.tmpl,v 1.15 1998/04/01 02:33:04 wylie Exp $
10 ifndef USES_LIBDYNINSTRT_SO
11 TARGET = libdyninstRT.o
13 TARGET = libdyninstRT.so.1
15 ifdef INCLUDE_CP_PROFILING
16 TARGET2 = libdyninstCP.o
17 CP_OBJS = RTpvmPiggy.o RTcriticalPath.o
19 ifdef BUILD_CODE_BLOCKS
20 ALT_TARGET = DYNINSTstartCode.o DYNINSTendCode.o
27 SRCS += ../src/RTinst.c ../src/RTend.c
29 ifdef USES_SHM_SAMPLING
30 CFLAGS += -DSHM_SAMPLING
33 ifdef USES_LIBDYNINSTRT_SO
34 all: $(TARGET) $(TARGET2)
36 all: $(TARGET) $(TARGET2) $(ALT_TARGET)
40 # override standard link rule; libdyninst is not really a library or a program.
44 OBJS = $(patsubst %.C, %.o, $(filter %.C,$(notdir $(SRCS)))) \
45 $(patsubst %.c, %.o, $(filter %.c,$(notdir $(SRCS)))) \
46 $(patsubst %.s, %.o, $(filter %.s,$(notdir $(SRCS)))) \
47 $(patsubst %.S, %.o, $(filter %.S,$(notdir $(SRCS)))) \
48 $(IGEN_GEN_SRCS:%.C=%.o)
50 #ifndef USES_LIBDYNINSTRT_SO
51 #$(TARGET): $(OBJS) $(LIBS)
52 # $(LD) $(LDFLAGS) -o $(TARGET) $(OBJS) $(LIBS) -lgcc
56 # override standard install rule; provide a default DEST if not already set
59 DEST = $(TO_CORE)/$(LIBRARY_DEST)
62 INSTOBJS = $(DEST)/$(TARGET)
63 ifdef BUILD_CODE_BLOCKS
64 INSTOBJS += $(DEST)/DYNINSTstartCode.o $(DEST)/DYNINSTendCode.o
66 ifdef INCLUDE_CP_PROFILING
67 INSTOBJS += $(DEST)/RTpvmPiggy.o $(DEST)/$(TARGET2)
70 UNCOMMON_INSTALL = true
74 $(DEST)/$(TARGET): $(TARGET)
75 -$(CP) $(TARGET) $(DEST)
77 $(DEST)/$(TARGET2): $(TARGET2)
78 -$(CP) $(TARGET2) $(DEST)
80 $(DEST)/RTpvmPiggy.o: RTpvmPiggy.o
81 -$(CP) RTpvmPiggy.o $(DEST)
83 $(DEST)/DYNINSTstartCode.o: DYNINSTstartCode.o
84 -$(CP) DYNINSTstartCode.o $(DEST)
86 $(DEST)/DYNINSTendCode.o: DYNINSTendCode.o
87 -$(CP) DYNINSTendCode.o $(DEST)