-
Notifications
You must be signed in to change notification settings - Fork 12
/
makefile.mingw
47 lines (32 loc) · 1.48 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
PIDGIN_TREE_TOP ?= ../pidgin-2.14.10
WIN32_DEV_TOP ?= $(PIDGIN_TREE_TOP)/../win32-dev
#only defined on 64-bit windows
PROGFILES32 = ${ProgramFiles(x86)}
ifndef PROGFILES32
PROGFILES32 = $(PROGRAMFILES)
endif
PLUGIN_DIR_PURPLE = "$(PROGFILES32)/Pidgin/plugins"
CC ?= $(WIN32_DEV_TOP)/mingw-4.7.2/bin/gcc
CFLAGS ?= -O2 -g -ggdb -pipe
LDFLAGS ?= -ljabber -lpurple -lintl -lglib-2.0 -lgio-2.0 -lxml2 -static-libgcc -lz
PKG_CONFIG ?= pkg-config
DIR_PERM = 0755
FILE_PERM = 0644
HEADERS = -I./headers/jabber
CFLAGS += -I$(WIN32_DEV_TOP)/gtk_2_0-2.14/include -I$(WIN32_DEV_TOP)/gtk_2_0-2.14/include/glib-2.0 -I$(WIN32_DEV_TOP)/gtk_2_0-2.14/lib/glib-2.0/include -I$(WIN32_DEV_TOP)/gtk_2_0-2.14/gio-2.0 -DENABLE_NLS -I$(PIDGIN_TREE_TOP)/libpurple -I$(PIDGIN_TREE_TOP) -I$(WIN32_DEV_TOP)/libxml2-2.9.2_daa1/include/libxml2 $(HEADERS)
LIBS += -L$(PIDGIN_TREE_TOP)/libpurple -L$(PIDGIN_TREE_TOP)/libpurple/protocols/jabber/ -L$(WIN32_DEV_TOP)/gtk_2_0-2.14/lib -L$(WIN32_DEV_TOP)/libxml2-2.9.2_daa1/lib
PRPL_NAME = jabber_http_file_upload.dll
PRPL_LIBNAME = ${PRPL_NAME}
PRPL_SOURCES = \
src/hfu_disco.c \
src/hfu_util.c \
src/jabber_http_file_upload.c
.PHONY: all clean install
all: $(PRPL_NAME)
install: $(PRPL_LIBNAME)
mkdir -m $(DIR_PERM) -p $(DESTDIR)$(PLUGIN_DIR_PURPLE)
install -m $(FILE_PERM) $(PRPL_LIBNAME) $(DESTDIR)$(PLUGIN_DIR_PURPLE)/$(PRPL_NAME)
clean:
rm -f $(PRPL_NAME)
$(PRPL_NAME): $(PRPL_SOURCES)
$(CC) -Wall -I. $(CFLAGS) $(PRPL_SOURCES) -o $@ $(CFLAGS) $(LIBS) $(LDFLAGS) -shared