pkgsrc/parallel/pvm3/patches/patch-bu
jlam ca70938428 Replace RPATH_FLAG with LINKER_RPATH_FLAG and COMPILER_RPATH_FLAG,
which are the full option names used to set rpath directives for the
linker and the compiler, respectively.  In places were we are invoking
the linker, use "${LINKER_RPATH_FLAG} <path>", where the space is
inserted in case the flag is a word, e.g. -rpath.  The default values
of *_RPATH_FLAG are set by the compiler/*.mk files, depending on the
compiler that you use.  They may be overridden on a ${OPSYS}-specific
basis by setting _OPSYS_LINKER_RPATH_FLAG and _OPSYS_COMPILER_RPATH_FLAG,
respectively.  Garbage-collect _OPSYS_RPATH_NAME and _COMPILER_LD_FLAG.
2004-08-27 06:29:06 +00:00

274 lines
9.3 KiB
Text

$NetBSD: patch-bu,v 1.2 2004/08/27 06:29:10 jlam Exp $
--- examples/Makefile.aimk.orig Wed Feb 16 21:49:35 2000
+++ examples/Makefile.aimk Thu Mar 25 03:43:25 2004
@@ -85,5 +85,5 @@
inherit2$(EXESFX) inherit3$(EXESFX)
-MBPROGS = taskf.o task0$(EXESFX) task1$(EXESFX) \
+MBPROGS = taskf.lo task0$(EXESFX) task1$(EXESFX) \
task_end$(EXESFX) rme$(EXESFX) \
lmbi$(EXESFX) gmbi$(EXESFX)
@@ -108,172 +108,177 @@
- mkdir $(XDIR)
+LTCC= ${LIBTOOL} --mode=compile ${CC}
+LTCC_LINK= ${LIBTOOL} --mode=link ${CC} ${PVM_STATIC} ${COMPILER_RPATH_FLAG}${PVM_DIR}/lib/${PVM_ARCH}
+LTFORT= ${LIBTOOL} --mode=compile ${FC}
+LTFORT_LINK= ${LIBTOOL} --mode=link ${FC} ${PVM_STATIC} ${COMPILER_RPATH_FLAG}${PVM_DIR}/lib/${PVM_ARCH}
+
hello$(EXESFX): $(SDIR)/hello.c $(XDIR)
- $(CC) $(CFLAGS) -o $@ $(SDIR)/hello.c $(LDFLAGS) $(LIBS)
- mv $@ $(XDIR)
+ $(LTCC_LINK) $(CFLAGS) -o $@ $(SDIR)/hello.c $(LDFLAGS) $(LIBS)
+ cp $@ $(XDIR)
helloh: $(SDIR)/hello.c $(XDIR)
- $(CC) $(CFLAGS) -o $@ $(SDIR)/hello.c $(LDFLAGS) $(HLIBS)
- mv $@ $(XDIR)
+ $(LTCC_LINK) $(CFLAGS) -o $@ $(SDIR)/hello.c $(LDFLAGS) $(HLIBS)
+ cp $@ $(XDIR)
hello_other$(EXESFX): $(SDIR)/hello_other.c $(XDIR)
- $(CC) $(CFLAGS) -o $@ $(SDIR)/hello_other.c $(LDFLAGS) $(LIBS)
- mv $@ $(XDIR)
+ $(LTCC_LINK) $(CFLAGS) -o $@ $(SDIR)/hello_other.c $(LDFLAGS) $(LIBS)
+ cp $@ $(XDIR)
dbwtest$(EXESFX): $(SDIR)/bwtest.c $(XDIR)
- $(CC) $(CFLAGS) -DENCODE=PvmDataDefault -DPACK -o $@ \
+ $(LTCC_LINK) $(CFLAGS) -DENCODE=PvmDataDefault -DPACK -o $@ \
$(SDIR)/bwtest.c $(LDFLAGS) $(GLIBS) $(LIBS)
- mv $@ $(XDIR)
+ cp $@ $(XDIR)
ibwtest$(EXESFX): $(SDIR)/bwtest.c $(XDIR)
- $(CC) $(CFLAGS) -DPACK -DENCODE=PvmDataInPlace -o $@ \
+ $(LTCC_LINK) $(CFLAGS) -DPACK -DENCODE=PvmDataInPlace -o $@ \
$(SDIR)/bwtest.c $(LDFLAGS) $(GLIBS) $(LIBS)
- mv $@ $(XDIR)
+ cp $@ $(XDIR)
pbwtest$(EXESFX): $(SDIR)/bwtest.c $(XDIR)
- $(CC) $(CFLAGS) -o $@ $(SDIR)/bwtest.c $(LDFLAGS) $(GLIBS) $(LIBS)
- mv $@ $(XDIR)
+ $(LTCC_LINK) $(CFLAGS) -o $@ $(SDIR)/bwtest.c $(LDFLAGS) $(GLIBS) $(LIBS)
+ cp $@ $(XDIR)
rbwtest$(EXESFX): $(SDIR)/bwtest.c $(XDIR)
- $(CC) $(CFLAGS) -DPACK -DENCODE=PvmDataRaw -o $@ \
+ $(LTCC_LINK) $(CFLAGS) -DPACK -DENCODE=PvmDataRaw -o $@ \
$(SDIR)/bwtest.c $(LDFLAGS) $(GLIBS) $(LIBS)
- mv $@ $(XDIR)
+ cp $@ $(XDIR)
timing$(EXESFX): $(SDIR)/timing.c $(XDIR)
- $(CC) $(CFLAGS) -o $@ $(SDIR)/timing.c $(LDFLAGS) $(LIBS)
- mv $@ $(XDIR)
+ $(LTCC_LINK) $(CFLAGS) -o $@ $(SDIR)/timing.c $(LDFLAGS) $(LIBS)
+ cp $@ $(XDIR)
timingh: $(SDIR)/timing.c $(XDIR)
- $(CC) $(CFLAGS) -o $@ $(SDIR)/timing.c $(LDFLAGS) $(HLIBS)
- mv $@ $(XDIR)
+ $(LTCC_LINK) $(CFLAGS) -o $@ $(SDIR)/timing.c $(LDFLAGS) $(HLIBS)
+ cp $@ $(XDIR)
timing_slave$(EXESFX): $(SDIR)/timing_slave.c $(XDIR)
- $(CC) $(CFLAGS) -o $@ $(SDIR)/timing_slave.c $(LDFLAGS) $(LIBS)
- mv $@ $(XDIR)
+ $(LTCC_LINK) $(CFLAGS) -o $@ $(SDIR)/timing_slave.c $(LDFLAGS) $(LIBS)
+ cp $@ $(XDIR)
spmd$(EXESFX): $(SDIR)/spmd.c $(XDIR)
- $(CC) $(CFLAGS) -o $@ $(SDIR)/spmd.c $(LDFLAGS) $(LIBS)
- mv $@ $(XDIR)
+ $(LTCC_LINK) $(CFLAGS) -o $@ $(SDIR)/spmd.c $(LDFLAGS) $(LIBS)
+ cp $@ $(XDIR)
fspmd$(EXESFX): $(SDIR)/spmd.f $(XDIR)
- $(FORT) $(FFLAGS) -o $@ $(SDIR)/spmd.f $(LDFLAGS) $(FLIBS) $(LIBS)
- mv $@ $(XDIR)
+ $(LTFORT_LINK) $(FFLAGS) -o $@ $(SDIR)/spmd.f $(LDFLAGS) $(FLIBS) $(GLIBS) $(LIBS)
+ cp $@ $(XDIR)
master1$(EXESFX): $(SDIR)/master1.c $(XDIR)
- $(CC) $(CFLAGS) -o $@ $(SDIR)/master1.c $(LDFLAGS) $(LIBS)
- mv $@ $(XDIR)
+ $(LTCC_LINK) $(CFLAGS) -o $@ $(SDIR)/master1.c $(LDFLAGS) $(LIBS)
+ cp $@ $(XDIR)
master1h: $(SDIR)/master1.c $(XDIR)
- $(CC) $(CFLAGS) -o $@ $(SDIR)/master1.c $(LDFLAGS) $(HLIBS)
- mv $@ $(XDIR)
+ $(LTCC_LINK) $(CFLAGS) -o $@ $(SDIR)/master1.c $(LDFLAGS) $(HLIBS)
+ cp $@ $(XDIR)
slave1$(EXESFX): $(SDIR)/slave1.c $(XDIR)
- $(CC) $(CFLAGS) -o $@ $(SDIR)/slave1.c $(LDFLAGS) $(LIBS)
- mv $@ $(XDIR)
+ $(LTCC_LINK) $(CFLAGS) -o $@ $(SDIR)/slave1.c $(LDFLAGS) $(LIBS)
+ cp $@ $(XDIR)
fmaster1$(EXESFX): $(SDIR)/master1.f $(XDIR)
- $(FORT) $(FFLAGS) -o $@ $(SDIR)/master1.f \
- $(LDFLAGS) $(FLIBS) $(LIBS)
- mv $@ $(XDIR)
+ $(LTFORT_LINK) $(FFLAGS) -o $@ $(SDIR)/master1.f \
+ $(LDFLAGS) $(FLIBS) $(GLIBS) $(LIBS)
+ cp $@ $(XDIR)
fmaster1h: $(SDIR)/master1.f $(XDIR)
- $(FORT) $(FFLAGS) -o $@ $(SDIR)/master1.f \
+ $(LTFORT_LINK) $(FFLAGS) -o $@ $(SDIR)/master1.f \
$(LDFLAGS) $(FLIBS) $(HLIBS)
- mv $@ $(XDIR)
+ cp $@ $(XDIR)
fslave1$(EXESFX): $(SDIR)/slave1.f $(XDIR)
- $(FORT) $(FFLAGS) -o $@ $(SDIR)/slave1.f $(LDFLAGS) $(FLIBS) $(LIBS)
- mv $@ $(XDIR)
+ $(LTFORT_LINK) $(FFLAGS) -o $@ $(SDIR)/slave1.f $(LDFLAGS) $(FLIBS) $(GLIBS) $(LIBS)
+ cp $@ $(XDIR)
hitc$(EXESFX): $(SDIR)/hitc.f $(XDIR)
- $(FORT) $(FFLAGS) -o $@ $(SDIR)/hitc.f $(LDFLAGS) $(FLIBS) $(LIBS)
- mv $@ $(XDIR)
+ $(LTFORT_LINK) $(FFLAGS) -o $@ $(SDIR)/hitc.f $(LDFLAGS) $(FLIBS) $(GLIBS) $(LIBS)
+ cp $@ $(XDIR)
hitch: $(SDIR)/hitc.f $(XDIR)
- $(FORT) $(FFLAGS) -o $@ $(SDIR)/hitc.f $(LDFLAGS) $(FLIBS) $(HLIBS)
- mv $@ $(XDIR)
+ $(LTFORT_LINK) $(FFLAGS) -o $@ $(SDIR)/hitc.f $(LDFLAGS) $(FLIBS) $(HLIBS)
+ cp $@ $(XDIR)
hitc_slave$(EXESFX): $(SDIR)/hitc_slave.f $(XDIR)
- $(FORT) $(FFLAGS) -o $@ $(SDIR)/hitc_slave.f \
- $(LDFLAGS) $(FLIBS) $(LIBS)
- mv $@ $(XDIR)
+ $(LTFORT_LINK) $(FFLAGS) -o $@ $(SDIR)/hitc_slave.f \
+ $(LDFLAGS) $(FLIBS) $(GLIBS) $(LIBS)
+ cp $@ $(XDIR)
gexample$(EXESFX): $(SDIR)/gexample.c $(XDIR)
- $(CC) $(CFLAGS) -o $@ $(SDIR)/gexample.c $(LDFLAGS) $(GLIBS) $(LIBS)
- mv $@ $(XDIR)
+ $(LTCC_LINK) $(CFLAGS) -o $@ $(SDIR)/gexample.c $(LDFLAGS) $(GLIBS) $(LIBS)
+ cp $@ $(XDIR)
gexampleh: $(SDIR)/gexample.c $(XDIR)
- $(CC) $(CFLAGS) -o $@ $(SDIR)/gexample.c \
+ $(LTCC_LINK) $(CFLAGS) -o $@ $(SDIR)/gexample.c \
$(LDFLAGS) $(GLIBS) $(HLIBS)
- mv $@ $(XDIR)
+ cp $@ $(XDIR)
fgexample$(EXESFX): $(SDIR)/gexample.f $(XDIR)
- $(FORT) $(FFLAGS) -o $@ $(SDIR)/gexample.f \
+ $(LTFORT_LINK) $(FFLAGS) -o $@ $(SDIR)/gexample.f \
$(LDFLAGS) $(FLIBS) $(GLIBS) $(LIBS)
- mv $@ $(XDIR)
+ cp $@ $(XDIR)
mbox$(EXESFX): $(SDIR)/mbox.c $(XDIR)
- $(CC) $(CFLAGS) -o $@ $(SDIR)/mbox.c $(LDFLAGS) $(LIBS)
- mv $@ $(XDIR)
+ $(LTCC_LINK) $(CFLAGS) -o $@ $(SDIR)/mbox.c $(LDFLAGS) $(LIBS)
+ cp $@ $(XDIR)
inherita$(EXESFX): $(SDIR)/inherita.c $(XDIR)
- $(CC) $(CFLAGS) -o $@ $(SDIR)/inherita.c $(LDFLAGS) $(LIBS)
- mv $@ $(XDIR)
+ $(LTCC_LINK) $(CFLAGS) -o $@ $(SDIR)/inherita.c $(LDFLAGS) $(LIBS)
+ cp $@ $(XDIR)
inheritb$(EXESFX): $(SDIR)/inheritb.c $(XDIR)
- $(CC) $(CFLAGS) -o $@ $(SDIR)/inheritb.c $(LDFLAGS) $(LIBS)
- mv $@ $(XDIR)
+ $(LTCC_LINK) $(CFLAGS) -o $@ $(SDIR)/inheritb.c $(LDFLAGS) $(LIBS)
+ cp $@ $(XDIR)
inherit1$(EXESFX): $(SDIR)/inherit1.c $(XDIR)
- $(CC) $(CFLAGS) -o $@ $(SDIR)/inherit1.c $(LDFLAGS) $(LIBS)
- mv $@ $(XDIR)
+ $(LTCC_LINK) $(CFLAGS) -o $@ $(SDIR)/inherit1.c $(LDFLAGS) $(LIBS)
+ cp $@ $(XDIR)
inherit2$(EXESFX): $(SDIR)/inherit2.c $(XDIR)
- $(CC) $(CFLAGS) -o $@ $(SDIR)/inherit2.c $(LDFLAGS) $(LIBS)
- mv $@ $(XDIR)
+ $(LTCC_LINK) $(CFLAGS) -o $@ $(SDIR)/inherit2.c $(LDFLAGS) $(LIBS)
+ cp $@ $(XDIR)
inherit3$(EXESFX): $(SDIR)/inherit3.c $(XDIR)
- $(CC) $(CFLAGS) -o $@ $(SDIR)/inherit3.c $(LDFLAGS) $(LIBS)
- mv $@ $(XDIR)
+ $(LTCC_LINK) $(CFLAGS) -o $@ $(SDIR)/inherit3.c $(LDFLAGS) $(LIBS)
+ cp $@ $(XDIR)
-taskf.o: $(SDIR)/taskf.c
- $(CC) $(CFLAGS) -c $(SDIR)/taskf.c
+taskf.lo: $(SDIR)/taskf.c
+ $(LTCC) $(CFLAGS) -c $(SDIR)/taskf.c
task0$(EXESFX): $(SDIR)/task0.c $(XDIR)
- $(CC) $(CFLAGS) -o $@ $(SDIR)/task0.c taskf.o $(LDFLAGS) $(LIBS)
- mv $@ $(XDIR)
+ $(LTCC_LINK) $(CFLAGS) -o $@ $(SDIR)/task0.c taskf.lo $(LDFLAGS) $(LIBS)
+ cp $@ $(XDIR)
task1$(EXESFX): $(SDIR)/task1.c $(XDIR)
- $(CC) $(CFLAGS) -o $@ $(SDIR)/task1.c taskf.o $(LDFLAGS) $(LIBS)
- mv $@ $(XDIR)
+ $(LTCC_LINK) $(CFLAGS) -o $@ $(SDIR)/task1.c taskf.lo $(LDFLAGS) $(LIBS)
+ cp $@ $(XDIR)
task_end$(EXESFX): $(SDIR)/task_end.c $(XDIR)
- $(CC) $(CFLAGS) -o $@ $(SDIR)/task_end.c taskf.o $(LDFLAGS) $(LIBS)
- mv $@ $(XDIR)
+ $(LTCC_LINK) $(CFLAGS) -o $@ $(SDIR)/task_end.c taskf.lo $(LDFLAGS) $(LIBS)
+ cp $@ $(XDIR)
rme$(EXESFX): $(SDIR)/rme.c $(XDIR)
- $(CC) $(CFLAGS) -o $@ $(SDIR)/rme.c taskf.o $(LDFLAGS) $(LIBS)
- mv $@ $(XDIR)
+ $(LTCC_LINK) $(CFLAGS) -o $@ $(SDIR)/rme.c taskf.lo $(LDFLAGS) $(LIBS)
+ cp $@ $(XDIR)
lmbi$(EXESFX): $(SDIR)/lmbi.c $(XDIR)
- $(CC) $(CFLAGS) -o $@ $(SDIR)/lmbi.c taskf.o $(LDFLAGS) $(HLIBS)
- mv $@ $(XDIR)
+ $(LTCC_LINK) $(CFLAGS) -o $@ $(SDIR)/lmbi.c taskf.lo $(LDFLAGS) $(HLIBS)
+ cp $@ $(XDIR)
-gmbi$(EXESFX): $(SDIR)/gmbi.c taskf.o $(XDIR)
- $(CC) $(CFLAGS) -o $@ $(SDIR)/gmbi.c taskf.o $(LDFLAGS) $(LIBS)
- mv $@ $(XDIR)
-
-gmbih: $(SDIR)/gmbi.c taskf.o $(XDIR)
- $(CC) $(CFLAGS) -o $@ $(SDIR)/gmbi.c taskf.o $(LDFLAGS) $(HLIBS)
- mv $@ $(XDIR)
+gmbi$(EXESFX): $(SDIR)/gmbi.c taskf.lo $(XDIR)
+ $(LTCC_LINK) $(CFLAGS) -o $@ $(SDIR)/gmbi.c taskf.lo $(LDFLAGS) $(LIBS)
+ cp $@ $(XDIR)
+
+gmbih: $(SDIR)/gmbi.c taskf.lo $(XDIR)
+ $(LTCC_LINK) $(CFLAGS) -o $@ $(SDIR)/gmbi.c taskf.lo $(LDFLAGS) $(HLIBS)
+ cp $@ $(XDIR)
mhf_server$(EXESFX): $(SDIR)/mhf_server.c $(XDIR)
- $(CC) $(CFLAGS) -o $@ $(SDIR)/mhf_server.c $(LDFLAGS) $(LIBS)
- mv $@ $(XDIR)
+ $(LTCC_LINK) $(CFLAGS) -o $@ $(SDIR)/mhf_server.c $(LDFLAGS) $(LIBS)
+ cp $@ $(XDIR)
mhf_tickle$(EXESFX): $(SDIR)/mhf_tickle.c $(XDIR)
- $(CC) $(CFLAGS) -o $@ $(SDIR)/mhf_tickle.c $(LDFLAGS) $(LIBS)
- mv $@ $(XDIR)
+ $(LTCC_LINK) $(CFLAGS) -o $@ $(SDIR)/mhf_tickle.c $(LDFLAGS) $(LIBS)
+ cp $@ $(XDIR)