summaryrefslogtreecommitdiff
path: root/parallel/pvm3/patches/patch-am
blob: 629ddd640c33a8811954ef6eb5f4be707fbd2d8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
$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