This repository was archived by the owner on Jun 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile.mingw
73 lines (58 loc) · 2.16 KB
/
Makefile.mingw
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#
# Makefile.mingw
#
# Description: Makefile for win32 (mingw)
#
PLUGIN_SRC := ./src
PLUGIN_SHARE := ./share
PLUGIN_PO := ./po
PLUGIN_TOP := .
-include $(PLUGIN_TOP)/local.mak
PIDGIN_TREE_TOP ?= ../../..
include $(PIDGIN_TREE_TOP)/libpurple/win32/global.mak
PLUGIN_VERSION := $(shell ./scripts/gen-version.sh)
PIDGIN_VERSION := $(shell cat $(PIDGIN_TREE_TOP)/VERSION)
PLUGIN_WIN32_ZIP := pidgin-birthday-reminder-$(PLUGIN_VERSION)-win32.zip
.PHONY: all build dist clean
all: build
build: config.h
$(MAKE) -C $(PLUGIN_SRC) -f Makefile.mingw all
$(MAKE) -C $(PLUGIN_PO) -f Makefile.mingw all
config.h: .stamp-version-$(PLUGIN_VERSION) configure.ac scripts/gen-mingw-config_h.sh
scripts/gen-mingw-config_h.sh > config.h
.stamp-version-$(PLUGIN_VERSION):
rm -f .stamp-version*
touch $@
# If configure.ac.in exists, we generate configure.ac. Otherwise we assume that
# configure.ac exists (as in the release tarball).
ifneq ("$(wildcard configure.ac.in)", "")
configure.ac: .stamp-version-$(PLUGIN_VERSION) configure.ac.in ./scripts/gen-configure_ac.sh
./scripts/gen-configure_ac.sh
endif
dist: $(PLUGIN_WIN32_ZIP)
$(PLUGIN_WIN32_ZIP): build
rm -rf win32-install-dir
mkdir -p win32-install-dir/plugins
mkdir -p win32-install-dir/pixmaps/pidgin/birthday_reminder
mkdir -p win32-install-dir/sounds/pidgin/birthday_reminder
cp src/pidgin-birthday-reminder.dll win32-install-dir/plugins
cp share/pixmaps/*.png win32-install-dir/pixmaps/pidgin/birthday_reminder
cp share/sounds/*.wav win32-install-dir/sounds/pidgin/birthday_reminder
$(STRIP) win32-install-dir/plugins/pidgin-birthday-reminder.dll
for f in po/*.po; do \
lang=$$(basename $$f .po) || exit 1; \
mkdir -p win32-install-dir/locale/$${lang}/LC_MESSAGES || exit 1; \
cp po/$${lang}.gmo \
win32-install-dir/locale/$${lang}/LC_MESSAGES/pidgin-birthday-reminder.mo || exit 1; \
done
rm -f $(PLUGIN_WIN32_ZIP)
cd win32-install-dir && \
zip -r ../$(PLUGIN_WIN32_ZIP) *
clean:
$(MAKE) -C $(PLUGIN_SRC) -f Makefile.mingw clean
$(MAKE) -C $(PLUGIN_PO) -f Makefile.mingw clean
rm -f .stamp*
rm -f config.h
rm -rf win32-install-dir
rm -f $(PLUGIN_WIN32_ZIP)
test -f configure.ac.in && rm -f configure.ac || true