1 | ## Makefile.in for MP-PVM example programs. |
---|
2 | # |
---|
3 | # Set PVM_ROOT to the path where PVM includes and libraries are installed. |
---|
4 | # Set PVM_ARCH to your architecture type (SUN4, HP9K, RS6K, SGI, etc.) |
---|
5 | # Set ARCHLIB to any special libs needed on PVM_ARCH (-lrpc, -lsocket, etc.) |
---|
6 | # otherwise leave ARCHLIB blank |
---|
7 | # |
---|
8 | # PVM_ARCH and ARCHLIB are set for you if you use "$PVM_ROOT/lib/aimk" |
---|
9 | # instead of "make". |
---|
10 | # |
---|
11 | # aimk also creates a $PVM_ARCH directory below this one and will cd to it |
---|
12 | # before invoking make - this allows building in parallel on different arches. |
---|
13 | # |
---|
14 | |
---|
15 | srcdir = @srcdir@ |
---|
16 | VPATH = @srcdir@ |
---|
17 | top_srcdir = @top_srcdir@ |
---|
18 | prefix = @prefix@ |
---|
19 | exec_prefix = @exec_prefix@ |
---|
20 | libdir = @libdir@ |
---|
21 | includedir = @includedir@ |
---|
22 | #libdir = $(exec_prefix)/lib |
---|
23 | #includedir = $(prefix)/include |
---|
24 | |
---|
25 | CC = @CC@ |
---|
26 | SHELL = /bin/sh |
---|
27 | CFLAGS = @CFLAGS@ |
---|
28 | |
---|
29 | INCLUDES = -I$(PVM_ROOT)/include -I$(includedir) |
---|
30 | LIBS = @LIBS@ -lpvm3 -lMP -lgmp |
---|
31 | GLIBS = -lgpvm3 |
---|
32 | LIBDIR = -L$(libdir) -L$(PVM_ROOT)/lib/$(PVM_ARCH) |
---|
33 | |
---|
34 | CLEAN = @CLEAN@ |
---|
35 | |
---|
36 | COMPILE = $(CC) $(DEFS) $(LIBDIR) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) |
---|
37 | |
---|
38 | OBJCOMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) |
---|
39 | |
---|
40 | .SUFFIXES: |
---|
41 | .SUFFIXES: .c .o |
---|
42 | |
---|
43 | .c.o: |
---|
44 | ${CC} $(INCLUDES) ${CFLAGS} ${DEFS} -c $< |
---|
45 | |
---|
46 | BDIR = $(HOME)/pvm3/bin |
---|
47 | XDIR = $(BDIR)/$(PVM_ARCH) |
---|
48 | |
---|
49 | ## |
---|
50 | ## file sets |
---|
51 | ## |
---|
52 | |
---|
53 | SRCS = master.c slave.c get-vec.c put-vec.c put-tree.c get-tree.c \ |
---|
54 | mcast-put-tree.c mcast-get-tree.c util.c mp_pvm.c node.c \ |
---|
55 | pvm_imp_getdata.c |
---|
56 | |
---|
57 | DISTFILES = ${SRCS} Makefile.in README node.h label.h |
---|
58 | |
---|
59 | default: master slave get-vec put-vec put-tree get-tree \ |
---|
60 | mcast-put-tree mcast-get-tree |
---|
61 | |
---|
62 | all: c-all |
---|
63 | |
---|
64 | install: c-all |
---|
65 | |
---|
66 | c-all: master slave get-vec put-vec put-tree get-tree \ |
---|
67 | mcast-put-tree mcast-get-tree |
---|
68 | |
---|
69 | clean: |
---|
70 | rm -f *.o master slave get-vec put-vec |
---|
71 | |
---|
72 | distclean: clean |
---|
73 | rm -f Makefile |
---|
74 | |
---|
75 | dist: |
---|
76 | rm -f mp-pvm.tar |
---|
77 | tar -cf mp-pvm.tar ${DISTFILES} |
---|
78 | gzip -9 mp-pvm.tar |
---|
79 | |
---|
80 | get-vec: get-vec.c |
---|
81 | ${COMPILE} $@.c -o $@ $(LIBS) |
---|
82 | mv get-vec $(XDIR) |
---|
83 | |
---|
84 | put-vec: put-vec.c |
---|
85 | ${COMPILE} $@.c -o $@ $(LIBS) |
---|
86 | mv put-vec $(XDIR) |
---|
87 | |
---|
88 | master: master.c util.o |
---|
89 | ${COMPILE} util.o $@.c -o $@ $(LIBS) |
---|
90 | mv master $(XDIR) |
---|
91 | |
---|
92 | put-tree: put-tree.c |
---|
93 | ${COMPILE} $@.c -o $@ $(LIBS) |
---|
94 | mv put-tree $(XDIR) |
---|
95 | |
---|
96 | get-tree: get-tree.c util.o |
---|
97 | ${COMPILE} util.o $@.c -o $@ $(LIBS) |
---|
98 | mv get-tree $(XDIR) |
---|
99 | |
---|
100 | mcast-put-tree: mcast-put-tree.c |
---|
101 | ${COMPILE} $@.c -o $@ $(LIBS) |
---|
102 | mv mcast-put-tree $(XDIR) |
---|
103 | |
---|
104 | mcast-get-tree: mcast-get-tree.c util.o |
---|
105 | ${COMPILE} util.o $@.c -o $@ $(LIBS) |
---|
106 | mv mcast-get-tree $(XDIR) |
---|
107 | |
---|
108 | slave: slave.c |
---|
109 | ${COMPILE} $@.c -o $@ $(LIBS) |
---|
110 | mv slave $(XDIR) |
---|
111 | |
---|
112 | util.o : |
---|
113 | ${OBJCOMPILE} $(INCLUDES) util.c |
---|
114 | |
---|