From 4630b03eed7682495f1d9e4b058dda647d97f084 Mon Sep 17 00:00:00 2001 From: wylie Date: Wed, 1 Apr 1998 02:33:04 +0000 Subject: [PATCH] Restructuring for greater homogeneity and support for conditional builds (and installs) of libdyninstCP and DYNINSTstart/endCode as desired/required. Parameterization of "toplevel" definitions. Incorporation of build voucher information. --- rtinst/i386-unknown-nt4.0/Makefile | 20 +++++------ rtinst/make.module.tmpl | 70 +++++++++++++++++++++----------------- rtinst/nmake.module.tmpl | 24 ++----------- 3 files changed, 49 insertions(+), 65 deletions(-) diff --git a/rtinst/i386-unknown-nt4.0/Makefile b/rtinst/i386-unknown-nt4.0/Makefile index 189ba56..2524108 100644 --- a/rtinst/i386-unknown-nt4.0/Makefile +++ b/rtinst/i386-unknown-nt4.0/Makefile @@ -1,30 +1,25 @@ # -# $Id: Makefile,v 1.4 1998/03/02 01:09:16 wylie Exp $ +# $Id: Makefile,v 1.5 1998/04/01 02:33:14 wylie Exp $ # + # Define any symbols needed to invoke configuration changes in make.config -# none +USES_PVM = true +#USES_SHM_SAMPLING = true # Include standard make configuration stuff that applies to everything # in the paradyn tree. -USES_PVM = true -#USES_SHM_SAMPLING = true - include ../../nmake.config # Now make any necessary architecture specific changes to variables: LD = link -LDFLAGS = -DLL -debug -debugtype:coff +LDFLAGS = -DLL -debug -debugtype:coff -base:0x60000000 #TARGET2 = libdyninstCP.a -DYNOBJS = DYNINSTstartCode.obj \ - DYNINSTendCode.obj - -SRCS = $(SRCS) ../src/RTfirst.c \ - ../src/RTwinnt.c +SRCS = $(SRCS) ../src/RTfirst.c ../src/RTwinnt.c OBJS = RTfirst.obj RTwinnt.obj @@ -45,8 +40,9 @@ include ../../nmake.library.tmpl # Override target to force ld to happen # $(TARGET): $(OBJS) + @$(MAKE) $(VOUCHER) $(LD) $(LDFLAGS) -EXPORT:DYNINSTinit -ENTRY:_DllMainCRTStartup@12 \ - -out:$(TARGET) $(OBJS) $(LIBS) wsock32.lib winmm.lib + -out:$(TARGET) $(VOUCHER).obj $(OBJS) $(LIBS) wsock32.lib winmm.lib #$(TARGET2): $(OBJS) RTpvmPiggy.o RTcriticalPath.o # @$(RM) $(TARGET2) diff --git a/rtinst/make.module.tmpl b/rtinst/make.module.tmpl index 2a644f1..6043faf 100644 --- a/rtinst/make.module.tmpl +++ b/rtinst/make.module.tmpl @@ -3,29 +3,35 @@ # intended to be a useful Makefile in isolation; instead, it should be # included from within an architecture-specific Makefile. # -# $Id: make.module.tmpl,v 1.14 1997/11/28 21:17:38 wylie Exp $ +# $Id: make.module.tmpl,v 1.15 1998/04/01 02:33:04 wylie Exp $ # ifndef TARGET -TARGET = libdyninstRT.o -ALT_TARGET = DYNINSTstartCode.o DYNINSTendCode.o RTpvmPiggy.o RTcriticalPath.o +ifndef USES_LIBDYNINSTRT_SO +TARGET = libdyninstRT.o +else +TARGET = libdyninstRT.so.1 +endif +ifdef INCLUDE_CP_PROFILING +TARGET2 = libdyninstCP.o +CP_OBJS = RTpvmPiggy.o RTcriticalPath.o +endif +ifdef BUILD_CODE_BLOCKS +ALT_TARGET = DYNINSTstartCode.o DYNINSTendCode.o +endif endif MODCC = $(CC) MODCFLAGS = $(CFLAGS) SRCS += ../src/RTinst.c ../src/RTend.c -SRCS2 += ../src/RTend.c - -DYNSRCS = ../src/DYNINSTstartCode.c \ - ../src/DYNINSTendCode.c ifdef USES_SHM_SAMPLING CFLAGS += -DSHM_SAMPLING endif ifdef USES_LIBDYNINSTRT_SO -all: $(TARGET3) +all: $(TARGET) $(TARGET2) else all: $(TARGET) $(TARGET2) $(ALT_TARGET) endif @@ -33,7 +39,7 @@ endif # # override standard link rule; libdyninst is not really a library or a program. # -UNCOMMON_LINK= true +UNCOMMON_LINK = true OBJS = $(patsubst %.C, %.o, $(filter %.C,$(notdir $(SRCS)))) \ $(patsubst %.c, %.o, $(filter %.c,$(notdir $(SRCS)))) \ @@ -41,41 +47,41 @@ OBJS = $(patsubst %.C, %.o, $(filter %.C,$(notdir $(SRCS)))) \ $(patsubst %.S, %.o, $(filter %.S,$(notdir $(SRCS)))) \ $(IGEN_GEN_SRCS:%.C=%.o) -ifndef USES_LIBDYNINSTRT_SO -$(TARGET): $(OBJS) $(LIBS) - $(LD) $(LDFLAGS) -o $(TARGET) $(OBJS) $(LIBS) -lgcc -endif +#ifndef USES_LIBDYNINSTRT_SO +#$(TARGET): $(OBJS) $(LIBS) +# $(LD) $(LDFLAGS) -o $(TARGET) $(OBJS) $(LIBS) -lgcc +#endif # # override standard install rule; provide a default DEST if not already set # ifndef DEST -DEST = $(TO_CORE)/../lib/$(PLATFORM) +DEST = $(TO_CORE)/$(LIBRARY_DEST) endif -UNCOMMON_INSTALL= true -ifdef USES_LIBDYNINSTRT_SO -install: $(DEST)/$(TARGET3) \ - $(DEST)/DYNINSTstartCode.o \ - $(DEST)/DYNINSTendCode.o \ - $(DEST)/RTpvmPiggy.o -else -install: $(DEST)/$(TARGET) \ - $(DEST)/DYNINSTstartCode.o \ - $(DEST)/DYNINSTendCode.o \ - $(DEST)/RTpvmPiggy.o +INSTOBJS = $(DEST)/$(TARGET) +ifdef BUILD_CODE_BLOCKS +INSTOBJS += $(DEST)/DYNINSTstartCode.o $(DEST)/DYNINSTendCode.o +endif +ifdef INCLUDE_CP_PROFILING +INSTOBJS += $(DEST)/RTpvmPiggy.o $(DEST)/$(TARGET2) endif -$(DEST)/libdyninstRT.o: libdyninstRT.o - -cp libdyninstRT.o ../../../lib/$(PLATFORM) -$(DEST)/libdyninstRT.so.1: libdyninstRT.so.1 - -cp libdyninstRT.so.1 ../../../lib/$(PLATFORM) +UNCOMMON_INSTALL = true + +install: $(INSTOBJS) + +$(DEST)/$(TARGET): $(TARGET) + -$(CP) $(TARGET) $(DEST) + +$(DEST)/$(TARGET2): $(TARGET2) + -$(CP) $(TARGET2) $(DEST) $(DEST)/RTpvmPiggy.o: RTpvmPiggy.o - -cp RTpvmPiggy.o ../../../lib/$(PLATFORM) + -$(CP) RTpvmPiggy.o $(DEST) $(DEST)/DYNINSTstartCode.o: DYNINSTstartCode.o - -cp DYNINSTstartCode.o ../../../lib/$(PLATFORM) + -$(CP) DYNINSTstartCode.o $(DEST) $(DEST)/DYNINSTendCode.o: DYNINSTendCode.o - -cp DYNINSTendCode.o ../../../lib/$(PLATFORM) + -$(CP) DYNINSTendCode.o $(DEST) diff --git a/rtinst/nmake.module.tmpl b/rtinst/nmake.module.tmpl index 0fdbba6..eb29fba 100644 --- a/rtinst/nmake.module.tmpl +++ b/rtinst/nmake.module.tmpl @@ -3,12 +3,11 @@ # intended to be a useful Makefile in isolation; instead, it should be # included from within an architecture-specific Makefile. # -# $Id: nmake.module.tmpl,v 1.2 1998/03/02 02:27:45 wylie Exp $ +# $Id: nmake.module.tmpl,v 1.3 1998/04/01 02:33:05 wylie Exp $ # !ifndef TARGET TARGET = libdyninstRT.dll -ALT_TARGET = DYNINSTstartCode.obj DYNINSTendCode.obj !endif MODCC = $(CC) @@ -16,15 +15,10 @@ MODCFLAGS = $(CFLAGS) SRCS = $(SRCS) ../src/RTend.c -DYNSRCS = ../src/DYNINSTstartCode.c \ - ../src/DYNINSTendCode.c - -DYNOBJS = DYNINSTstartCode.obj DYNINSTendCode.obj !ifdef USES_SHM_SAMPLING CFLAGS += -DSHM_SAMPLING !endif -#all: $(TARGET) $(TARGET2) $(ALT_TARGET) all: $(TARGET) # @@ -41,23 +35,11 @@ OBJS = $(OBJS) RTinst.obj RTend.obj # override standard install rule; provide a default DEST if not already set # !ifndef DEST -DEST = $(LIBRARY_DEST) +DEST = $(TO_CORE)\$(LIBRARY_DEST) !endif UNCOMMON_INSTALL= true -install: $(DEST)/$(TARGET) \ - $(DEST)/DYNINSTstartCode.obj \ - $(DEST)/DYNINSTendCode.obj -# $(DEST)/RTpvmPiggy.obj +install: $(DEST)/$(TARGET) $(DEST)/libdyninstRT.dll: libdyninstRT.dll $(CP) libdyninstRT.dll $(DEST) - -#$(DEST)/RTpvmPiggy.o: RTpvmPiggy.o -# $(CP) RTpvmPiggy.o $(DEST) - -$(DEST)/DYNINSTstartCode.obj: DYNINSTstartCode.obj - $(CP) DYNINSTstartCode.obj $(DEST) - -$(DEST)/DYNINSTendCode.obj: DYNINSTendCode.obj - $(CP) DYNINSTendCode.obj $(DEST) -- 1.8.3.1