-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.config
106 lines (82 loc) · 2.03 KB
/
Makefile.config
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#######################################################################
#
# General Options
#
## Operation System
OS = LINUX
#OS = SOLARIS
#OS = QNX
#OS = FREEBSD
#OS = AIX
#OS = IRIX
#OS = WIN32
## MPI library
MPI_LIBRARY = NULLMPI
#MPI_LIBRARY = MPICH2
#MPI_LIBRARY = OPENMPI
#MPI_LIBRARY = MPIPRO
#MPI_LIBRARY = DEINOMPI
## UthLib
#UTHLIB = UTH_PTH
ifeq ($(UTHLIB), UTH_PTH)
UTHLIBDIR = $(BASEDIR)/uth_pth
else
UTHLIBDIR = $(BASEDIR)/uth
endif
## Default Compiler (GCC) and Options
#CC = mpicc
#F77 = mpif77
CC = gcc
F77 = g77
COPTS = -Wall -g -ggdb # -m32 # -O3
FOPTS = -fugly-logint # -fno-second-underscore # -m32
#######################################################################
#
# Platform (OS) Specific Options
#
#######################################################################
#
# MPI Library
#
ifeq ($(MPI_LIBRARY), NULLMPI)
MPI_INSTALLDIR = $(BASEDIR)/nullmpi
MPI_LIB =
MPI_INCDIR = -I$(BASEDIR)/nullmpi/include
endif
#######################################################################
#
# LWRPC Library
#
LWRPC_FLAGS =
LWRPC_FLAGS += -DLWRPC_STATS
#LWRPC_FLAGS += -DREGISTER_INTERNODE_FUNCTIONS
#LWRPC_FLAGS += -DBLOCK_IDLE_THREADS
#LWRPC_FLAGS += -DNONBLOCKING
#######################################################################
#
# Compilation Options and Rules
#
DEFINES = -D_REENTRANT -D_THREAD_SAFE -D_XOPEN_SOURCE=600 # -DDBG=1
CCOPTS = $(COPTS) -D$(OS) $(LWRPC_FLAGS)
FCOPTS = $(FOPTS) -D$(OS) $(LWRPC_FLAGS)
INCDIR = -I${BASEDIR}/include -I${UTHLIBDIR}
LIBDIR = -L${BASEDIR}/src -L${UTHLIBDIR}
LIBS = -llwrpc -luth -lpthread -lm
NTHMAINCLIB = -llwrpc_main
NTHMAINFLIB = -llwrpc_fmain
SLIBS = ${BASEDIR}/src/liblwrpc.a ${UTHLIBDIR}/libuth.a
CFLAGS = $(CCOPTS) $(DEFINES) $(INCDIR) $(MPI_INCDIR)
FFLAGS = $(FCOPTS) $(DEFINES) $(INCDIR) $(MPI_INCDIR)
LDFLAGS = $(LIBDIR) $(LIBS) # -m32
MAINLDFLAGS = $(LIBDIR) $(NTHMAINCLIB) $(LIBS)
.f.o:
$(F77) $(FFLAGS) -c $<
.c.o:
$(CC) $(CFLAGS) -c $<
AR = ar
RM = rm -f
#RM = del
################################################################################
#
#
#