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