4 # Author: zup@sbox.tugraz.at
6 # Description: Makefile for win32 (mingw) version of libsipe
9 OLD_PIDGIN_TREE_TOP := $(PIDGIN_TREE_TOP)
10 PIDGIN_TREE_TOP := ../$(OLD_PIDGIN_TREE_TOP)
12 include $(PIDGIN_TREE_TOP)/libpurple/win32/global.mak
14 LIBICONV_TOP = $(WIN32_DEV_TOP)/libiconv-1.13.1-1
15 GMIME_TOP = $(WIN32_DEV_TOP)/gmime-2.4.15
21 # dump higher level defines
27 DLL_INSTALL_DIR = $(PURPLE_INSTALL_DIR)
30 DLL_INSTALL_DIR = $(PURPLE_INSTALL_PLUGINS_DIR)
34 DEFINES += -DENABLE_NLS=1
35 DEFINES += -DPACKAGE_BUGREPORT=\"https://sourceforge.net/tracker/?atid=949931\&group_id=194563\"
36 DEFINES += -DPACKAGE_NAME=\"pidgin-sipe\"
37 DEFINES += -DPACKAGE_URL=\"http://sipe.sourceforge.net/\"
38 DEFINES += -DPACKAGE_VERSION=\"$(VERSION)\"
39 #Whether to use Windows native SSPI security package (Kerberos, NTLM; SSO)
40 #or use SIPE custom NTLMv2 implementation only (No Kerberos; No SSO).
41 DEFINES += -DHAVE_LIBKRB5=1
42 DEFINES += -DHAVE_NSS=1
43 DEFINES += -DHAVE_GMIME=1
48 INCLUDE_PATHS += -I. \
51 -I$(GTK_TOP)/include \
52 -I$(GTK_TOP)/include/glib-2.0 \
53 -I$(GTK_TOP)/lib/glib-2.0/include \
54 -I$(LIBICONV_TOP)/include \
55 -I$(GMIME_TOP)/include/gmime-2.4 \
56 -I$(LIBXML2_TOP)/include/libxml2 \
57 -I$(NSPR_TOP)/include \
60 PURPLE_INCLUDE_PATHS += \
62 -I$(PURPLE_TOP)/win32 \
86 sipe-subscriptions.c \
101 ../purple/purple-chat.c \
102 ../purple/purple-connection.c \
103 ../purple/purple-debug.c \
104 ../purple/purple-dnsquery.c \
105 ../purple/purple-ft.c \
106 ../purple/purple-groupchat.c \
107 ../purple/purple-im.c \
108 ../purple/purple-markup.c \
109 ../purple/purple-network.c \
110 ../purple/purple-notify.c \
111 ../purple/purple-plugin.c \
112 ../purple/purple-schedule.c \
113 ../purple/purple-setting.c \
114 ../purple/purple-transport.c \
115 ../purple/purple-user.c \
119 C_TEST_SRC = sipe-xml-tests.c \
120 sip-sec-ntlm-tests.c \
123 C_SRC = $(CLEAN_C_SRC) $(PURPLE_C_SRC)
125 CLEAN_OBJECTS = $(CLEAN_C_SRC:%.c=%.o)
126 PURPLE_OBJECTS = $(PURPLE_C_SRC:%.c=%.o)
127 OBJECTS = $(CLEAN_OBJECTS) $(PURPLE_OBJECTS)
129 # Only these modules need the purple headers
130 $(PURPLE_OBJECTS): INCLUDE_PATHS += $(PURPLE_INCLUDE_PATHS)
132 TEST_OBJECTS = $(C_TEST_SRC:%.c=%.o)
136 $(GMIME_TOP)/lib/libgmime-2.4.a \
137 -L$(LIBICONV_TOP)/lib \
139 -L$(LIBXML2_TOP)/lib \
157 # These flags are used in mingw build
158 TESTS_WARN = -Werror -Wall -Wextra -Waggregate-return -Wcast-align -Winit-self -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wundef
160 include $(PIDGIN_COMMON_RULES)
163 ## TARGET DEFINITIONS
165 .PHONY: all clean install
169 $(OBJECTS): $(PURPLE_CONFIG_H)
171 $(TARGET).dll: $(PURPLE_DLL).a $(OBJECTS)
172 $(CC) -shared $(OBJECTS) $(LIB_PATHS) $(LIBS) $(DLL_LD_FLAGS) -o $(TARGET).dll
185 test -z "$(DLL_INSTALL_DIR)" || mkdir -p "$(DLL_INSTALL_DIR)"
186 /usr/bin/install -c $(TARGET).dll '$(DLL_INSTALL_DIR)'
190 tests: tests-clean $(TEST_OBJECTS)
191 $(CC) sipe-utils.o uuid.o sipe-xml.o sipe-xml-tests.o -L. $(LIB_PATHS) $(LIBS) -lsipe -o sipe-xml-tests.exe
192 $(CC) ../purple/purple-debug.o ../purple/purple-markup.o ../purple/purple-network.o md4.o sipe-digest.o sipe-crypt.o sipe-mime.o sipe-sign.o sipmsg.o sipe-utils.o uuid.o sip-sec-ntlm-tests.o ../purple/tests.o -L. $(LIB_PATHS) $(LIBS) -lsipe -o ../purple/tests.exe
197 rm -f $(TEST_OBJECTS)
198 rm -f sipe-xml-tests.exe ../purple/tests.exe
200 include $(PIDGIN_COMMON_TARGETS)