summaryrefslogtreecommitdiffstats
path: root/Rules.mk
diff options
context:
space:
mode:
Diffstat (limited to 'Rules.mk')
-rw-r--r--Rules.mk58
1 files changed, 32 insertions, 26 deletions
diff --git a/Rules.mk b/Rules.mk
index c0ef1ee9e..bf9346a48 100644
--- a/Rules.mk
+++ b/Rules.mk
@@ -17,7 +17,7 @@ CFBUNDLEVERSION_STRING := $(shell $(GET_VERSION) darwin $(VERSION_STRING) || \
PRODVERSION_STRING := $(shell $(GET_VERSION) win $(VERSION_STRING) || \
echo "$(VERSION).0.0")
-MSGOBJS=$(addprefix share/locale/,$(MSGLANGS:.po=.UTF-8/LC_MESSAGES/subsurface.mo))
+MSGOBJS=$(addprefix share/locale/,$(MSGLANGS:.po=.UTF-8/LC_MESSAGES/$(NAME).mo))
ifeq ($(V),1)
PRETTYECHO=true
@@ -39,13 +39,13 @@ MOC_OBJS = $(HEADERS_NEEDING_MOC:.h=.moc.o)
ALL_OBJS = $(OBJS) $(MOC_OBJS)
# Files for using Qt Creator
-CREATOR_FILES = subsurface.config subsurface.creator subsurface.files subsurface.includes
+CREATOR_FILES = $(NAME).config $(NAME).creator $(NAME).files $(NAME).includes
all: $(NAME)
-$(NAME): gen_version_file $(ALL_OBJS) $(MSGOBJS) $(INFOPLIST)
- @$(PRETTYECHO) ' LINK' $(NAME)
- $(COMPILE_PREFIX)$(CXX) $(LDFLAGS) -o $(NAME) $(ALL_OBJS) $(LIBS)
+$(TARGET): gen_version_file $(ALL_OBJS) $(MSGOBJS) $(INFOPLIST)
+ @$(PRETTYECHO) ' LINK' $(TARGET)
+ $(COMPILE_PREFIX)$(CXX) $(LDFLAGS) -o $(TARGET) $(ALL_OBJS) $(LIBS)
gen_version_file $(VERSION_FILE):
ifneq ($(STORED_VERSION_STRING),$(VERSION_STRING))
@@ -66,13 +66,13 @@ install: all
$(INSTALL) -d -m 755 $(MANDIR)
$(INSTALL) -m 644 $(MANFILES) $(MANDIR)
@-if test ! -z "$(XSLT)"; then \
- $(INSTALL) -d -m 755 $(DATADIR)/subsurface; \
+ $(INSTALL) -d -m 755 $(DATADIR)/$(NAME); \
$(INSTALL) -d -m 755 $(XSLTDIR); \
$(INSTALL) -m 644 $(XSLTFILES) $(XSLTDIR); \
fi
for LOC in $(wildcard share/locale/*/LC_MESSAGES); do \
$(INSTALL) -d $(prefix)/$$LOC; \
- $(INSTALL) -m 644 $$LOC/subsurface.mo $(prefix)/$$LOC/subsurface.mo; \
+ $(INSTALL) -m 644 $$LOC/$(NAME).mo $(prefix)/$$LOC/$(NAME).mo; \
done
@@ -84,10 +84,10 @@ install-macosx: all
$(INSTALL) $(MACOSXFILES)/PkgInfo $(MACOSXINSTALL)/Contents/
$(INSTALL) $(MACOSXFILES)/Info.plist $(MACOSXINSTALL)/Contents/
$(INSTALL) $(ICONFILE) $(MACOSXINSTALL)/Contents/Resources/
- $(INSTALL) $(MACOSXFILES)/Subsurface.icns $(MACOSXINSTALL)/Contents/Resources/
+ $(INSTALL) $(MACOSXFILES)/$(CAPITALIZED_NAME).icns $(MACOSXINSTALL)/Contents/Resources/
for LOC in $(wildcard share/locale/*/LC_MESSAGES); do \
$(INSTALL) -d -m 755 $(MACOSXINSTALL)/Contents/Resources/$$LOC; \
- $(INSTALL) $$LOC/subsurface.mo $(MACOSXINSTALL)/Contents/Resources/$$LOC/subsurface.mo; \
+ $(INSTALL) $$LOC/$(NAME).mo $(MACOSXINSTALL)/Contents/Resources/$$LOC/$(NAME).mo; \
done
@-if test ! -z "$(XSLT)"; then \
$(INSTALL) -d -m 755 $(MACOSXINSTALL)/Contents/Resources/xslt; \
@@ -102,19 +102,19 @@ create-macosx-bundle: all
$(INSTALL) $(MACOSXFILES)/PkgInfo $(MACOSXSTAGING)/Contents/
$(INSTALL) $(MACOSXFILES)/Info.plist $(MACOSXSTAGING)/Contents/
$(INSTALL) $(ICONFILE) $(MACOSXSTAGING)/Contents/Resources/
- $(INSTALL) $(MACOSXFILES)/Subsurface.icns $(MACOSXSTAGING)/Contents/Resources/
+ $(INSTALL) $(MACOSXFILES)/$(CAPITALIZED_NAME).icns $(MACOSXSTAGING)/Contents/Resources/
for LOC in $(wildcard share/locale/*/LC_MESSAGES); do \
$(INSTALL) -d -m 755 $(MACOSXSTAGING)/Contents/Resources/$$LOC; \
- $(INSTALL) $$LOC/subsurface.mo $(MACOSXSTAGING)/Contents/Resources/$$LOC/subsurface.mo; \
+ $(INSTALL) $$LOC/$(NAME).mo $(MACOSXSTAGING)/Contents/Resources/$$LOC/$(NAME).mo; \
done
@-if test ! -z "$(XSLT)"; then \
$(INSTALL) -d -m 755 $(MACOSXSTAGING)/Contents/Resources/xslt; \
$(INSTALL) -m 644 $(XSLTFILES) $(MACOSXSTAGING)/Contents/Resources/xslt/; \
fi
- $(GTK_MAC_BUNDLER) packaging/macosx/subsurface.bundle
+ $(GTK_MAC_BUNDLER) packaging/macosx/$(NAME).bundle
sign-macosx-bundle: all
- codesign -s "3A8CE62A483083EDEA5581A61E770EC1FA8BECE8" /Applications/Subsurface.app/Contents/MacOS/subsurface-bin
+ codesign -s "3A8CE62A483083EDEA5581A61E770EC1FA8BECE8" /Applications/$(CAPITALIZED_NAME).app/Contents/MacOS/$(NAME)-bin
install-cross-windows: all
$(INSTALL) -d -m 755 $(WINDOWSSTAGING)/share/locale
@@ -124,7 +124,7 @@ install-cross-windows: all
done
for LOC in $(wildcard share/locale/*/LC_MESSAGES); do \
$(INSTALL) -d -m 755 $(WINDOWSSTAGING)/$$LOC; \
- $(INSTALL) $$LOC/subsurface.mo $(WINDOWSSTAGING)/$$LOC/subsurface.mo; \
+ $(INSTALL) $$LOC/$(NAME).mo $(WINDOWSSTAGING)/$$LOC/$(NAME).mo; \
done
create-windows-installer: all $(NSIFILE) install-cross-windows
@@ -138,7 +138,7 @@ $(INFOPLIST): $(INFOPLISTINPUT)
# Transifex merge the translations
update-po-files:
- xgettext -o po/subsurface-new.pot -s -k_ -kN_ -ktr --keyword=C_:1c,2 --add-comments="++GETTEXT" *.c qt-ui/*.cpp
+ xgettext -o po/$(NAME)-new.pot -s -k_ -kN_ -ktr --keyword=C_:1c,2 --add-comments="++GETTEXT" *.c qt-ui/*.cpp
tx push -s
tx pull -af
@@ -185,7 +185,7 @@ ui_%.h: qt-ui/%.ui
@$(PRETTYECHO) ' UIC' $<
$(COMPILE_PREFIX)$(UIC) $< -o qt-ui/$@
-share/locale/%.UTF-8/LC_MESSAGES/subsurface.mo: po/%.po po/%.aliases
+share/locale/%.UTF-8/LC_MESSAGES/$(NAME).mo: po/%.po po/%.aliases
@$(PRETTYECHO) ' MSGFMT' $*.po
@mkdir -p $(dir $@)
$(COMPILE_PREFIX)msgfmt -c -o $@ po/$*.po
@@ -212,7 +212,7 @@ doc:
$(MAKE) -C Documentation doc
clean:
- rm -f $(ALL_OBJS) *~ $(NAME) $(NAME).exe po/*~ po/subsurface-new.pot \
+ rm -f $(ALL_OBJS) *~ $(NAME) $(NAME).exe po/*~ po/$(NAME)-new.pot \
$(VERSION_FILE) $(HEADERS_NEEDING_MOC:.h=.moc) *.moc qt-ui/*.moc qt-ui/ui_*.h
rm -f $(RESOURCES:.qrc=.qrc.cpp)
rm -rf share
@@ -224,17 +224,23 @@ confclean: clean
distclean: confclean
rm -f $(CREATOR_FILES)
+release:
+ @scripts/check-version -cr $(VERSION_STRING)
+ git archive --prefix $(CAPITALIZED_NAME)-$(VERSION_STRING)/ \
+ --output $(CAPITALIZED_NAME)-$(VERSION_STRING).tgz \
+ v$(VERSION_STRING)
+
.PHONY: creator-files
creator-files: $(CREATOR_FILES)
-subsurface.files: Makefile $(CONFIGFILE)
- echo $(wildcard *.h) $(HEADERS) $(SOURCES) | tr ' ' '\n' | sort | uniq > subsurface.files
-subsurface.config: Makefile $(CONFIGFILE)
- echo $(patsubst -D%,%,$(filter -D%, $(CXXFLAGS) $(CFLAGS) $(EXTRA_FLAGS))) | tr ' ' '\n' | sort | uniq > subsurface.config
-subsurface.includes: Makefile $(CONFIGFILE)
- echo $$PWD > subsurface.includes
- echo $(patsubst -I%,%,$(filter -I%, $(CXXFLAGS) $(CFLAGS) $(EXTRA_FLAGS))) | tr ' ' '\n' | sort | uniq >> subsurface.includes
-subsurface.creator:
- echo '[General]' > subsurface.creator
+$(NAME).files: Makefile $(CONFIGFILE)
+ echo $(wildcard *.h) $(HEADERS) $(SOURCES) | tr ' ' '\n' | sort | uniq > $(NAME).files
+$(NAME).config: Makefile $(CONFIGFILE)
+ echo $(patsubst -D%,%,$(filter -D%, $(CXXFLAGS) $(CFLAGS) $(EXTRA_FLAGS))) | tr ' ' '\n' | sort | uniq > $(NAME).config
+$(NAME).includes: Makefile $(CONFIGFILE)
+ echo $$PWD > $(NAME).includes
+ echo $(patsubst -I%,%,$(filter -I%, $(CXXFLAGS) $(CFLAGS) $(EXTRA_FLAGS))) | tr ' ' '\n' | sort | uniq >> $(NAME).includes
+$(NAME).creator:
+ echo '[General]' > $(NAME).creator
ifneq ($(CONFIGURED)$(CONFIGURING),)
.dep/%.o.dep: %.cpp