forked from rmcgibbo/resp2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.LPW
81 lines (60 loc) · 2.61 KB
/
Makefile.LPW
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
#
# Plugin Makefile generated by Psi4.
#
# You shouldn't need to modify anything in this file.
#
# Location of your PSI4 source
top_srcdir = /hsgs/projects/pande/leeping/src/psi4.0b5
# Location of your PSI4 install, by default as listed
top_objdir = /home/leeping/opt/psi-4.0b5
# Start by figuring out whether we're on Linux or Mac (sorry, Mr. Gates)
UNAME := $(shell uname)
include $(top_srcdir)/src/bin/MakeVars.in
# Reset these values, MakeVars changes them to valud only valid in Psi4's objdir
# Location of your PSI4 source
top_srcdir = /hsgs/projects/pande/leeping/src/psi4.0b5
# Location of your PSI4 install, by default as listed
top_objdir = /home/leeping/opt/psi-4.0b5
PSITARGET = $(shell basename `pwd`).so
PSILIBS = -L/hsgs/projects/pande/leeping/src/psi4.0b5/build/lib -lPSI_plugin
NLOPTROOT = $(HOME)/opt/nlopt-2.4.2
NLOPTLIBS = -L$(NLOPTROOT)/lib -lnlopt -lm
NLOPTINCLUDE = -I$(NLOPTROOT)/include
# -M -O2 -DLinux -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DBUFF=0 -DSITEDIR=\"/home/leeping/opt/psi-4.0b5/share\" -openmp -fpic -I/home/leeping/opt/intel/composer_xe_2013.1.117/mkl/include -I. -I../../../boost/boost_1_53_0 -I../../../include -I/home/leeping/temp/psi4.0b5/include -I/home/leeping/temp/psi4.0b5/src/lib -I../../../src/lib -I/home/leeping/local/include/python2.7 -I/home/leeping/local/include/python2.7
CXX = g++
CXXFLAGS = -O2 -fPIC
CXXINCLUDE = -I/home/leeping/local/include/python2.7 -I/home/leeping/local/include -I/hsgs/projects/pande/leeping/src/psi4.0b5/src/lib -I/hsgs/projects/pande/leeping/src/psi4.0b5/include -I/hsgs/projects/pande/leeping/src/psi4.0b5/build/include -I.
CXXSRC = $(notdir $(wildcard src/*.cc))
CXXSRC = $(wildcard src/*.cc)
DEPENDINCLUDE = $(notdir $(wildcard include/*.h))
DEPENDINCLUDE = $(wildcard include/*.h)
CXXDEPENDFLAGS =
CXXDEPEND =
CXXDBG =
CXXINCLUDE += $(NLOPTINCLUDE)
BINOBJ = $(CXXSRC:%.cc=%.o)
.PHONY: print_vars
default:: $(PSITARGET)
# Add the flags needed for shared library creation
ifeq ($(UNAME), Linux)
LDFLAGS = -shared
endif
ifeq ($(UNAME), Darwin)
LDFLAGS = -shared -undefined dynamic_lookup
CXXOTH += -fno-common
endif
# The object files
src/%.o: src/%.cc
$(CXX) $(CXXFLAGS) $(CXXINCLUDE) $(NLOPTINCLUDE) -c $< $(OUTPUT_OPTION)
$(PSITARGET): $(BINOBJ)
$(CXX) $(LDFLAGS) -o $@ $^ $(CXXDBG) $(PSILIBS) $(NLOPTLIBS)
# Erase all compiled intermediate files
clean:
rm -f $(BINOBJ) $(PSITARGET) src/*.d *.pyc *.test output.dat psi.timer.dat
# Dependency handling
%.d: %.cc
$(CXXDEPEND) $(CXXDEPENDFLAGS) $(CXXFLAGS) $(CXXINCLUDE) $(NLOPTINCLUDE) $< > src/$(@F)
ifneq ($(DODEPEND),no)
$(BINOBJ:%.o=%.d): $(DEPENDINCLUDE)
include $(BINOBJ:%.o=%.d)
endif