comparison libpurple/protocols/bonjour/Makefile.mingw @ 17733:d7b50cac1c7a

This is a patch from Chris Davies to make Bonjour work on Windows using the Apple Bonjour framework. It turns out that the actual DNS-SD library is (3 clause) BSD licensed, so we can use it. There are a few changes by me, mainly to fix the howl implementation. Fixes #1117 . There appear to be a few bugs, but I believe that they were also present previously. I'm hoping to do some more tweaking before the next release. The howl implementation will eventually be supersceded by a native avahi implementation, so I opted for a somewhat dirty hack to enable it instead of doing something with config.h.
author Daniel Atallah <daniel.atallah@gmail.com>
date Tue, 05 Jun 2007 03:38:22 +0000
parents 1843c0180fbe
children b87114cdd6ae
comparison
equal deleted inserted replaced
17726:7e856734b712 17733:d7b50cac1c7a
6 6
7 PIDGIN_TREE_TOP := ../../.. 7 PIDGIN_TREE_TOP := ../../..
8 include $(PIDGIN_TREE_TOP)/libpurple/win32/global.mak 8 include $(PIDGIN_TREE_TOP)/libpurple/win32/global.mak
9 9
10 TARGET = libbonjour 10 TARGET = libbonjour
11 NEEDED_DLLS = $(HOWL_TOP)/bin/libhowl-1.dll
12 TYPE = PLUGIN 11 TYPE = PLUGIN
13 12
14 # Static or Plugin... 13 # Static or Plugin...
15 ifeq ($(TYPE),STATIC) 14 ifeq ($(TYPE),STATIC)
16 DEFINES += -DSTATIC 15 DEFINES += -DSTATIC
22 endif 21 endif
23 22
24 ## 23 ##
25 ## INCLUDE PATHS 24 ## INCLUDE PATHS
26 ## 25 ##
27 INCLUDE_PATHS += -I$(BONJOUR_ROOT) \ 26 INCLUDE_PATHS += -I. \
28 -I$(GTK_TOP)/include \ 27 -I$(GTK_TOP)/include \
29 -I$(GTK_TOP)/include/glib-2.0 \ 28 -I$(GTK_TOP)/include/glib-2.0 \
30 -I$(GTK_TOP)/lib/glib-2.0/include \ 29 -I$(GTK_TOP)/lib/glib-2.0/include \
31 -I$(HOWL_TOP)/include \ 30 -I$(BONJOUR_TOP)/include \
32 -I$(PURPLE_TOP) \ 31 -I$(PURPLE_TOP) \
33 -I$(PURPLE_TOP)/win32 \ 32 -I$(PURPLE_TOP)/win32 \
34 -I$(PIDGIN_TREE_TOP) 33 -I$(PIDGIN_TREE_TOP)
35 34
36 LIB_PATHS += -L$(GTK_TOP)/lib \ 35 LIB_PATHS += -L$(GTK_TOP)/lib \
37 -L$(HOWL_TOP)/lib \ 36 -L$(BONJOUR_TOP)/lib \
38 -L$(PURPLE_TOP) 37 -L$(PURPLE_TOP)
39 38
40 ## 39 ##
41 ## SOURCES, OBJECTS 40 ## SOURCES, OBJECTS
42 ## 41 ##
43 C_SRC = bonjour.c \ 42 C_SRC = bonjour.c \
44 buddy.c \ 43 buddy.c \
45 dns_sd.c \ 44 mdns_common.c \
45 mdns_win32.c \
46 jabber.c 46 jabber.c
47 47
48 OBJECTS = $(C_SRC:%.c=%.o) 48 OBJECTS = $(C_SRC:%.c=%.o)
49 49
50 ## 50 ##
52 ## 52 ##
53 LIBS = \ 53 LIBS = \
54 -lglib-2.0 \ 54 -lglib-2.0 \
55 -lws2_32 \ 55 -lws2_32 \
56 -lintl \ 56 -lintl \
57 -lhowl \ 57 -ldnssd \
58 -lpurple 58 -lpurple
59 59
60 include $(PIDGIN_COMMON_RULES) 60 include $(PIDGIN_COMMON_RULES)
61 61
62 ## 62 ##
66 66
67 all: $(TARGET).dll 67 all: $(TARGET).dll
68 68
69 install: all $(DLL_INSTALL_DIR) 69 install: all $(DLL_INSTALL_DIR)
70 cp $(TARGET).dll $(DLL_INSTALL_DIR) 70 cp $(TARGET).dll $(DLL_INSTALL_DIR)
71 cp $(NEEDED_DLLS) $(PURPLE_INSTALL_DIR)
72 71
73 $(OBJECTS): $(PURPLE_CONFIG_H) 72 $(OBJECTS): $(PURPLE_CONFIG_H)
74 73
75 $(TARGET).dll: $(PURPLE_DLL).a $(OBJECTS) 74 $(TARGET).dll: $(PURPLE_DLL).a $(OBJECTS)
76 $(CC) -shared $(OBJECTS) $(LIB_PATHS) $(LIBS) $(DLL_LD_FLAGS) -o $(TARGET).dll 75 $(CC) -shared $(OBJECTS) $(LIB_PATHS) $(LIBS) $(DLL_LD_FLAGS) -o $(TARGET).dll