1AIMK(1PVM) PVM Version 3.4 AIMK(1PVM)
2
3
4
6 aimk - Portable make wrapper script
7
9 aimk [ -here ] [ make arguments ]
10
11
13 aimk is a wrapper program for make, used to portably select options to
14 build PVM and PVM applications on various machines. Each port of PVM
15 is assigned an architecture name. The name is used both during compi‐
16 lation (to conditionally switch in code) and at runtime (to select an
17 executable or host).
18
19 aimk uses the value of environment variable $PVM_ARCH if it is set,
20 otherwise it calls $PVM_ROOT/pvmgetarch to determine the architecture
21 name. pvmgetarch is a script that sniffs at various parts of the sys‐
22 tem to determine the correct architecture name. It is updated as new
23 PVM ports are defined, and can be augmented locally.
24
25 aimk determines the machine architecture and execs make, passing it the
26 architecture and a configuration file along with arguments supplied to
27 aimk. It runs make in a subdirectory to prevent executables from
28 becoming intermixed and to permit overlapping compiles. A different
29 makefile can be placed in each subdirectory or a single makefile, Make‐
30 file.aimk, can be shared between architectures. Per-architecture defi‐
31 nitions from the $PVM_ROOT/conf directory are appended to the common
32 makefile. aimk calls make is called in one of three ways, depending on
33 what makefiles are present:
34
35
36 i. If $PVM_ARCH/Makefile or $PVM_ARCH/makefile exists, change direc‐
37 tory to $PVM_ARCH and exec make there:
38
39 (cd $PVM_ARCH ; make PVM_ARCH=$PVM_ARCH < aimk args >)
40
41
42 ii. Else if Makefile.aimk exists, create $PVM_ARCH directory if it
43 doesn't exist, then:
44
45 (cd $PVM_ARCH ; \
46 make -f $PVM_ROOT/conf/$PVM_ARCH.def \
47 -f ../Makefile.aimk PVM_ARCH=$PVM_ARCH < aimk args >)
48
49
50 iii. Else just exec make in current directory:
51
52 make PVM_ARCH=$PVM_ARCH < aimk args >
53
54
55 If aimk succeeds in calling make, the exit status is that of make, oth‐
56 erwise it is 1.
57
58
60 -here Forces aimk to run make in the current directory, e.g. converts
61 case i. to case iii.
62
63
65 The following Makefile.aimk file builds and installs hello, creating
66 the PVM binary directory if it doesn't exist. It can be run concur‐
67 rently on machines of different types, sharing the same source direc‐
68 tory.
69
70 LDIR = -L$(PVM_ROOT)/lib/$(PVM_ARCH)
71 PVMLIB = -lpvm3
72 SDIR = ..
73 BDIR = $(HOME)/pvm3/bin
74 XDIR = $(BDIR)/$(PVM_ARCH)
75 CFLAGS = -g -I$(PVM_ROOT)/include
76 LIBS = $(LDIR) $(PVMLIB) $(ARCHLIB)
77
78 $(XDIR):
79 - mkdir $(BDIR) $(XDIR)
80
81 hello: $(SDIR)/hello.c $(XDIR)
82 $(CC) $(CFLAGS) -o $@ $(SDIR)/$@.c $(LIBS)
83 mv $@ $(XDIR)
84
85
87 $PVM_ROOT Root path of PVM installation.
88 $PVM_ARCH PVM architecture name for machine.
89
90
92 $PVM_ROOT/lib/aimk The aimk program
93 $PVM_ROOT/conf/$PVM_ARCH.def Arch config file
94
95
97 pvm_intro(1PVM)
98
99
100
101 02 May, 1994 AIMK(1PVM)