-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathMakefile
138 lines (136 loc) · 4.54 KB
/
Makefile
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
#
# License-Identifier: GPL
#
# Copyright (C) 2006 The Yambo Team
#
# Authors (see AUTHORS file for details): AM DS
#
ifeq ($(wildcard config/mk/global/defs.mk),config/mk/global/defs.mk)
include config/mk/global/defs.mk
include config/mk/defs.mk
else ifeq ($(MAKECMDGOALS), download)
else ifeq ($(MAKECMDGOALS), veryclean)
else ifeq ($(MAKECMDGOALS), check-files)
else ifeq ($(MAKECMDGOALS), check-packages)
else
include config/mk/global/no_configure_help.mk
endif
#
MAKEFLAGS = --no-print-directory
#
# Targets
include config/mk/global/targets.mk
#
# Libraries (ordered for compiling & linking)
include config/mk/global/libraries.mk
.PHONY: interfaces ypp
nothing:
@$(call yambo_help,"header")
help:
@$(call yambo_help,"$(what)")
changelog:
./sbin/gitchangelog.py > ChangeLog
interfaces:
@for target in $(INTERFCS) ; do $(MAKE) $(MAKEFLAGS) $$target; if test ! -f "$(bindir)/$$target"; then echo "$$target build failed"; exit 1;fi ; done
gpl:
@for target in $(GPL) ; do $(MAKE) $(MAKEFLAGS) $$target; if test ! -f "$(bindir)/$$target"; then echo "$$target build failed"; exit 1;fi ; done
core:
@for target in $(CORE) ; do $(MAKE) $(MAKEFLAGS) $$target; if test ! -f "$(bindir)/$$target"; then echo "$$target build failed"; exit 1;fi ; done
ph-project:
@for target in $(PH_PROJ) ; do $(MAKE) $(MAKEFLAGS) $$target; if test ! -f "$(bindir)/$$target"; then echo "$$target build failed"; exit 1;fi ; done
sc-project:
@for target in $(SC_PROJ) ; do $(MAKE) $(MAKEFLAGS) $$target; if test ! -f "$(bindir)/$$target"; then echo "$$target build failed"; exit 1;fi ; done
mag-project:
@for target in $(MAG_PROJ) ; do $(MAKE) $(MAKEFLAGS) $$target; if test ! -f "$(bindir)/$$target"; then echo "$$target build failed"; exit 1;fi ; done
rt-project:
@for target in $(RT_PROJ) ; do $(MAKE) $(MAKEFLAGS) $$target; if test ! -f "$(bindir)/$$target"; then echo "$$target build failed"; exit 1;fi ; done
nl-project:
@for target in $(NL_PROJ) ; do $(MAKE) $(MAKEFLAGS) $$target; if test ! -f "$(bindir)/$$target"; then echo "$$target build failed"; exit 1;fi ; done
main:
@for target in $(MAIN) ; do $(MAKE) $(MAKEFLAGS) $$target; if test ! -f "$(bindir)/$$target"; then echo "$$target build failed"; exit 1;fi ; done
all:
@for target in $(ALL) ; do $(MAKE) $(MAKEFLAGS) $$target; if test ! -f "$(bindir)/$$target"; then echo "$$target build failed"; exit 1;fi ; done
ext-libs:
@for target in $(EXT_LIBS) ; do if ! test "$$target" = Ydriver; then $(MAKE) $(MAKEFLAGS) $$target; fi; done
int-libs:
@for target in $(INT_LIBS) ; do $(MAKE) $(MAKEFLAGS) $$target; \
if test ! -f "lib/lib$$target."*; then echo "$$target build failed"; exit 1; fi done
yambo-int-libs:
@for target in $(YAMBO_INT_LIBS) ; do $(MAKE) $(MAKEFLAGS) $$target; done
check-packages:
@$(global_check)
#
#=====================
# DOUBLE PRECISION?
#=====================
#
# int-libs are compiled via an internal make call where MAKECMDGOALS is the lib itself.
#
STAMP_DBLE=
ifneq (,$(wildcard $(compdir)/config/stamps_and_lists/compilation_objects_in_DOUBLE_precision.stamp))
STAMP_DBLE=-D_DOUBLE
else ifneq (,$(wildcard $(compdir)/config/stamps_and_lists/compiling_yambo_nl.stamp))
STAMP_DBLE=-D_DOUBLE
else ifneq (,$(wildcard $(compdir)/config/stamps_and_lists/compiling_ypp_nl.stamp))
STAMP_DBLE=-D_DOUBLE
endif
#
#==============
# COMPILATIONS
#==============
#
# External libraries
include config/mk/global/actions/download_external_libraries.mk
include config/mk/global/actions/compile_external_libraries.mk
#
# Internal libraries
include config/mk/global/actions/compile_internal_libraries.mk
#
# Yambo libs
include config/mk/global/actions/compile_yambo_libraries.mk
#
# All libs
libs: ext-libs int-libs
#
# Yambo
include config/mk/global/actions/compile_yambo.mk
#
# Interfaces
include config/mk/global/actions/compile_interfaces.mk
#
# YPP
include config/mk/global/actions/compile_ypp.mk
#
# Cleans
include config/mk/global/actions/clean.mk
#
#===========
# Functions
#===========
#
# Global Configuration Check
include config/mk/global/functions/global_check.mk
#
# Libraries download/clone/checkout
include config/mk/global/functions/get_libraries.mk
#
# Internal code dependencies
include config/mk/global/actions/dependencies.mk
#
# New sources to be compiled
include config/mk/global/functions/todo.mk
#
# Messages
include config/mk/global/functions/help.mk
#
# LIBs ...
# ... internal
include config/mk/global/functions/mk_lib.mk
# ... external
include config/mk/global/functions/mk_external_lib.mk
#
# Linker
include config/mk/global/functions/mk_exe.mk
#
# CLEANING
include config/mk/global/functions/cleaning.mk