source: gpfs_3.1_ker2.6.20/lpp/mmfs/samples/perf/makefile @ 195

Last change on this file since 195 was 16, checked in by rock, 17 years ago
  • Property svn:executable set to *
File size: 1.3 KB
Line 
1# Makefile for gpfsperf.  Compiles one version of the source for both
2# combinations of with/without MPI.
3
4INCL = -I/usr/lpp/mmfs/include
5LIBS = -lpthread -lrt -lgpfs
6
7CFLAGS = -O -DGPFS_LINUX
8CC = cc
9MPCC = mpicc
10MPLIBS = -lmpich
11
12PROGS = gpfsperf
13OBJECTS = irreg.o gpfsperf.o
14
15all: $(PROGS) $(MPIPROGS)
16
17clean:
18  rm -f $(PROGS) $(MPIPROGS) $(OBJECTS) $(MPIOBJECTS)
19
20irreg.o: irreg.h irreg.c
21  $(CC) -c $(CFLAGS) $(OTHERINCL) $(INCL) irreg.c
22
23
24# Single node versions of gpfsperf.
25gpfsperf.o: irreg.h gpfsperf.c
26  $(CC) -c $(CFLAGS) $(OTHERINCL) $(INCL) gpfsperf.c -o $@
27
28gpfsperf: irreg.o gpfsperf.o
29  $(CC) $(CFLAGS) gpfsperf.o irreg.o $(OTHERLIB) $(LIBS) -o $@
30
31
32# Multi-node versions of gpfsperf.  Requires MPI to build or run.
33gpfsperf-mpi.o: irreg.h gpfsperf.c
34  @if which $(MPCC) > /dev/null 2>&1; then \
35          cmd="$(MPCC) -c $(CFLAGS) $(OTHERINCL) $(INCL) -DMULTI_NODE gpfsperf.c -o $@" ; \
36          echo "$$cmd" ; \
37          $$cmd ; \
38        else \
39          echo "MPI compiler ($(MPCC)) not found; cannot build $@"; \
40        fi
41
42gpfsperf-mpi: irreg.o gpfsperf-mpi.o
43  @if which $(MPCC) > /dev/null 2>&1; then \
44          cmd="$(MPCC) gpfsperf-mpi.o irreg.o $(CFLAGS) $(OTHERPOELIB) $(MPLIBS) $(LIBS) -o $@" ; \
45          echo "$$cmd" ; \
46          $$cmd ; \
47        else \
48          echo "MPI compiler ($(MPCC)) not found; cannot build $@"; \
49        fi
Note: See TracBrowser for help on using the repository browser.