File: Makefile

package info (click to toggle)
netpipe 2.3-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 160 kB
  • ctags: 109
  • sloc: ansic: 979; makefile: 113
file content (68 lines) | stat: -rw-r--r-- 1,658 bytes parent folder | download
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
#
# Makefile for NetPIPE
# $Id: Makefile,v 1.7 1998/09/24 16:03:49 ghelmer Exp $
#

# Default C compiler: must be an ANSI C compiler
CC         = cc
# File names for the main source files
DRIV_SRC   = netpipe.c
DRIV_OBJ   = netpipe.o
INCLUDES   = netpipe.h
# Default target is just TCP
TARGETS    = NPtcp
# If you have TCP, MPI and PVM
#TARGETS    = NPtcp NPmpi NPpvm
CFLAGS	   = -O
# Adjust these for MPI (only used if you have MPI)
MPI_HOME   = /home/mpich
MPI_ARCH   = IRIX
MPI_DEVICE = ch_p4
# Adjust these for PVM (only used if you have PVM)
PVM_HOME   = /home/pvm3
PVM_ARCH   = SUN4SOL2
# Any extra libraries needed
EXTRA_LIBS = 
#EXTRA_LIBS = -lgcc

targets:    $(TARGETS)

#
# This section of the Makefile is for compiling the binaries
#

TCP:	NPtcp

NPtcp:	NPtcp.o TCP.o
	$(CC) $(CFLAGS) NPtcp.o TCP.o  -o NPtcp $(EXTRA_LIBS)

NPtcp.o:	$(DRIV_SRC) $(INCLUDES)
	$(CC) $(CFLAGS) -DTCP -c -o NPtcp.o $(DRIV_SRC)

TCP.o:	TCP.c TCP.h $(INCLUDES)
	$(CC) $(CFLAGS) -DTCP -c TCP.c

MPI:	NPmpi

NPmpi:	NPmpi.o MPI.o
	$(CC) $(CFLAGS) NPmpi.o MPI.o -o NPmpi  -L $(MPI_LIB) $(MPI_LLIB) $(EXTRA_LIBS)

NPmpi.o:	$(DRIV_SRC) $(INCLUDES) 
	$(CC) $(CFLAGS) -DMPI -I$(MPI_INC) -I$(MPI_INC1) -c -o NPmpi.o $(DRIV_SRC)

MPI.o:	MPI.c MPI.h $(INCLUDES)
	$(CC) $(CFLAGS) -DMPI -I$(MPI_INC) -I$(MPI_INC1) -c MPI.c

PVM:	NPpvm

NPpvm:	NPpvm.o PVM.o
	$(CC) $(CFLAGS) NPpvm.o PVM.o -o NPpvm  -L$(PVM_HOME)/lib/$(PVM_ARCH)/ -lpvm3 $(EXTRA_LIBS)

NPpvm.o:	$(DRIV_SRC) $(INCLUDES)
	$(CC) $(CFLAGS) -DPVM -I$(PVM_HOME)/include -c -o NPpvm.o $(DRIV_SRC)

PVM.o:	PVM.c PVM.h $(INCLUDES)
	$(CC) $(CFLAGS) -DPVM -I$(PVM_HOME)/include -c PVM.c

clean:
	rm -f $(TARGETS) *.o core a.out