summaryrefslogtreecommitdiffstats
path: root/Rules.mk
diff options
context:
space:
mode:
authorGravatar Thiago Macieira <thiago@macieira.org>2013-04-13 23:24:47 -0700
committerGravatar Thiago Macieira <thiago@macieira.org>2013-04-23 00:06:32 -0700
commitc5d244eeea0583eaef3a30e01e7efb2e8a060af8 (patch)
tree9cddec4b2e40638909ecdf5e61099dfcfe7f9e36 /Rules.mk
parent17ea074dc0dc438a918d4e4fa1e5197ecec8217b (diff)
downloadsubsurface-c5d244eeea0583eaef3a30e01e7efb2e8a060af8.tar.gz
Add support for Qt resources in Subsurface
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Diffstat (limited to 'Rules.mk')
-rw-r--r--Rules.mk9
1 files changed, 8 insertions, 1 deletions
diff --git a/Rules.mk b/Rules.mk
index fd26d74d0..ee99773ba 100644
--- a/Rules.mk
+++ b/Rules.mk
@@ -28,7 +28,7 @@ else
endif
C_SOURCES = $(filter %.c, $(SOURCES))
-CXX_SOURCES = $(filter %.cpp, $(SOURCES))
+CXX_SOURCES = $(filter %.cpp, $(SOURCES)) $(RESOURCES:.qrc=.qrc.cpp)
OTHER_SOURCES = $(filter-out %.c %.cpp, $(SOURCES))
OBJS = $(C_SOURCES:.c=.o) $(CXX_SOURCES:.cpp=.o) $(OTHER_SOURCES)
@@ -164,6 +164,12 @@ MOCFLAGS = $(filter -I%, $(CXXFLAGS) $(EXTRA_FLAGS)) $(filter -D%, $(CXXFLAGS) $
@$(PRETTYECHO) ' MOC' $<
$(COMPILE_PREFIX)$(MOC) -i $(MOCFLAGS) $< -o $@
+# This creates the Qt resource sources.
+%.qrc.cpp: %.qrc
+ @$(PRETTYECHO) ' RCC' $<
+ $(COMPILE_PREFIX)$(RCC) $< -o $@
+%.qrc:
+
# This creates the ui headers.
ui_%.h: %.ui
@$(PRETTYECHO) ' UIC' $<
@@ -205,6 +211,7 @@ doc:
clean:
rm -f $(ALL_OBJS) *~ $(NAME) $(NAME).exe po/*~ po/subsurface-new.pot \
$(VERSION_FILE) qt-ui/*.moc qt-ui/ui_*.h
+ rm -f $(RESOURCES:.qrc=.qrc.cpp)
rm -rf share
confclean: clean