Mercurial > pidgin
comparison src/Makefile.mingw @ 3638:d26752101ae4
[gaim-migrate @ 3761]
Howd did I miss this?
committer: Tailor Script <tailor@pidgin.im>
author | Rob Flynn <gaim@robflynn.com> |
---|---|
date | Fri, 11 Oct 2002 04:41:44 +0000 |
parents | |
children | 764d6f1848b2 |
comparison
equal
deleted
inserted
replaced
3637:424e5c4759d0 | 3638:d26752101ae4 |
---|---|
1 # | |
2 # Makefile.mingw | |
3 # | |
4 # Description: Makefile for win32 (mingw) version of Gaim | |
5 # | |
6 | |
7 # | |
8 # PATHS | |
9 # | |
10 | |
11 BUILD_TOOLS = /usr/local/mingw | |
12 | |
13 INCLUDE_DIR := . | |
14 GTK_TOP := ../../win32-dev/gtk_2_0 | |
15 GAIM_TOP := .. | |
16 GAIM_SRC := . | |
17 PERL_LIB_DIR := ../../win32-dev/perl56 | |
18 PERL_INCLUDE := $(PERL_LIB_DIR)/CORE | |
19 GAIM_INSTALL_DIR := $(GAIM_TOP)/win32-install-dir | |
20 | |
21 ## | |
22 ## VARIABLE DEFINITIONS | |
23 ## | |
24 | |
25 TARGET = gaim | |
26 | |
27 VERSION := $(shell cat $(GAIM_TOP)/VERSION) | |
28 | |
29 # Compiler and Linker Options | |
30 | |
31 GCOPTS = -B $(BUILD_TOOLS) | |
32 | |
33 CC = gcc.exe $(GCOPTS) | |
34 | |
35 CFLAGS = -g -mno-cygwin -fnative-struct | |
36 | |
37 DEFINES = -DHAVE_CONFIG_H -DVERSION=\"$(VERSION)\" -DGTK_ENABLE_BROKEN | |
38 | |
39 LDFLAGS = -mwindows | |
40 | |
41 #-mconsole | |
42 #-mwindows | |
43 | |
44 ## | |
45 ## INCLUDE MAKEFILES | |
46 ## | |
47 | |
48 | |
49 ## | |
50 ## INCLUDE PATHS | |
51 ## | |
52 | |
53 INCLUDE_PATHS = -I$(INCLUDE_DIR) \ | |
54 -I$(INCLUDE_DIR)/win32 \ | |
55 -I$(GAIM_TOP) \ | |
56 -I$(GTK_TOP)/include \ | |
57 -I$(GTK_TOP)/include/gtk-2.0 \ | |
58 -I$(GTK_TOP)/include/glib-2.0 \ | |
59 -I$(GTK_TOP)/include/pango-1.0 \ | |
60 -I$(GTK_TOP)/include/atk-1.0 \ | |
61 -I$(GTK_TOP)/lib/glib-2.0/include \ | |
62 -I$(GTK_TOP)/lib/gtk-2.0/include \ | |
63 -I$(PERL_INCLUDE) | |
64 | |
65 | |
66 LIB_PATHS = -L$(GTK_TOP)/lib \ | |
67 -L$(GAIM_SRC) \ | |
68 -L$(PERL_LIB_DIR) | |
69 | |
70 | |
71 ## | |
72 ## SOURCES, OBJECTS | |
73 ## | |
74 | |
75 SOUND_H_FILES = $(GAIM_TOP)/sounds/BuddyArrive.h \ | |
76 $(GAIM_TOP)/sounds/BuddyLeave.h \ | |
77 $(GAIM_TOP)/sounds/Receive.h \ | |
78 $(GAIM_TOP)/sounds/RedAlert.h \ | |
79 $(GAIM_TOP)/sounds/Send.h | |
80 | |
81 HEADER_DEPS = $(SOUND_H_FILES) | |
82 | |
83 DLL_C_SRC = aim.c \ | |
84 about.c \ | |
85 away.c \ | |
86 browser.c \ | |
87 buddy.c \ | |
88 buddy_chat.c \ | |
89 conversation.c \ | |
90 core.c \ | |
91 dialogs.c \ | |
92 ft.c \ | |
93 gaimrc.c \ | |
94 gtkimhtml.c \ | |
95 gtkspell.c \ | |
96 html.c \ | |
97 idle.c \ | |
98 list.c \ | |
99 md5.c \ | |
100 module.c \ | |
101 multi.c \ | |
102 perl.c \ | |
103 prefs.c \ | |
104 proxy.c \ | |
105 prpl.c \ | |
106 server.c \ | |
107 sound.c \ | |
108 util.c \ | |
109 win32/win32dep.c \ | |
110 win32/MinimizeToTray.c | |
111 | |
112 RC_SRC = win32/gaimrc.rc | |
113 | |
114 EXE_C_SRC = win_aim.c | |
115 | |
116 DLL_OBJECTS = $(DLL_C_SRC:%.c=%.o) | |
117 | |
118 EXE_OBJECTS = $(EXE_C_SRC:%.c=%.o) $(RC_SRC:%.rc=%.o) | |
119 | |
120 ## | |
121 ## LIBRARIES | |
122 ## | |
123 | |
124 DLL_LIBS = -lgtk-win32-2.0 \ | |
125 -lpango-1.0 \ | |
126 -lglib-2.0 \ | |
127 -lgdk-win32-2.0 \ | |
128 -lgobject-2.0 \ | |
129 -lintl \ | |
130 -lgmodule-2.0 \ | |
131 -lgdk_pixbuf-2.0 \ | |
132 -lws2_32 \ | |
133 -liberty \ | |
134 -lwinmm \ | |
135 -lperl56 | |
136 | |
137 | |
138 EXE_LIBS = -lgaim -lglib-2.0 | |
139 | |
140 ## | |
141 ## RULES | |
142 ## | |
143 | |
144 # Make Sound headers | |
145 $(GAIM_TOP)/sounds/%.h: | |
146 $(MAKE) -C $(GAIM_TOP)/sounds -f Makefile.mingw $(@F) | |
147 | |
148 # How to make a C file | |
149 %.o: %.c | |
150 $(CC) $(CFLAGS) $(INCLUDE_PATHS) $(DEFINES) -c $< -o $@ | |
151 | |
152 # How to make an RC file | |
153 %.o: %.rc | |
154 windres -i $< -o $@ | |
155 | |
156 ## | |
157 ## TARGET DEFINITIONS | |
158 ## | |
159 | |
160 .PHONY: all clean | |
161 | |
162 all: $(TARGET).exe $(TARGET).dll | |
163 | |
164 install: | |
165 cp $(GAIM_SRC)/gaim.exe $(GAIM_SRC)/gaim.dll $(GAIM_INSTALL_DIR) | |
166 | |
167 | |
168 # | |
169 # BUILD DLL | |
170 # | |
171 | |
172 $(TARGET).def: $(HEADER_DEPS) $(DLL_OBJECTS) | |
173 dlltool -D $(TARGET).dll -z $(TARGET).def --export-all-symbols \ | |
174 --exclude-symbols WinMain@16 $^ | |
175 | |
176 $(TARGET).base: $(HEADER_DEPS) $(DLL_OBJECTS) | |
177 gcc -mdll $(LDFLAGS) -o junk.tmp -Wl,--base-file,$@ $(DLL_OBJECTS) $(LIB_PATHS) $(DLL_LIBS) | |
178 rm -rf junk.tmp | |
179 | |
180 $(TARGET).exp: $(TARGET).base $(TARGET).def | |
181 dlltool --dllname $(TARGET).dll --base-file $(TARGET).base \ | |
182 --output-exp $(TARGET).exp --def $(TARGET).def | |
183 | |
184 $(TARGET).dll: $(HEADER_DEPS) $(DLL_OBJECTS) $(TARGET).exp | |
185 gcc -mdll $(LDFLAGS) -o $(TARGET).dll $(DLL_OBJECTS) -Wl,$(TARGET).exp $(LIB_PATHS) $(DLL_LIBS) | |
186 rm -rf $(TARGET).exp $(TARGET).def $(TARGET).base | |
187 | |
188 $(TARGET).lib: $(TARGET).def | |
189 dlltool -D $(TARGET).dll -d $(TARGET).def -l $(TARGET).lib | |
190 | |
191 # | |
192 # BUILD EXE | |
193 # | |
194 | |
195 $(TARGET).exe: $(TARGET).lib $(EXE_OBJECTS) | |
196 gcc $(LDFLAGS) $(EXE_OBJECTS) $(LIB_PATHS) $(EXE_LIBS) -o $(TARGET).exe | |
197 | |
198 # -Wl,--subsystem,windows | |
199 | |
200 ## | |
201 ## CLEAN RULES | |
202 ## | |
203 | |
204 clean: | |
205 $(MAKE) -C $(GAIM_TOP)/sounds -f Makefile.mingw clean | |
206 rm -rf *.o ./win32/*.o | |
207 rm -rf $(TARGET).dll | |
208 rm -rf $(TARGET).lib | |
209 rm -rf $(TARGET).exe | |
210 | |
211 |