From 97cdf4ecb26464bab24e8a397dc3a8b54b06886c Mon Sep 17 00:00:00 2001 From: Markus Rosenstihl Date: Wed, 24 Sep 2014 21:33:21 +0200 Subject: [PATCH] new Makefile --- Makefile | 49 +++++++++++++++++++++++++++++++++++++------------ 1 file changed, 37 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 3c99346..3e25f1e 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,37 @@ -all: - pyrcc4 icons/images.qrc -o images_rc.py - pyuic4 gui/QDSMain.ui -o gui/QDSMain.py - pyuic4 gui/PeakGroupBox.ui -o gui/PeakGroupBox.py - pyuic4 gui/ConductivityGroupBox.ui -o gui/ConductivityGroupBox.py - pyuic4 gui/PowerLawGroupBox.ui -o gui/PowerLawGroupBox.py - pyuic4 gui/StaticGroupBox.ui -o gui/StaticGroupBox.py - pyuic4 gui/YAFFparameters.ui -o gui/YAFFparameters.py - pyuic4 gui/YAFFConfig.ui -o gui/YAFFConfig.py - pyuic4 gui/ExtraDifferential.ui -o gui/ExtraDifferential.py -stats: - wc -l QDS.py ContainerWidgets.py Container.py libyaff.py Mathlib.py Data.py +# Anzahl an gleichzeitgen Prozessen +MAKEFLAGS+="-j 4" + +###### EDIT ##################### +#Directory with ui and resource files +RESOURCE_DIR = gui + +#Directory for compiled resources +COMPILED_DIR = gui + +#UI files to compile +UI_FILES = *.ui +#Qt resource files to compile +RESOURCES = images.qrc + +#pyuic4 and pyrcc4 binaries + +################################# +# DO NOT EDIT FOLLOWING + +COMPILED_UI = $(UI_FILES:%.ui=$(COMPILED_DIR)/%.py) +COMPILED_RESOURCES = $(RESOURCES:%.qrc=$(COMPILED_DIR)/%_rc.py) + +all : ui resources + +resources : $(COMPILED_RESOURCES) + +ui : $(COMPILED_UI) + +$(COMPILED_DIR)/%.py : $(RESOURCE_DIR)/%.ui + pyuic4 $< -o $@ + +$(COMPILED_DIR)/%_rc.py : $(RESOURCE_DIR)/icons/%.qrc + pyrcc4 $< -o $@ + +clean : + rm $(COMPILED_UI) $(COMPILED_RESOURCES) $(COMPILED_UI:.py=.pyc) $(COMPILED_RESOURCES:.py=.pyc)