Makefile 1.1 KB
Newer Older
Marco Govoni's avatar
Marco Govoni committed
1
2
# Makefile for Modules

Marco Govoni's avatar
Marco Govoni committed
3
include ../west_make.inc
Marco Govoni's avatar
Marco Govoni committed
4
include ../../make.inc
Marco Govoni's avatar
Marco Govoni committed
5
6
7
8

# location of needed modules
MODFLAGS= $(MOD_FLAG)../../iotk/src $(MOD_FLAG)../../Modules $(MOD_FLAG)../../LAXlib \
          $(MOD_FLAG)../../FFTXlib $(MOD_FLAG)../../PW/src \
9
          $(MOD_FLAG)../Libraries/Forpy \
Marco Govoni's avatar
Marco Govoni committed
10
11
12
13
14
15
          $(MOD_FLAG).
IFLAGS=


MODULES_OBJS = \
west_version.o \
Marco Govoni's avatar
Marco Govoni committed
16
westcom.o \
Marco Govoni's avatar
Marco Govoni committed
17
18

PWOBJS = ../../PW/src/libpw.a
19
QEMODS = ../../Modules/libqemod.a ../../FFTXlib/libqefft.a ../../LAXlib/libqela.a ../Libraries/Forpy/libforpy.a
Marco Govoni's avatar
Marco Govoni committed
20
21
22

TLDEPS= bindir mods libs pw

Marco Govoni's avatar
Marco Govoni committed
23
all: title tldeps update libmodules.a
Marco Govoni's avatar
Marco Govoni committed
24
25
26

tldeps:
	test -n "$(TLDEPS)" && ( cd ../.. ; $(MAKE) $(MFLAGS) $(TLDEPS) || exit 1) || :
Marco Govoni's avatar
Marco Govoni committed
27
28

update:	
Marco Govoni's avatar
Marco Govoni committed
29
	./update_west_version ${WESTDIR} `${PYT} ../Pytools/read_json.py ../VERSION.json version`
Marco Govoni's avatar
Marco Govoni committed
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47

libmodules.a : $(MODULES_OBJS)
	$(AR) $(ARFLAGS) $@ $?
	$(RANLIB) $@

clean :
	- /bin/rm -f *.x *.o *.a *~ *_tmp.f90 *.d *.mod *.i *.L 
	- /bin/rm -f libmodules.a
	- /bin/rm -f west_version.f90

title :
	@echo "                "
	@echo "################"
	@echo "### Modules ####"
	@echo "################"
	@echo "                "

include make.depend