forked from yambo-code/yambo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
126 lines (124 loc) · 4.62 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
#
# Copyright (C) 2000-2020 the YAMBO team
# http://www.yambo-code.org
#
# Authors (see AUTHORS file for details): AM, DS
#
# This file is distributed under the terms of the GNU
# General Public License. You can redistribute it and/or
# modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation;
# either version 2, or (at your option) any later version.
#
# This program is distributed in the hope that it will
# be useful, but WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public
# License along with this program; if not, write to the Free
# Software Foundation, Inc., 59 Temple Place - Suite 330,Boston,
# MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt.
#
ifeq ($(wildcard config/mk/defs.mk),config/mk/defs.mk)
include config/mk/defs.mk
else
$(error Run ./configure first)
endif
#
# STAMPS and CFGFILES
include config/mk/variables.mk
#
# Targets
include config/mk/targets.mk
#
# Libraries (ordered for compiling & linking)
include config/mk/libraries.mk
.PHONY: interfaces
nothing:
@$(make_message)
changelog:
./sbin/gitchangelog.py > ChangeLog
interfaces: ext-libs
for target in $(INTERFCS) ; do rm -f "$(bindir)/$$target" ; $(MAKE) $$target; if test ! -f "$(bindir)/$$target"; then echo "$$target build failed"; break;fi ; done
gpl: ext-libs
for target in $(GPL) ; do rm -f "$(bindir)/$$target" ; $(MAKE) $$target; if test ! -f "$(bindir)/$$target"; then echo "$$target build failed"; break;fi ; done
core: ext-libs
for target in $(CORE) ; do rm -f "$(bindir)/$$target" ; $(MAKE) $$target; if test ! -f "$(bindir)/$$target"; then echo "$$target build failed"; break;fi ; done
ph-project: ext-libs
for target in $(PH_PROJ) ; do rm -f "$(bindir)/$$target" ; $(MAKE) $$target; if test ! -f "$(bindir)/$$target"; then echo "$$target build failed"; break;fi ; done
sc-project: ext-libs
for target in $(SC_PROJ) ; do rm -f "$(bindir)/$$target" ; $(MAKE) $$target; if test ! -f "$(bindir)/$$target"; then echo "$$target build failed"; break;fi ; done
mag-project: ext-libs
for target in $(MAG_PROJ) ; do rm -f "$(bindir)/$$target" ; $(MAKE) $$target; if test ! -f "$(bindir)/$$target"; then echo "$$target build failed"; break;fi ; done
rt-project: ext-libs
for target in $(RT_PROJ) ; do rm -f "$(bindir)/$$target" ; $(MAKE) $$target; if test ! -f "$(bindir)/$$target"; then echo "$$target build failed"; break;fi ; done
nl-project: ext-libs
for target in $(NL_PROJ) ; do rm -f "$(bindir)/$$target" ; $(MAKE) $$target; if test ! -f "$(bindir)/$$target"; then echo "$$target build failed"; break;fi ; done
rtext-project: ext-libs
for target in $(RTE_PROJ) ; do rm -f "$(bindir)/$$target" ; $(MAKE) $$target; if test ! -f "$(bindir)/$$target"; then echo "$$target build failed"; break;fi ; done
kerr-project: ext-libs
for target in $(KERR_PROJ); do rm -f "$(bindir)/$$target" ; $(MAKE) $$target; if test ! -f "$(bindir)/$$target"; then echo "$$target build failed"; break;fi ; done
main: ext-libs
for target in $(MAIN) ; do rm -f "$(bindir)/$$target" ; $(MAKE) $$target; if test ! -f "$(bindir)/$$target"; then echo "$$target build failed"; break;fi ; done
all: ext-libs
for target in $(ALL) ; do rm -f "$(bindir)/$$target" ; $(MAKE) $$target; if test ! -f "$(bindir)/$$target"; then echo "$$target build failed"; break;fi ; done
#
#==============
# COMPILATIONS
#==============
#
# External libraries
include config/mk/actions/download_external_libraries.mk
include config/mk/actions/compile_external_libraries.mk
#
# Internal libraries
include config/mk/actions/compile_internal_libraries.mk
#
# Yambo libs
include config/mk/actions/compile_yambo_libraries.mk
#
# All libs
libs: ext-libs int-libs yambo-libs
#
# Yambo
include config/mk/actions/compile_yambo.mk
#
# Interfaces #
include config/mk/actions/compile_interfaces.mk
#
# YPP
include config/mk/actions/compile_ypp.mk
#
# Cleans
include config/mk/actions/clean.mk
#
#===========
# Functions
#===========
#
# Libraries download/clone/checkout
include config/mk/functions/get_libraries.mk
#
# Messages
include config/mk/functions/messaging.mk
#
# SRC functions
include config/mk/functions/mk_src.mk
include config/mk/functions/mk_ypp_src.mk
#
# LIBs (locks driven)...
# ... internal
include config/mk/functions/mk_internal_lib.mk
# ... external
include config/mk/functions/mk_external_lib.mk
#
# Yambo LIBS
include config/mk/functions/mk_external_yambo_lib.mk
#
# Final exe's
include config/mk/functions/mk_exe.mk
#
# CLEANING
include config/mk/functions/cleaning.mk