-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.inc
42 lines (35 loc) · 1.1 KB
/
Makefile.inc
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
ifeq ("","$(wildcard $(EXTSHOME)/dbcsr/.cp2k/Makefile)")
$(error "No DBCSR submodule available, please run 'git submodule update --init --recursive'")
endif
LIBS := -L$(LIBEXTSDIR)/dbcsr -ldbcsr $(LIBS)
EXTSDEPS_LIB = $(LIBEXTSDIR)/dbcsr/libdbcsr$(ARCHIVE_EXT)
EXTSDEPS_MOD = $(OBJEXTSDIR)/dbcsr/dbcsr_api.mod $(OBJEXTSDIR)/dbcsr/dbcsr_tensor_api.mod
$(EXTSDEPS_MOD) : ; # override builtin .mod rule to prevent circular dependency
ifneq (,$(findstring __DBCSR_ACC,$(OFFLOAD_FLAGS)))
ACC := $(OFFLOAD_CC)
ACCFLAGS := $(OFFLOAD_FLAGS)
else
ACC := ""
ACCFLAGS := ""
endif
extversions: dbcsrversion
extclean: dbcsrclean
@echo "Clean EXT"
dbcsr:
+$(MAKE) -C $(EXTSHOME)/$@ -f .cp2k/Makefile \
INCLUDEMAKE=$(ARCHDIR)/$(ARCH).$(ONEVERSION) \
LIBDIR=$(LIBEXTSDIR)/$@ \
OBJDIR=$(OBJEXTSDIR)/$@ \
ACC="$(ACC)" \
ACCFLAGS="$(ACCFLAGS)"
dbcsrversion:
@$(MAKE) -C $(EXTSHOME)/dbcsr -f .cp2k/Makefile \
ACC="$(ACC)" \
ACCFLAGS="$(ACCFLAGS)" \
version
dbcsrclean:
@echo "Clean DBCSR"
@$(MAKE) -C $(EXTSHOME)/dbcsr -f .cp2k/Makefile \
ACC="$(ACC)" \
ACCFLAGS="$(ACCFLAGS)" \
clean