2015-03-25 23:03:51 +01:00
|
|
|
ifndef QPACKAGE_ROOT
|
|
|
|
$(error "QPACKAGE_ROOT is not defined. Please source quantum_package.rc")
|
|
|
|
endif
|
2014-04-01 18:37:27 +02:00
|
|
|
|
2015-03-25 23:03:51 +01:00
|
|
|
include Makefile.config
|
2014-04-01 18:37:27 +02:00
|
|
|
|
2015-01-11 20:28:33 +01:00
|
|
|
ALL_MODULES=$(shell cat NEEDED_MODULES)
|
2015-03-25 23:03:51 +01:00
|
|
|
EZFIO_DIR=$(QPACKAGE_ROOT)/EZFIO
|
|
|
|
EZFIO=$(EZFIO_DIR)/lib/libezfio_irp.a
|
2014-04-01 18:37:27 +02:00
|
|
|
|
2015-03-25 23:03:51 +01:00
|
|
|
.PHONY: $(ALL_MODULES)
|
2014-10-10 00:26:49 +02:00
|
|
|
|
2014-04-03 11:19:41 +02:00
|
|
|
|
2015-03-25 23:03:51 +01:00
|
|
|
default: $(EZFIO)
|
|
|
|
$(QPACKAGE_ROOT)/scripts/build_modules.sh $(ALL_MODULES)
|
2014-04-03 11:19:41 +02:00
|
|
|
|
2015-03-25 23:03:51 +01:00
|
|
|
veryclean:
|
|
|
|
$(QPACKAGE_ROOT)/scripts/clean_modules.sh $(ALL_MODULES)
|
|
|
|
|
|
|
|
$(ALL_MODULES): $(EZFIO)
|
|
|
|
$(QPACKAGE_ROOT)/scripts/build_modules.sh $@
|
2014-04-03 11:19:41 +02:00
|
|
|
|
2015-01-11 20:28:33 +01:00
|
|
|
executables: $(ALL_MODULES)
|
2014-10-10 00:26:49 +02:00
|
|
|
rm -f executables ; \
|
2015-01-09 23:52:44 +01:00
|
|
|
for EXE in $$(find $(QPACKAGE_ROOT)/src -perm /u+x -type f | grep -e "$(QPACKAGE_ROOT)/src/[^/]*/[^/]*$$" |sort ) ; \
|
2014-10-10 00:26:49 +02:00
|
|
|
do printf "%-30s %s\n" $$(basename $$EXE) $$EXE | sed "s|$(QPACKAGE_ROOT)|\$$QPACKAGE_ROOT|g" >> executables ;\
|
|
|
|
done
|
|
|
|
|
2015-03-25 23:03:51 +01:00
|
|
|
# Define the EZFIO rules
|
|
|
|
$(EZFIO): $(wildcard $(QPACKAGE_ROOT)/src/*.ezfio_config) $(wildcard $(QPACKAGE_ROOT)/src/*/EZFIO.cfg)
|
|
|
|
$(QPACKAGE_ROOT)/scripts/prepare_ezfio.sh
|
|
|
|
cd $(EZFIO_DIR);\
|
|
|
|
export FC="$(FC)" ; export FCFLAGS="$(FCFLAGS)" ; export IRPF90="$(IRPF90)" ;\
|
|
|
|
$(MAKE) ;\
|
|
|
|
$(MAKE) Python
|
|
|
|
|
|
|
|
# Frequent typos
|
|
|
|
clena: clean
|
|
|
|
veryclena: veryclean
|
2015-01-11 20:28:33 +01:00
|
|
|
|