Cast back and forth between int and pointer instead of putting pointers
[pidgin-git.git] / pidgin / Makefile.mingw
blobdd4f13285f3eeba58e7feb27911a2f0d4b6d4644
2 # Makefile.mingw
4 # Description: Makefile for win32 (mingw) version of Pidgin
7 PIDGIN_TREE_TOP := ..
8 include $(PIDGIN_TREE_TOP)/libpurple/win32/global.mak
10 DEFINES := $(subst -DWIN32_LEAN_AND_MEAN,,$(DEFINES))
13 ## VARIABLE DEFINITIONS
15 EXE_TARGET := pidgin
16 PIDGIN_TARGET := pidgin
17 EXE_NAME := $(EXE_TARGET).exe
19 WINAPP := -mwindows
21 LDFLAGS := $(WINAPP)
24 ## INCLUDE PATHS
26 PURPLE_INCLUDE_PATHS =  \
27                         -I$(PURPLE_TOP) \
28                         -I$(PURPLE_TOP)/win32 \
29                         -I$(PIDGIN_TREE_TOP) \
30                         -I$(GTK_TOP)/include \
31                         -I$(GTK_TOP)/include/glib-2.0 \
32                         -I$(GTK_TOP)/lib/glib-2.0/include
34 INCLUDE_PATHS +=        \
35                         $(PURPLE_INCLUDE_PATHS) \
36                         -I$(PIDGIN_TOP) \
37                         -I$(PIDGIN_TOP)/win32 \
38                         -I$(GTK_TOP)/include/gtk-2.0 \
39                         -I$(GTK_TOP)/include/pango-1.0 \
40                         -I$(GTK_TOP)/include/atk-1.0 \
41                         -I$(GTK_TOP)/include/cairo \
42                         -I$(GTK_TOP)/lib/gtk-2.0/include \
43                         -I$(GTKSPELL_TOP)/include/gtkspell-2.0
45 LIB_PATHS +=            -L$(GTK_TOP)/lib \
46                         -L$(PURPLE_TOP) \
47                         -L$(PIDGIN_TOP)
50 ##  SOURCES, OBJECTS
52 PIDGIN_C_SRC =  \
53                         gtkaccount.c \
54                         gtkblist-theme-loader.c \
55                         gtkblist-theme.c \
56                         gtkblist.c \
57                         gtkcellrendererexpander.c \
58                         gtkcertmgr.c \
59                         gtkconn.c \
60                         gtkconv.c \
61                         gtkdebug.c \
62                         gtkdialogs.c \
63                         gtkdnd-hints.c \
64                         gtkdocklet.c \
65                         gtkeventloop.c \
66                         gtkft.c \
67                         gtkicon-theme-loader.c \
68                         gtkicon-theme.c \
69                         gtkidle.c \
70                         gtkimhtml.c \
71                         gtkimhtmltoolbar.c \
72                         gtklog.c \
73                         gtkmain.c \
74                         gtkmedia.c \
75                         gtkmenutray.c \
76                         gtknotify.c \
77                         gtkplugin.c \
78                         gtkpluginpref.c \
79                         gtkpounce.c \
80                         gtkprefs.c \
81                         gtkprivacy.c \
82                         gtkrequest.c \
83                         gtkroomlist.c \
84                         gtksavedstatuses.c \
85                         gtkscrollbook.c \
86                         gtksmiley.c \
87                         gtksound.c \
88                         gtksourceiter.c \
89                         gtksourceundomanager.c \
90                         gtkstatus-icon-theme.c \
91                         gtkstatusbox.c \
92                         gtkthemes.c \
93                         gtkutils.c \
94                         gtkwhiteboard.c \
95                         minidialog.c \
96                         pidginstock.c \
97                         pidgintooltip.c \
98                         win32/MinimizeToTray.c \
99                         win32/gtkdocklet-win32.c \
100                         win32/gtkwin32dep.c \
101                         win32/untar.c \
102                         win32/wspell.c
104 PIDGIN_RC_SRC = win32/pidgin_dll_rc.rc
105 PIDGIN_OBJECTS = $(PIDGIN_C_SRC:%.c=%.o) $(PIDGIN_RC_SRC:%.rc=%.o)
107 EXE_RC_SRC = win32/pidgin_exe_rc.rc
108 EXE_C_SRC = win32/winpidgin.c
109 EXE_OBJECTS = $(EXE_C_SRC:%.c=%.o) $(EXE_RC_SRC:%.rc=%.o)
112 ## LIBRARIES
115 PIDGIN_LIBS =   \
116                 -lintl \
117                 -lglib-2.0 \
118                 -lgobject-2.0 \
119                 -lgthread-2.0 \
120                 -lpurple \
121                 -lz \
122                 -lgtk-win32-2.0 \
123                 -latk-1.0 \
124                 -lpango-1.0 \
125                 -lgdk-win32-2.0 \
126                 -lgdk_pixbuf-2.0 \
127                 -lgdi32 \
128                 -lwinmm
130 include $(PIDGIN_COMMON_RULES)
133 ## TARGET DEFINITIONS
135 .PHONY: all install install_shallow clean
137 all: $(EXE_TARGET).exe $(PIDGIN_TARGET).dll
138         $(MAKE) -C $(PIDGIN_PLUGINS_TOP) -f $(MINGW_MAKEFILE)
140 win32/pidgin_exe_rc.rc: win32/pidgin_exe_rc.rc.in $(PIDGIN_TREE_TOP)/VERSION
141         sed -e 's/@PIDGIN_VERSION@/$(PIDGIN_VERSION)/g' \
142             -e 's/@ORIGINAL_FILENAME@/$(EXE_NAME)/' \
143             $@.in > $@
145 install_shallow: $(PIDGIN_INSTALL_DIR) $(EXE_TARGET).exe $(PIDGIN_TARGET).dll
146         cp $(EXE_TARGET).exe $(PIDGIN_TARGET).dll $(PIDGIN_INSTALL_DIR)
148 install: install_shallow all
149         $(MAKE) -C $(PIDGIN_PLUGINS_TOP) -f $(MINGW_MAKEFILE) install
150         $(MAKE) -C $(PIDGIN_PIXMAPS_TOP) -f $(MINGW_MAKEFILE) install
152 win32/pidgin_dll_rc.rc: win32/pidgin_dll_rc.rc.in $(PIDGIN_TREE_TOP)/VERSION
153         sed -e 's/@PIDGIN_VERSION@/$(PIDGIN_VERSION)/g' \
154             $@.in > $@
156 $(EXE_OBJECTS) $(PIDGIN_OBJECTS): $(PIDGIN_CONFIG_H)
158 $(PIDGIN_TARGET).dll $(PIDGIN_TARGET).dll.a: $(PURPLE_DLL).a $(PIDGIN_OBJECTS)
159         $(CC) -shared $(PIDGIN_OBJECTS) $(LIB_PATHS) $(PIDGIN_LIBS) $(DLL_LD_FLAGS) -Wl,--output-def,$(PIDGIN_TARGET).def,--out-implib,$(PIDGIN_TARGET).dll.a -o $(PIDGIN_TARGET).dll
161 $(EXE_TARGET).exe: $(PIDGIN_CONFIG_H) $(PIDGIN_DLL).a $(EXE_OBJECTS) $(PIDGIN_TARGET).dll
162         $(CC) $(LDFLAGS) $(EXE_OBJECTS) -o $(EXE_TARGET).exe
165 ## CLEAN RULES
167 clean:
168         $(MAKE) -C $(PIDGIN_PLUGINS_TOP) -f $(MINGW_MAKEFILE) clean
169         $(MAKE) -C $(PIDGIN_PIXMAPS_TOP) -f $(MINGW_MAKEFILE) clean
170         rm -f $(PIDGIN_OBJECTS) $(PIDGIN_RC_SRC) $(EXE_OBJECTS) $(EXE_RC_SRC)
171         rm -f $(PIDGIN_TARGET).dll $(PIDGIN_TARGET).dll.a $(PIDGIN_TARGET).def
172         rm -f $(EXE_TARGET).exe
174 include $(PIDGIN_COMMON_TARGETS)