diff options
author | TheJackiMonster <thejackimonster@gmail.com> | 2022-04-23 21:13:20 +0200 |
---|---|---|
committer | TheJackiMonster <thejackimonster@gmail.com> | 2022-04-23 21:13:20 +0200 |
commit | 64a5a60a6c3b605fd80a275ff013782a832410ae (patch) | |
tree | a272a8ccdc3f573a123c829b0fd158eb4b89197b | |
parent | 1a0f8ff4df1dc4ae065dd7c1159b9c83fadae63c (diff) | |
download | messenger-gtk-64a5a60a6c3b605fd80a275ff013782a832410ae.tar.gz messenger-gtk-64a5a60a6c3b605fd80a275ff013782a832410ae.zip |
Added dist target to makefile
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | Makefile | 40 |
2 files changed, 37 insertions, 6 deletions
@@ -14,3 +14,6 @@ messenger-gtk | |||
14 | 14 | ||
15 | # Application configuration files: | 15 | # Application configuration files: |
16 | .messenger/ | 16 | .messenger/ |
17 | |||
18 | # Tar files | ||
19 | messenger-gtk-*.tar.gz | ||
@@ -1,11 +1,14 @@ | |||
1 | 1 | ||
2 | APP_ID = org.gnunet.Messenger | 2 | VERSION = 0.7.0 |
3 | APP_ID = org.gnunet.Messenger | ||
4 | TARGET_NAME = messenger-gtk | ||
3 | 5 | ||
4 | RESOURCES_DIR = resources/ | 6 | RESOURCES_DIR = resources/ |
5 | SOURCE_DIR = src/ | 7 | SOURCE_DIR = src/ |
6 | INSTALL_DIR ?= /usr/local/ | 8 | INSTALL_DIR ?= /usr/local/ |
7 | 9 | ||
8 | BINARY = messenger-gtk | 10 | PACKAGE = $(TARGET_NAME) |
11 | BINARY = $(TARGET_NAME) | ||
9 | SOURCES = messenger_gtk.c\ | 12 | SOURCES = messenger_gtk.c\ |
10 | application.c\ | 13 | application.c\ |
11 | contact.c\ | 14 | contact.c\ |
@@ -50,12 +53,21 @@ PACKAGES = gnunetutil\ | |||
50 | libnotify\ | 53 | libnotify\ |
51 | libqrencode\ | 54 | libqrencode\ |
52 | zbar | 55 | zbar |
53 | 56 | ||
54 | INCLUDES = submodules/gnome-characters/lib | 57 | INCLUDES = submodules/gnome-characters/lib |
55 | 58 | ||
56 | GNU_CC ?= gcc | 59 | DIST_FILES = submodules/gnome-characters/lib/emoji.h\ |
57 | GNU_LD ?= gcc | 60 | Makefile\ |
58 | GNU_RM ?= rm | 61 | AUTHORS\ |
62 | CHANGES.md\ | ||
63 | COPYING\ | ||
64 | README.md | ||
65 | |||
66 | GNU_CC ?= gcc | ||
67 | GNU_LD ?= gcc | ||
68 | GNU_RM ?= rm | ||
69 | GNU_CP ?= cp | ||
70 | GNU_TAR ?= tar | ||
59 | 71 | ||
60 | GLIB_COMPILE_RESOURCES ?= glib-compile-resources | 72 | GLIB_COMPILE_RESOURCES ?= glib-compile-resources |
61 | 73 | ||
@@ -65,6 +77,9 @@ LDFLAGS += | |||
65 | DEBUGFLAGS = -O0 -D _DEBUG | 77 | DEBUGFLAGS = -O0 -D _DEBUG |
66 | RELEASEFLAGS = -O2 -D NDEBUG | 78 | RELEASEFLAGS = -O2 -D NDEBUG |
67 | 79 | ||
80 | DIST_DIR = $(PACKAGE)-$(VERSION)/ | ||
81 | DIST_TAR = $(PACKAGE)-$(VERSION).tar.gz | ||
82 | |||
68 | ICON_SIZES = 32\ | 83 | ICON_SIZES = 32\ |
69 | 64\ | 84 | 64\ |
70 | 128\ | 85 | 128\ |
@@ -139,9 +154,22 @@ uninstall: | |||
139 | $(GNU_RM) -f $(addsuffix $(APP_ID).desktop, $(addprefix $(INSTALL_DIR), share/applications/)) | 154 | $(GNU_RM) -f $(addsuffix $(APP_ID).desktop, $(addprefix $(INSTALL_DIR), share/applications/)) |
140 | $(GNU_RM) -f $(addsuffix $(APP_ID).appdata.xml, $(addprefix $(INSTALL_DIR), share/appdata/)) | 155 | $(GNU_RM) -f $(addsuffix $(APP_ID).appdata.xml, $(addprefix $(INSTALL_DIR), share/appdata/)) |
141 | 156 | ||
157 | .PHONY: dist | ||
158 | |||
159 | dist: clean | ||
160 | mkdir $(DIST_DIR) | ||
161 | $(foreach INCLUDE_DIR,$(INCLUDES),mkdir -p $(addprefix $(DIST_DIR), $(INCLUDE_DIR));) | ||
162 | $(GNU_CP) -r $(SOURCE_DIR) $(DIST_DIR) | ||
163 | $(GNU_CP) -r $(RESOURCES_DIR) $(DIST_DIR) | ||
164 | $(GNU_RM) -f $(addprefix $(addprefix $(DIST_DIR), $(RESOURCES_DIR)), ui/*.ui~) | ||
165 | $(foreach DIST_FILE,$(DIST_FILES),$(GNU_CP) $(DIST_FILE) $(addprefix $(DIST_DIR), $(DIST_FILE));) | ||
166 | $(GNU_TAR) -czf $(DIST_TAR) $(DIST_DIR) | ||
167 | $(GNU_RM) -r $(DIST_DIR) | ||
168 | |||
142 | .PHONY: clean | 169 | .PHONY: clean |
143 | 170 | ||
144 | clean: | 171 | clean: |
145 | $(GNU_RM) -f $(BINARY) | 172 | $(GNU_RM) -f $(BINARY) |
146 | $(GNU_RM) -f $(OBJECT_FILES) | 173 | $(GNU_RM) -f $(OBJECT_FILES) |
147 | $(GNU_RM) -f $(RESOURCES_HEADERS) | 174 | $(GNU_RM) -f $(RESOURCES_HEADERS) |
175 | $(GNU_RM) -f $(DIST_TAR) | ||