Mercurial > pidgin.yaz
comparison src/protocols/jabber/Makefile.mingw @ 3630:9682c0e022c6
[gaim-migrate @ 3753]
Yeah this will probably break a lot of shit knowing my luck. But hey, I really don't care what people thnk.
committer: Tailor Script <tailor@pidgin.im>
author | Rob Flynn <gaim@robflynn.com> |
---|---|
date | Fri, 11 Oct 2002 03:14:01 +0000 |
parents | |
children | fd3880c03f0d |
comparison
equal
deleted
inserted
replaced
3629:afc5bb164c5a | 3630:9682c0e022c6 |
---|---|
1 # | |
2 # Makefile.mingw | |
3 # | |
4 # Description: Makefile for win32 (mingw) version of libjabber | |
5 # | |
6 | |
7 # | |
8 # PATHS | |
9 # | |
10 | |
11 INCLUDE_DIR := . | |
12 GTK_TOP := ../../../../win32-dev/gtk_2_0 | |
13 GAIM_TOP := ../../.. | |
14 JABBER_ROOT := . | |
15 GAIM_INSTALL_DIR := $(GAIM_TOP)/win32-install-dir | |
16 | |
17 ## | |
18 ## VARIABLE DEFINITIONS | |
19 ## | |
20 | |
21 TARGET = libjabber | |
22 | |
23 VERSION := $(shell cat $(GAIM_TOP)/VERSION) | |
24 | |
25 # Compiler Options | |
26 | |
27 CC = gcc | |
28 | |
29 CFLAGS = -O2 -Werror -Wall -mno-cygwin -fnative-struct | |
30 | |
31 DEFINES = -DAIM_BUILDDATE=\"`date +%Y%m%d`\" \ | |
32 -DAIM_BUILDTIME=\"`date +%H%M%S`\" \ | |
33 -DVERSION=\"$(VERSION)\" \ | |
34 -DHAVE_CONFIG_H | |
35 | |
36 # Static or Plugin... | |
37 ifeq ($(TYPE),STATIC) | |
38 DEFINES += -DSTATIC | |
39 DLL_INSTALL_DIR = $(GAIM_INSTALL_DIR) | |
40 else | |
41 ifeq ($(TYPE),PLUGIN) | |
42 DLL_INSTALL_DIR = $(GAIM_INSTALL_DIR)/plugins | |
43 endif | |
44 endif | |
45 | |
46 | |
47 ## | |
48 ## INCLUDE MAKEFILES | |
49 ## | |
50 | |
51 | |
52 ## | |
53 ## INCLUDE PATHS | |
54 ## | |
55 | |
56 INCLUDE_PATHS += -I$(JABBER_ROOT) \ | |
57 -I$(JABBER_ROOT)/win32 \ | |
58 -I$(GTK_TOP)/include \ | |
59 -I$(GTK_TOP)/include/gtk-2.0 \ | |
60 -I$(GTK_TOP)/include/glib-2.0 \ | |
61 -I$(GTK_TOP)/include/pango-1.0 \ | |
62 -I$(GTK_TOP)/include/atk-1.0 \ | |
63 -I$(GTK_TOP)/lib/glib-2.0/include \ | |
64 -I$(GTK_TOP)/lib/gtk-2.0/include \ | |
65 -I$(GAIM_TOP)/src \ | |
66 -I$(GAIM_TOP)/src/win32 \ | |
67 -I$(GAIM_TOP) | |
68 | |
69 | |
70 LIB_PATHS = -L$(GTK_TOP)/lib \ | |
71 -L$(GAIM_TOP)/src | |
72 | |
73 | |
74 ## | |
75 ## SOURCES, OBJECTS | |
76 ## | |
77 | |
78 C_SRC = jabber.c \ | |
79 expat.c \ | |
80 genhash.c \ | |
81 hashtable.c \ | |
82 jconn.c \ | |
83 jid.c \ | |
84 jpacket.c \ | |
85 jutil.c \ | |
86 karma.c \ | |
87 log.c \ | |
88 pool.c \ | |
89 pproxy.c \ | |
90 rate.c \ | |
91 sha.c \ | |
92 snprintf.c \ | |
93 socket.c \ | |
94 str.c \ | |
95 xhash.c \ | |
96 xmlnode.c \ | |
97 xmlparse.c \ | |
98 xmlrole.c \ | |
99 xmltok.c \ | |
100 xstream.c \ | |
101 win32/posix.uname.c | |
102 | |
103 | |
104 OBJECTS = $(C_SRC:%.c=%.o) | |
105 | |
106 | |
107 ## | |
108 ## LIBRARIES | |
109 ## | |
110 | |
111 LIBS = -lgtk-win32-2.0 -lglib-2.0 -lgdk-win32-2.0 -lgmodule-2.0 -lgobject-2.0 -lws2_32 -lintl -lgaim | |
112 | |
113 # -liberty | |
114 | |
115 | |
116 ## | |
117 ## RULES | |
118 ## | |
119 | |
120 # How to make a C file | |
121 | |
122 %.o: %.c | |
123 $(CC) $(CFLAGS) $(DEFINES) $(INCLUDE_PATHS) -o $@ -c $< | |
124 | |
125 ## | |
126 ## TARGET DEFINITIONS | |
127 ## | |
128 | |
129 .PHONY: all clean | |
130 | |
131 all: $(TARGET).dll | |
132 | |
133 install: | |
134 cp $(JABBER_ROOT)/$(TARGET).dll $(DLL_INSTALL_DIR) | |
135 | |
136 | |
137 ## | |
138 ## BUILD Dependencies | |
139 ## | |
140 | |
141 $(GAIM_TOP)/src/gaim.lib: | |
142 $(MAKE) -C $(GAIM_TOP)/src -f Makefile.mingw gaim.lib | |
143 | |
144 ## | |
145 ## BUILD DLL | |
146 ## | |
147 | |
148 $(TARGET).def: $(OBJECTS) | |
149 dlltool --dllname $(TARGET).dll -z $(TARGET).def \ | |
150 $(OBJECTS) | |
151 | |
152 $(TARGET).base: $(OBJECTS) $(GAIM_TOP)/src/gaim.lib | |
153 gcc -mdll -o junk.tmp -Wl,--base-file,$@ $(OBJECTS) $(LIB_PATHS) $(LIBS) | |
154 rm -rf junk.tmp | |
155 | |
156 $(TARGET).exp: $(TARGET).def $(TARGET).base | |
157 dlltool --dllname $(TARGET).dll --base-file $(TARGET).base \ | |
158 --output-exp $(TARGET).exp --def $(TARGET).def | |
159 rm -rf $(TARGET).base | |
160 | |
161 $(TARGET).dll: $(OBJECTS) $(TARGET).exp $(GAIM_TOP)/src/gaim.lib | |
162 dlltool -D $(TARGET).dll -d $(TARGET).def -l $(TARGET).lib | |
163 gcc -mdll -o $(TARGET).dll $(OBJECTS) -Wl,$(TARGET).exp $(LIB_PATHS) $(LIBS) | |
164 rm -rf $(TARGET).exp | |
165 | |
166 | |
167 ## | |
168 ## CLEAN RULES | |
169 ## | |
170 | |
171 clean: | |
172 rm -rf *.o | |
173 rm -rf ./win32/*.o | |
174 rm -rf $(TARGET).dll | |
175 rm -rf $(TARGET).lib | |
176 rm -rf $(TARGET).def |