Mercurial > pidgin
comparison libpurple/protocols/myspace/Makefile.mingw @ 16396:70c069168459
Gaim -> Purple
author | Jeffrey Connelly <jaconnel@calpoly.edu> |
---|---|
date | Sat, 21 Apr 2007 04:18:16 +0000 |
parents | 05e2df434077 |
children | 52357f6392a4 |
comparison
equal
deleted
inserted
replaced
16395:39af416cfda7 | 16396:70c069168459 |
---|---|
1 ## | |
2 # | 1 # |
3 # Makefile.mingw - Win32 mingw Makefile for MySpaceIM prpl | 2 # Makefile.mingw |
4 # | 3 # |
5 # based on: | 4 # Description: Makefile for win32 (mingw) version of libirc |
6 # | |
7 # mockprpl | |
8 # (formerly nullprpl) | |
9 # http://snarfed.org/space/gaim+mock+protocol+plugin | |
10 # Copyright 2004-2007, Ryan Barrett <mockprpl@ryanb.org> | |
11 # | |
12 # Makefile.mingw was contributed by Andrew Hart. | |
13 # http://sourceforge.net/users/arhart/ | |
14 # | |
15 # If the gaim source is not installed in the same directory as mockprpl, change | |
16 # GAIM_TOP to point to it. | |
17 # | |
18 # This program is free software; you can redistribute it and/or modify | |
19 # it under the terms of the GNU General Public License as published by | |
20 # the Free Software Foundation; either version 2 of the License, or | |
21 # (at your option) any later version. | |
22 # | |
23 # This program is distributed in the hope that it will be useful, | |
24 # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
25 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
26 # GNU General Public License for more details. | |
27 # | |
28 # You should have received a copy of the GNU General Public License | |
29 # along with this program; if not, write to the Free Software | |
30 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
31 # | |
32 # | 5 # |
33 | 6 |
34 # | 7 PIDGIN_TREE_TOP := ../../.. |
35 # PATHS | 8 include $(PIDGIN_TREE_TOP)/libpurple/win32/global.mak |
36 # | |
37 | 9 |
38 INCLUDE_DIR := . | 10 TARGET = libirc |
39 GTK_TOP := ../win32-dev/gtk_2_0 | 11 TYPE = PLUGIN |
40 GAIM_TOP := ../gaim-2.0.0beta6 | |
41 MSIM_ROOT := . | |
42 GAIM_INSTALL_DIR := $(GAIM_TOP)/win32-install-dir | |
43 | 12 |
44 ## | 13 # Static or Plugin... |
45 ## VARIABLE DEFINITIONS | 14 ifeq ($(TYPE),STATIC) |
46 ## | 15 DEFINES += -DSTATIC |
47 | 16 DLL_INSTALL_DIR = $(PURPLE_INSTALL_DIR) |
48 TARGET = libmsim | 17 else |
49 | 18 ifeq ($(TYPE),PLUGIN) |
50 # Compiler Options | 19 DLL_INSTALL_DIR = $(PURPLE_INSTALL_PLUGINS_DIR) |
51 | 20 endif |
52 CFLAGS = | 21 endif |
53 | |
54 DEFINES = | |
55 | |
56 # If anyone cares to play with PLUGIN vs STATIC, feel free to change this | |
57 DLL_INSTALL_DIR = $(GAIM_INSTALL_DIR)/plugins | |
58 | |
59 ## Static or Plugin... | |
60 #ifeq ($(TYPE),STATIC) | |
61 # DEFINES += -DSTATIC | |
62 # DLL_INSTALL_DIR = $(GAIM_INSTALL_DIR) | |
63 #else | |
64 #ifeq ($(TYPE),PLUGIN) | |
65 # DLL_INSTALL_DIR = $(GAIM_INSTALL_DIR)/plugins | |
66 #endif | |
67 #endif | |
68 | |
69 | |
70 ## | |
71 ## INCLUDE MAKEFILES | |
72 ## | |
73 | |
74 include $(GAIM_TOP)/libgaim/win32/global.mak | |
75 | 22 |
76 ## | 23 ## |
77 ## INCLUDE PATHS | 24 ## INCLUDE PATHS |
78 ## | 25 ## |
79 | 26 INCLUDE_PATHS += -I. \ |
80 INCLUDE_PATHS += -I$(MSIM_ROOT) \ | |
81 -I$(GTK_TOP)/include \ | 27 -I$(GTK_TOP)/include \ |
82 -I$(GTK_TOP)/include/gtk-2.0 \ | |
83 -I$(GTK_TOP)/include/glib-2.0 \ | 28 -I$(GTK_TOP)/include/glib-2.0 \ |
84 -I$(GTK_TOP)/include/pango-1.0 \ | |
85 -I$(GTK_TOP)/include/atk-1.0 \ | |
86 -I$(GTK_TOP)/lib/glib-2.0/include \ | 29 -I$(GTK_TOP)/lib/glib-2.0/include \ |
87 -I$(GTK_TOP)/lib/gtk-2.0/include \ | 30 -I$(PURPLE_TOP) \ |
88 -I$(GAIM_TOP)/libgaim \ | 31 -I$(PURPLE_TOP)/win32 \ |
89 -I$(GAIM_TOP)/libgaim/win32 \ | 32 -I$(PIDGIN_TREE_TOP) |
90 -I$(GAIM_TOP) | |
91 | |
92 | 33 |
93 LIB_PATHS = -L$(GTK_TOP)/lib \ | 34 LIB_PATHS = -L$(GTK_TOP)/lib \ |
94 -L$(GAIM_TOP)/libgaim | 35 -L$(PURPLE_TOP) |
95 | |
96 | 36 |
97 ## | 37 ## |
98 ## SOURCES, OBJECTS | 38 ## SOURCES, OBJECTS |
99 ## | 39 ## |
100 | 40 C_SRC = cmds.c \ |
101 C_SRC = myspace.c | 41 dcc_send.c \ |
102 | 42 irc.c \ |
43 msgs.c \ | |
44 parse.c | |
103 | 45 |
104 OBJECTS = $(C_SRC:%.c=%.o) | 46 OBJECTS = $(C_SRC:%.c=%.o) |
105 | |
106 | 47 |
107 ## | 48 ## |
108 ## LIBRARIES | 49 ## LIBRARIES |
109 ## | 50 ## |
110 | 51 LIBS = \ |
111 LIBS = -lgtk-win32-2.0 \ | |
112 -lglib-2.0 \ | 52 -lglib-2.0 \ |
113 -lgdk-win32-2.0 \ | |
114 -lgmodule-2.0 \ | |
115 -lgobject-2.0 \ | |
116 -lws2_32 \ | 53 -lws2_32 \ |
117 -lintl \ | 54 -lintl \ |
118 -lgaim | 55 -lpurple |
119 | 56 |
120 | 57 include $(PIDGIN_COMMON_RULES) |
121 ## | |
122 ## RULES | |
123 ## | |
124 | |
125 # How to make a C file | |
126 | |
127 %.o: %.c | |
128 $(CC) $(CFLAGS) $(DEFINES) $(INCLUDE_PATHS) -o $@ -c $< | |
129 | 58 |
130 ## | 59 ## |
131 ## TARGET DEFINITIONS | 60 ## TARGET DEFINITIONS |
132 ## | 61 ## |
133 | 62 .PHONY: all install clean |
134 .PHONY: all clean | |
135 | 63 |
136 all: $(TARGET).dll | 64 all: $(TARGET).dll |
137 | 65 |
138 install: $(TARGET).dll | 66 install: all $(DLL_INSTALL_DIR) |
139 cp $(MSIM_ROOT)/$(TARGET).dll $(DLL_INSTALL_DIR) | 67 cp $(TARGET).dll $(DLL_INSTALL_DIR) |
140 | 68 |
141 | 69 $(OBJECTS): $(PURPLE_CONFIG_H) |
142 ## | |
143 ## BUILD Dependencies | |
144 ## | |
145 | |
146 $(GAIM_TOP)/libgaim/gaim.lib: | |
147 $(MAKE) -C $(GAIM_TOP)/libgaim -f Makefile.mingw gaim.lib | |
148 | 70 |
149 ## | 71 ## |
150 ## BUILD DLL | 72 ## BUILD DLL |
151 ## | 73 ## |
152 | 74 $(TARGET).dll: $(PURPLE_DLL).a $(OBJECTS) |
153 $(TARGET).dll: $(GAIM_LIBGAIM_DLL).a $(OBJECTS) | 75 $(CC) -shared $(OBJECTS) $(LIB_PATHS) $(LIBS) $(DLL_LD_FLAGS) -o $(TARGET).dll |
154 $(CC) -shared $(OBJECTS) $(LIB_PATHS) $(LIBS) $(DLL_LD_FLAGS) -Wl,--out-implib,$(TARGET).lib -o $(TARGET).dll | |
155 | |
156 | 76 |
157 ## | 77 ## |
158 ## CLEAN RULES | 78 ## CLEAN RULES |
159 ## | 79 ## |
160 | 80 |
161 clean: | 81 clean: |
162 rm -rf *.o | 82 rm -f $(OBJECTS) |
163 rm -rf $(TARGET).dll | 83 rm -f $(TARGET).dll |
164 rm -rf $(TARGET).lib | 84 |
85 include $(PIDGIN_COMMON_TARGETS) |