Mercurial > pidgin.yaz
comparison libgaim/protocols/bonjour/Makefile.mingw @ 14315:8793fc8f7064
[gaim-migrate @ 17008]
Lee Roach revamped the win32 makefiles. This makes me happy, they were in dire need of some loving.
This makes life a great deal easier for anyone who wants to build out-of-tree plugins.
committer: Tailor Script <tailor@pidgin.im>
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Wed, 23 Aug 2006 21:34:43 +0000 |
parents | 82373bb6a47a |
children | 12cb76aeb21c |
comparison
equal
deleted
inserted
replaced
14314:8b8188fa98f4 | 14315:8793fc8f7064 |
---|---|
2 # Makefile.mingw | 2 # Makefile.mingw |
3 # | 3 # |
4 # Description: Makefile for win32 (mingw) version of libbonjour | 4 # Description: Makefile for win32 (mingw) version of libbonjour |
5 # | 5 # |
6 | 6 |
7 # | 7 GAIM_TOP := ../../.. |
8 # PATHS | 8 include $(GAIM_TOP)/libgaim/win32/global.mak |
9 # | |
10 | |
11 GTK_TOP := ../../../../win32-dev/gtk_2_0 | |
12 GAIM_TOP := ../../.. | |
13 LIBGAIM_TOP := ../.. | |
14 BONJOUR_ROOT := . | |
15 GAIM_INSTALL_DIR := $(GAIM_TOP)/win32-install-dir | |
16 HOWL_DIR := $(GAIM_TOP)/../win32-dev/howl-1.0.0 | |
17 | |
18 ## | |
19 ## VARIABLE DEFINITIONS | |
20 ## | |
21 | 9 |
22 TARGET = libbonjour | 10 TARGET = libbonjour |
23 | 11 NEEDED_DLLS = $(HOWL_TOP)/bin/libhowl-1.dll |
24 NEEDED_DLLS = $(HOWL_DIR)/bin/libhowl-1.dll | |
25 | |
26 # Compiler Options | |
27 | |
28 CFLAGS = | |
29 | |
30 DEFINES = | |
31 | 12 |
32 # Static or Plugin... | 13 # Static or Plugin... |
33 ifeq ($(TYPE),STATIC) | 14 ifeq ($(TYPE),STATIC) |
34 DEFINES += -DSTATIC | 15 DEFINES += -DSTATIC |
35 DLL_INSTALL_DIR = $(GAIM_INSTALL_DIR) | 16 DLL_INSTALL_DIR = $(GAIM_INSTALL_DIR) |
36 else | 17 else |
37 ifeq ($(TYPE),PLUGIN) | 18 ifeq ($(TYPE),PLUGIN) |
38 DLL_INSTALL_DIR = $(GAIM_INSTALL_DIR)/plugins | 19 DLL_INSTALL_DIR = $(GAIM_INSTALL_PLUGINS_DIR) |
39 endif | 20 endif |
40 endif | 21 endif |
41 | |
42 | |
43 ## | |
44 ## INCLUDE MAKEFILES | |
45 ## | |
46 | |
47 include $(LIBGAIM_TOP)/win32/global.mak | |
48 | 22 |
49 ## | 23 ## |
50 ## INCLUDE PATHS | 24 ## INCLUDE PATHS |
51 ## | 25 ## |
52 | |
53 INCLUDE_PATHS += -I$(BONJOUR_ROOT) \ | 26 INCLUDE_PATHS += -I$(BONJOUR_ROOT) \ |
54 -I$(GTK_TOP)/include \ | 27 -I$(GTK_TOP)/include \ |
55 -I$(GTK_TOP)/include/glib-2.0 \ | 28 -I$(GTK_TOP)/include/glib-2.0 \ |
56 -I$(GTK_TOP)/lib/glib-2.0/include \ | 29 -I$(GTK_TOP)/lib/glib-2.0/include \ |
57 -I$(HOWL_DIR)/include \ | 30 -I$(HOWL_TOP)/include \ |
58 -I$(LIBGAIM_TOP) \ | 31 -I$(GAIM_LIB_TOP) \ |
59 -I$(LIBGAIM_TOP)/win32 \ | 32 -I$(GAIM_LIB_TOP)/win32 \ |
60 -I$(GAIM_TOP) | 33 -I$(GAIM_TOP) |
61 | 34 |
62 | |
63 LIB_PATHS = -L$(GTK_TOP)/lib \ | 35 LIB_PATHS = -L$(GTK_TOP)/lib \ |
64 -L$(HOWL_DIR)/lib \ | 36 -L$(HOWL_TOP)/lib \ |
65 -L$(LIBGAIM_TOP) | 37 -L$(GAIM_LIB_TOP) |
66 | |
67 | 38 |
68 ## | 39 ## |
69 ## SOURCES, OBJECTS | 40 ## SOURCES, OBJECTS |
70 ## | 41 ## |
71 | |
72 C_SRC = bonjour.c \ | 42 C_SRC = bonjour.c \ |
73 buddy.c \ | 43 buddy.c \ |
74 dns_sd.c \ | 44 dns_sd.c \ |
75 jabber.c | 45 jabber.c |
76 | 46 |
77 | |
78 OBJECTS = $(C_SRC:%.c=%.o) | 47 OBJECTS = $(C_SRC:%.c=%.o) |
79 | |
80 | 48 |
81 ## | 49 ## |
82 ## LIBRARIES | 50 ## LIBRARIES |
83 ## | 51 ## |
84 | |
85 LIBS = \ | 52 LIBS = \ |
86 -lglib-2.0 \ | 53 -lglib-2.0 \ |
87 -lws2_32 \ | 54 -lws2_32 \ |
88 -lintl \ | 55 -lintl \ |
89 -lhowl \ | 56 -lhowl \ |
90 -lgaim | 57 -lgaim |
91 | 58 |
92 | 59 include $(GAIM_COMMON_RULES) |
93 ## | |
94 ## RULES | |
95 ## | |
96 | |
97 # How to make a C file | |
98 | |
99 %.o: %.c | |
100 $(CC) $(CFLAGS) $(DEFINES) $(INCLUDE_PATHS) -o $@ -c $< | |
101 | 60 |
102 ## | 61 ## |
103 ## TARGET DEFINITIONS | 62 ## TARGET DEFINITIONS |
104 ## | 63 ## |
105 | |
106 .PHONY: all clean | 64 .PHONY: all clean |
107 | 65 |
108 all: $(TARGET).dll | 66 all: $(TARGET).dll |
109 | 67 |
110 install: | 68 install: all $(DLL_INSTALL_DIR) |
111 cp $(BONJOUR_ROOT)/$(TARGET).dll $(DLL_INSTALL_DIR) | 69 cp $(TARGET).dll $(DLL_INSTALL_DIR) |
112 cp $(NEEDED_DLLS) $(GAIM_INSTALL_DIR) | 70 cp $(NEEDED_DLLS) $(GAIM_INSTALL_DIR) |
113 | 71 |
72 $(OBJECTS): $(GAIM_CONFIG_H) | |
114 | 73 |
115 ## | 74 $(TARGET).dll: $(GAIM_LIBGAIM_DLL).a $(OBJECTS) |
116 ## BUILD Dependencies | |
117 ## | |
118 | |
119 $(LIBGAIM_TOP)/libgaim.dll.a: | |
120 $(MAKE) -C $(LIBGAIM_TOP) -f Makefile.mingw libgaim.dll.a | |
121 | |
122 ## | |
123 ## BUILD DLL | |
124 ## | |
125 | |
126 $(TARGET).dll: $(OBJECTS) $(LIBGAIM_TOP)/libgaim.dll.a | |
127 $(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 |
128 | 76 |
129 ## | 77 ## |
130 ## CLEAN RULES | 78 ## CLEAN RULES |
131 ## | 79 ## |
132 | 80 |
133 clean: | 81 clean: |
134 rm -rf *.o | 82 rm -rf $(OBJECTS) |
135 rm -rf $(TARGET).dll | 83 rm -rf $(TARGET).dll |
84 | |
85 include $(GAIM_COMMON_TARGETS) |