-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
executable file
·25 lines (22 loc) · 813 Bytes
/
makefile
File metadata and controls
executable file
·25 lines (22 loc) · 813 Bytes
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
CXX = g++
MPICXX = mpicxx
CUDAXX = nvcc
CUDAFLAGS = -x cu -arch=sm_20 -dc -lineinfo
CUDALFLAGS = -arch=sm_20
CXXFLAGS = -std=c++0x -g -Wall
#--compiler-options -Wall
LINKFLAGS = -std=c++0x -g
LIBDIRS = -L/usr/local/lib
LDFLAGS = -lnetcdf -lhdf5_hl -lhdf5 -lcurl -lm -lz -ldl
#LDFLAGS = -lpnetcdf -lnetcdf -lhdf5_hl -lhdf5 -lm -lz -ldl -lmpi -lmpicxx
INCDIRS = -I/usr/local/include
TARGET = uebpar
CXX_SRCS = main.cpp canopy.cpp matrixnvector.cpp ncfunctions.cpp snowdgtv.cpp snowdv.cpp snowxv.cpp uebdecls.cpp uebinputs.cpp
OBJS = $(CXX_SRCS:.cpp=.o)
$(TARGET) : $(OBJS)
$(MPICXX) $(LINKFLAGS) -o $@ $^ $(LIBDIRS) $(LDFLAGS)
#$(CUDAXX) $(CUDALFLAGS) $(LINKFLAGS) -o $@ $^ $(LIBDIRS) $(LDFLAGS)
%.o : %.cpp
$(MPICXX) $(CXXFLAGS) $(INCDIRS) -c $<
clean :
$(RM) $(OBJS) $(TARGET)