-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.cyg
89 lines (74 loc) · 3.18 KB
/
Makefile.cyg
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
# MSYS2 makefile for SkypeWeb
PIDGIN_BUILD_DIR = /cygdrive/c/Devp/pidgin-2.11.0
COMPILER ?= i686-w64-mingw32-gcc.exe
#i686-w64-mingw32-gcc.exe
#/cygdrive/c/Devp/win32-dev/mingw-gcc-4.7.2/bin/gcc.exe
OBJCOPY ?= objcopy.exe
MAKENSIS ?= makensis.exe
PIDGIN_VARIANT ?= Pidgin
PRODUCT_NAME ?= $(PIDGIN_VARIANT) SkypeWeb
INSTALLER_NAME ?= $(PRODUCT_NAME) Setup
#REVISION_ID = $(shell git rev-parse --short HEAD)
#REVISION_NUMBER = $(shell git rev-list --count HEAD)
#ifneq ($(REVISION_ID),)
#PRODUCT_VERSION ?= R$(REVISION_NUMBER).$(REVISION_ID)
#else
PRODUCT_VERSION = $(shell date +%d-%b-%Y)
#2.0
#endif
TMPDIR = c:/Devp/tmp
MINGW_PREFIX = $(shell which gcc | awk -F/bin/ '{ printf $$1 }')
LIBPURPLE_CFLAGS = -DPURPLE_PLUGINS -DENABLE_NLS -DHAVE_ZLIB
CFLAGS = -Wno-format -I${PIDGIN_BUILD_DIR}/libpurple -I${PIDGIN_BUILD_DIR}/libpurple/win32 $(shell pkg-config --cflags json-glib-1.0)
LIBS = -L/cygdrive/c/Devp/dlls -lglib-2.0 -lgobject-2.0 -lintl -lpurple -lws2_32 -ljson-glib-1.0 -lz -lnss3
#MINGW_PREFIX = $(shell which gcc | awk -F/bin/ '{ printf $$1 }')
#LIBPURPLE_CFLAGS = -DPURPLE_PLUGINS -DENABLE_NLS -DHAVE_ZLIB
#CFLAGS = -Wno-format -I${PIDGIN_BUILD_DIR}/libpurple -I${PIDGIN_BUILD_DIR}/libpurple/win32 $(shell pkg-config --cflags json-glib-1.0) \
#-I/cygdrive/c/Devp/skypeweb/ \
#-I/ \
#-I/cygdrive/c/Devp/skypeweb/ \
#-I/c/Devp/pidgin-2.11.0/libpurple \
#-I/c/Devp/pidgin-2.11.0/libpurple\win32 \
#-I/c/Devp/win32-dev/glib-dev_2.28.8/include \
#-I/c/Devp/win32-dev/glib-dev_2.28.8/include/glib-2.0 \
#-I/c/Devp/win32-dev/glib-dev_2.28.8/lib/glib-2.0/include
#LIBS = -L${PIDGIN_BUILD_DIR}/libpurple -lglib-2.0 -lgobject-2.0 -lintl -lpurple -lws2_32 -ljson-glib-1.0 -lz -lnss3 \
#-L/ \
#-L/cygdrive/c/Devp/skypeweb/ \
#-L/c/Devp/pidgin-2.11.0/libpurple \
#-L/c/Devp/pidgin-2.11.0/libpurple\win32 \
#-L/c/Devp/win32-dev/glib-dev_2.28.8/include \
#-L/c/Devp/win32-dev/glib-dev_2.28.8/include/glib-2.0 \
#-L/c/Devp/win32-dev/glib-dev_2.28.8/lib/glib-2.0/include
JSON_GLIB_DLL = libjson-glib-1.0-0.dll
SKYPEWEB_SOURCES = \
skypeweb_connection.c \
skypeweb_contacts.c \
skypeweb_login.c \
skypeweb_messages.c \
skypeweb_util.c \
libskypeweb.c
.PHONY: all clean install
all: libskypeweb.dll
libskypeweb.dll: ${SKYPEWEB_SOURCES}
${COMPILER} -static-libgcc ${LIBPURPLE_CFLAGS} -Wall -I. -g -O2 -pipe ${SKYPEWEB_SOURCES} -o $@ -shared ${CFLAGS} ${LIBS}
${OBJCOPY} --only-keep-debug $@ $@.dbg
${OBJCOPY} --strip-debug $@
${OBJCOPY} --add-gnu-debuglink=$@.dbg $@
libskypeweb-debug.dll: ${SKYPEWEB_SOURCES}
${COMPILER} ${LIBPURPLE_CFLAGS} -Wall -I. -g -O0 -pipe ${SKYPEWEB_SOURCES} -o $@ -shared ${CFLAGS} ${LIBS}
installer: libskypeweb.dll
cp $(MINGW_PREFIX)/bin/$(JSON_GLIB_DLL) .
$(MAKENSIS) \
-DPRODUCT_NAME="$(PRODUCT_NAME)" \
-DINSTALLER_NAME="$(INSTALLER_NAME)" \
-DPRODUCT_VERSION="$(PRODUCT_VERSION)" \
-DPIDGIN_VARIANT="$(PIDGIN_VARIANT)" \
-DJSON_GLIB_DLL="$(JSON_GLIB_DLL)" \
pidgin-skypeweb.nsi
clean:
rm -f $(JSON_GLIB_DLL) libskypeweb.dll libskypeweb-debug.dll *.dll.dbg *.exe
install:
rm -f "/cygdrive/c/Program Files/Pidgin/plugins/libskypeweb.dll"
cp /cygdrive/c/Devp/skypeweb/libskypeweb.dll "/cygdrive/c/Program Files/Pidgin/plugins/libskypeweb.dll"
"/cygdrive/c/Program Files/Pidgin/pidgin.exe" &