pkgsrc/parallel/pvm3/patches/patch-am
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

76 lines
2.5 KiB
Text

$NetBSD: patch-am,v 1.6 2004/08/27 06:29:10 jlam Exp $
--- xep/Makefile.aimk.orig Fri Aug 29 14:17:48 1997
+++ xep/Makefile.aimk
@@ -14,18 +14,17 @@ PVMIDIR = $(PVMDIR)/include
PVMLDIR = $(PVMDIR)/lib/$(PVM_ARCH)
PVMLIB = pvm3
LIBPREFIX = lib
-PVMLIBDEP = $(PVMLDIR)/$(LIBPREFIX)$(PVMLIB).a
+PVMLIBDEP = $(PVMLDIR)/$(LIBPREFIX)$(PVMLIB).la
SDIR = $(PVMDIR)/xep
BDIR = $(PVMDIR)/bin
XDIR = $(BDIR)/$(PVM_ARCH)
#CFLOPTS = -O
CFLOPTS = -g
-CFLAGS = $(CFLOPTS) -I$(PVMIDIR) -L$(PVMLDIR) $(ARCHCFLAGS)
+CFLAGS = $(CFLOPTS) -I$(PVMIDIR) $(ARCHCFLAGS)
LIBS = -l$(PVMLIB) $(ARCHLIB) $(OS2XEPLIBS)
-XLIBS = -lXaw -lXmu -lXext -lXt -lX11
-XCFLAGS = -I/usr/local/X11R5/include -I/usr/local/X11/include \
- -L/usr/local/X11R5/lib -L/usr/local/X11/lib
+XLIBS = -L${X11BASE}/lib ${COMPILER_RPATH_FLAG}$(X11BASE)/lib -lXaw -lXmu -lXext -lXt -lX11
+XCFLAGS = -I${X11BASE}/include
HEADERS = $(SDIR)/hostc.h $(SDIR)/imp.h $(SDIR)/myalloc.h \
$(PVMIDIR)/pvm3.h $(PVMDIR)/src/bfunc.h
@@ -38,31 +37,38 @@ $(XDIR):
- mkdir $(BDIR)
- mkdir $(XDIR)
+LTCC= $(LIBTOOL) --mode=compile $(CC)
+LTCC_LINK= $(LIBTOOL) --mode=link $(CC) ${PVM_STATIC} -L$(PVMLDIR)
+
mmain$(EXESFX): $(SDIR)/mmain.c $(XDIR) $(PVMLIBDEP)
- $(CC) $(CFLAGS) -o $@ $(SDIR)/mmain.c $(LIBS)
- mv $@ $(XDIR)
+ $(LTCC_LINK) $(CFLAGS) -o $@ $(SDIR)/mmain.c $(LIBS)
+ cp $@ $(XDIR)
mtile$(EXESFX): $(SDIR)/mtile.c $(XDIR) $(PVMLIBDEP)
- $(CC) $(CFLAGS) -o $@ $(SDIR)/mtile.c $(LIBS) -lm
- mv $@ $(XDIR)
+ $(LTCC_LINK) $(CFLAGS) -o $@ $(SDIR)/mtile.c $(LIBS) -lm
+ ${MKDIR} $(XDIR)/.libs
+ -cp .libs/$@ $(XDIR)/.libs
+ cp $@ $(XDIR)
xep$(EXESFX): xep.o hostc.o calc.o imp.o $(XDIR) $(PVMLIBDEP)
- $(CC) $(XCFLAGS) $(CFLAGS) -o $@ xep.o calc.o imp.o hostc.o \
+ $(LTCC_LINK) $(XCFLAGS) $(CFLAGS) -o $@ xep.lo calc.lo imp.lo hostc.lo \
$(XLIBS) $(LIBS) -lm
- mv $@ $(XDIR)
+ ${MKDIR} $(XDIR)/.libs
+ -cp .libs/$@ $(XDIR)/.libs
+ cp $@ $(XDIR)
clean:
rm -f mmain$(EXESFX) mtile$(EXESFX) xep$(EXESFX) *.o
xep.o: $(SDIR)/xep.c $(HEADERS)
- $(CC) $(XCFLAGS) $(CFLAGS) -c $(SDIR)/xep.c
+ $(LTCC) $(XCFLAGS) $(CFLAGS) -c $(SDIR)/xep.c
imp.o: $(SDIR)/imp.c $(HEADERS)
- $(CC) $(XCFLAGS) $(CFLAGS) -c $(SDIR)/imp.c
+ $(LTCC) $(XCFLAGS) $(CFLAGS) -c $(SDIR)/imp.c
calc.o: $(SDIR)/calc.c $(HEADERS)
- $(CC) $(XCFLAGS) $(CFLAGS) -c $(SDIR)/calc.c
+ $(LTCC) $(XCFLAGS) $(CFLAGS) -c $(SDIR)/calc.c
hostc.o: $(SDIR)/hostc.c $(HEADERS)
- $(CC) $(XCFLAGS) $(CFLAGS) -c $(SDIR)/hostc.c
+ $(LTCC) $(XCFLAGS) $(CFLAGS) -c $(SDIR)/hostc.c