-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (26 loc) · 888 Bytes
/
Makefile
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
UI_DIR = app/ui
RESOURCE_DIR = app/ui/res
BUILD_DIR = app/ui
RADIUS_DIR = app/analyzer/radius_mass
UI_FILES = main.ui login.ui gsinfo.ui videoid.ui probestart.ui logs.ui queue.ui statistics.ui missionstatus.ui
RESOURCES = res.qrc
PYUIC = pyuic5
PYRCC = pyrcc5
PYUICFLAGS = --from-imports
PYRCCFLAGS =
#################################
BUILT_UI = $(UI_FILES:%.ui=$(BUILD_DIR)/ui_%.py)
BUILT_RESOURCES = $(RESOURCES:%.qrc=$(BUILD_DIR)/%_rc.py)
all: resources ui radius
radius: $(RADIUS_DIR)/radius_mass.c
python $(RADIUS_DIR)/setup.py build_ext --inplace
rm -rf build
mv *.so app/analyzer/
ui: $(BUILT_UI)
resources: $(BUILT_RESOURCES)
$(BUILD_DIR)/ui_%.py: $(UI_DIR)/%.ui
$(PYUIC) $(PYUICFLAGS) -o $@ $<
$(BUILD_DIR)/%_rc.py: $(RESOURCE_DIR)/%.qrc
$(PYRCC) $(PYRCCFLAGS) -o $@ $<
clean:
$(RM) $(BUILT_UI) $(BUILT_RESOURCES) $(BUILT_UI:.py=.pyc) $(BUILT_RESOURCES:.py=.pyc)