This repository has been archived by the owner on Jun 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.mingw
67 lines (48 loc) · 1.59 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
PLUGIN = purple-history-since
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)
PLUGIN_WIN32_ZIP := $(PLUGIN)-$(PLUGIN_VERSION)-win32.zip
SRC=$(wildcard src/*.c)
OBJ=$(SRC:%.c=%.o)
DEP=$(SRC:%.c=%.d)
LANG_SRC=$(wildcard po/*.po)
LANG_CATALOGS=$(LANG_SRC:%.po=%.gmo)
CFLAGS += -MMD -MP
CFLAGS += -I$(PLUGIN_TOP)
CFLAGS += -I$(PURPLE_TOP)
CFLAGS += -I$(GTK_TOP)/include
CFLAGS += -I$(GTK_TOP)/include/glib-2.0
CFLAGS += -I$(GTK_TOP)/lib/glib-2.0/include
DLL_LD_FLAGS += \
-L$(PURPLE_TOP) -lpurple \
-L$(GTK_TOP)/lib -lglib-2.0
all: build
build: src/$(PLUGIN).dll $(LANG_CATALOGS)
src/$(PLUGIN).dll: $(OBJ)
$(CC) -shared $(OBJ) $(DLL_LD_FLAGS) -o $@
$(OBJ): config.h
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: configure.ac.in .stamp-version-$(PLUGIN_VERSION) ./scripts/gen-configure_ac.sh
./scripts/gen-configure_ac.sh
endif
%.gmo: %.po
rm -f $@
$(GMSGFMT) --statistics -o $@ $<
dist: $(PLUGIN_WIN32_ZIP)
$(PLUGIN_WIN32_ZIP): build
./scripts/gen-mingw-dist.sh $@ $(PLUGIN) $(PLUGIN).dll
clean:
rm -f $(OBJ) $(DEP) src/$(PLUGIN).dll
rm -f config.h .stamp-version*
test -e configure.ac.in && rm -f configure.ac
-include $(DEP)