forked from dftlibs/xcfun
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.common_win
51 lines (34 loc) · 1.56 KB
/
Makefile.common_win
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
#This file probably requires GNU Make, but should be easily
#convertible to regular Make format.
PATHS:=-Iinclude -Isrc -Isrc/taylor -Isrc/functionals
CFLAGS+=$(PATHS)
CXXFLAGS+=$(PATHS)
BASE_OBJ:=src/xcfun.obj src/functional.obj src/parameters.obj \
src/evaluators.obj src/fortran.obj src/potential.obj
FUN_OBJ:=$(patsubst %.cpp,%.obj,$(wildcard src/functionals/*.cpp))
lib: lib/libxcfun.lib
lib/libxcfun.lib: $(BASE_OBJ) $(FUN_OBJ) include/xcfun_autogen.h fortran/xcfun_autogen.f90
lib -OUT:$@ $(BASE_OBJ) $(FUN_OBJ)
src/parameters.obj: src/parameters.cpp src/parameters.h src/functionals/list_of_parameters.h
src/fortran.obj: src/fortran.c include/xcfun_autogen.h
geninterface: src/geninterface.cpp
$(CXX) $(CXXFLAGS) $^ -Fe$@
include/xcfun_autogen.h: geninterface src/functionals/list_of_parameters.h
./geninterface
fortran/xcfun_autogen.f90: geninterface src/functionals/list_of_parameters.h
./geninterface
funeval: test/funeval.c lib/libxcfun.lib
$(CC) $(CFLAGS) $(LIBS) $< -Fe$@ lib/libxcfun.lib
testall: test/testall.c lib/libxcfun.lib
$(CC) $(CFLAGS) $(LIBS) $< -Fe$@ lib/libxcfun.lib
example_fortran: fortran/xcfun_autogen.obj fortran/xcfun_module.obj fortran/example.obj lib/libxcfun.lib
$(FC) $(FFLAGS) $(LIBS) -o $@ $^ lib/libxcfun.lib
clean:
rm -f `find . -name '*.o' -o -name '*~'` testall funeval lib/libxcfun.lib include/xcfun_autogen.h fortran/xcfun_autogen.f90 example_fortran_
.SUFFIXES: .f90 .obj
.f90.obj:
$(FC) $(FFLAGS) -c -Fo$*.obj $*.f90
.cpp.obj:
$(CXX) $(CXXFLAGS) -c -Fo$*.obj $*.cpp
.c.obj:
$(CXX) $(CXXFLAGS) -c -Fo$*.obj $*.c