File: Makefile

package info (click to toggle)
pycode-browser 1%3A1.02%2Bgit20181006-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 6,088 kB
  • sloc: python: 2,779; xml: 152; makefile: 71
file content (40 lines) | stat: -rw-r--r-- 763 bytes parent folder | download | duplicates (4)
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
QT_VERSION?=PyQt4
export QT_VERSION


ifeq ($(QT_VERSION),PyQt5)
  PYUIC = pyuic5
  PYRCC = pyrcc5
  PYLUPDATE = pylupdate5
else ifeq ($(QT_VERSION),PyQt4)
  PYUIC = pyuic4
  PYRCC = pyrcc4
  PYLUPDATE = pylupdate4
else ifeq ($(QT_VERSION),PySide)
  PYUIC = pyside-uic
  PYRCC = pyside-rcc
  PYLUPDATE = pylupdate4
else
  PYUIC = pyuic4
  PYRCC = pyrcc4
  PYLUPDATE = pylupdate4
endif

UI_FILES = $(shell ls *.ui)
UI_COMPILED = $(patsubst %.ui, ui_%.py, $(UI_FILES))
RC_FILES = $(shell ls *.qrc)
RC_COMPILED = $(patsubst %.qrc, %_rc.py, $(RC_FILES))

all: $(UI_COMPILED) $(RC_COMPILED)

clean:
	rm -f $(UI_COMPILED) $(RC_COMPILED)
	rm -rf *.pyc *~ __pycache__

ui_%.py:  %.ui
	$(PYUIC) --from-import $< -o $@

%_rc.py: %.qrc
	$(PYRCC) $< -o $@

.PHONY: all clean