-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile.mingw
109 lines (84 loc) · 2.39 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#
# Makefile.mingw
#
# Description: Makefile
#
ifndef PIDGIN_TREE_TOP
$(error Please make sure PIDGIN_TREE_TOP is defined!)
endif
include $(PIDGIN_TREE_TOP)/libpurple/win32/global.mak
TARGET = expand
DEFINES += -DGETTEXT_PACKAGE=\"${TARGET}\"
DEFINES += -DPACKAGE_VERSION=\"$(PACKAGE_VERSION)\"
DEFINES += -DPURPLE_PLUGINS
export PACKAGE_VERSION=$(shell grep ^PACKAGE_VERSION= configure | cut -d "'" -f 2)
PO_INSTALL_SCRIPT = po_expand.nsi
##
## INCLUDE PATHS
##
INCLUDE_PATHS += -I. \
-I$(GTK_TOP)/include \
-I$(GTK_TOP)/include/gtk-2.0 \
-I$(GTK_TOP)/include/glib-2.0 \
-I$(GTK_TOP)/include/pango-1.0 \
-I$(GTK_TOP)/include/atk-1.0 \
-I$(GTK_TOP)/include/cairo \
-I$(GTK_TOP)/lib/glib-2.0/include \
-I$(GTK_TOP)/lib/gtk-2.0/include \
-I$(PURPLE_TOP) \
-I$(PURPLE_TOP)/win32 \
-I$(PIDGIN_TOP) \
-I$(PIDGIN_TOP)/win32 \
-I$(PIDGIN_TREE_TOP)
LIB_PATHS += -L$(GTK_TOP)/lib \
-L$(PURPLE_TOP) \
-L$(PIDGIN_TOP)
##
## SOURCES, OBJECTS
##
C_SRC = \
expand.c \
local_util.c \
OBJECTS = $(C_SRC:%.c=%.o)
##
## LIBRARIES
##
LIBS = -lgtk-win32-2.0 \
-lglib-2.0 \
-lgdk-win32-2.0 \
-lgobject-2.0 \
-lintl \
-lpurple \
-lgdk_pixbuf-2.0 \
-lpidgin
include $(PIDGIN_COMMON_RULES)
##
## TARGET DEFINITIONS
##
.PHONY: all install clean installer dist
ifeq ($(strip $(PACKAGE_VERSION)),)
$(error Version wasn't defined! Did you run configure? If you want, this can be set on the command line)
endif
all: $(TARGET).dll
$(MAKE) -C po -f Makefile.mingw $@
$(OBJECTS): $(PIDGIN_CONFIG_H)
$(TARGET).dll: $(PURPLE_DLL).a $(PIDGIN_DLL).a $(OBJECTS)
$(CC) -shared $(OBJECTS) $(LIB_PATHS) $(LIBS) $(DLL_LD_FLAGS) -g -o $(TARGET).dll
mv $(TARGET).dll $(TARGET).dll.dbgsym
$(STRIP) -g $(TARGET).dll.dbgsym -o $(TARGET).dll
$(PO_INSTALL_SCRIPT):
@echo "; Automatically generated installer script include for translation .mo files" > $@
@for file in po/*gmo ; do file=`basename $$file`; lang=`basename $$file .gmo`; echo "SetOutPath \"\$$INSTDIR\\locale\\$$lang\\LC_MESSAGES\\\"" >> $@ ; echo "File /oname=expand.mo .\\po\\$$file" >>$@ ; done
installer: all dist
dist: $(PO_INSTALL_SCRIPT)
$(MAKE) -C po -f $(MINGW_MAKEFILE) $@
makensis -DPACKAGE_VERSION=$(PACKAGE_VERSION) expand.nsi
##
## CLEAN RULES
##
clean:
rm -rf $(OBJECTS)
rm -rf $(TARGET).dll $(TARGET).dll.dbgsym
$(MAKE) -C po -f Makefile.mingw $@
rm -f $(PO_INSTALL_SCRIPT)
include $(PIDGIN_COMMON_TARGETS)