view gtk/Makefile.mingw @ 14438:01915dd6ff85

[gaim-migrate @ 17152] I'm not sure how I put these in the wrong place to being with, but this is where they belong. committer: Tailor Script <tailor@pidgin.im>
author Etan Reisner <pidgin@unreliablesource.net>
date Mon, 04 Sep 2006 04:08:07 +0000
parents d29fc3b5d402
children e88aae4f4c40
line wrap: on
line source

#
# Makefile.mingw
#
# Description: Makefile for win32 (mingw) version of Gaim
#

GAIM_TOP := ..
include $(GAIM_TOP)/libgaim/win32/global.mak

NEEDED_DLLS = $(GTKSPELL_TOP)/gtkspell/libgtkspell.dll

##
## VARIABLE DEFINITIONS
##
EXE_TARGET = gaim
GTKGAIM_TARGET = gtkgaim

ifeq ($(MAKECMDGOALS), $(EXE_TARGET)-portable.exe)
DEFINES := $(DEFINES) -DPORTABLE
endif

WINAPP := -mwindows
# The Debug version of gaim is a console app, always having a console
CONSOLEAPP := -mconsole

LDFLAGS := $(WINAPP)

##
## INCLUDE PATHS
##
LIBGAIM_INCLUDE_PATHS =	\
			-I$(GAIM_LIB_TOP) \
			-I$(GAIM_LIB_TOP)/win32 \
			-I$(GAIM_TOP) \
			-I$(GTK_TOP)/include \
			-I$(GTK_TOP)/include/glib-2.0 \
			-I$(GTK_TOP)/lib/glib-2.0/include

INCLUDE_PATHS =	\
			$(LIBGAIM_INCLUDE_PATHS) \
			-I$(GAIM_GTK_IDLETRACK_TOP) \
			-I$(GAIM_GTK_TOP) \
			-I$(GAIM_GTK_TOP)/win32 \
			-I$(GTK_TOP)/include/gtk-2.0 \
			-I$(GTK_TOP)/include/pango-1.0 \
			-I$(GTK_TOP)/include/atk-1.0 \
			-I$(GTK_TOP)/lib/gtk-2.0/include \
			-I$(GTKSPELL_TOP) \
			-I$(ASPELL_TOP)/include

LIB_PATHS =		-L$(GTK_TOP)/lib \
			-L$(GAIM_LIB_TOP) \
			-L$(GAIM_GTK_TOP) \
			-L$(GAIM_GTK_IDLETRACK_TOP) \
			-L$(ASPELL_TOP)/lib

##
##  SOURCES, OBJECTS
##
GTKGAIM_C_SRC =	\
			gaimstock.c \
			gtkaccount.c \
			gtkblist.c \
			gtkconn.c \
			gtkconv.c \
			gtkcellrendererprogress.c \
			gtkdebug.c \
			gtkdialogs.c \
			gtkdnd-hints.c \
			gtkeventloop.c \
			gtkexpander.c \
			gtkft.c \
			gtkidle.c \
			gtkimhtml.c \
			gtkimhtmltoolbar.c \
			gtklog.c \
			gtkmain.c \
			gtkmenutray.c \
			gtknotify.c \
			gtkplugin.c \
			gtkpluginpref.c \
			gtkpounce.c \
			gtkprefs.c \
			gtkprivacy.c \
			gtkrequest.c \
			gtkroomlist.c \
			gtksavedstatuses.c \
			gtksound.c \
			gtksourceiter.c \
			gtkstatusbox.c \
			gtkthemes.c \
			gtkutils.c \
			gtkwhiteboard.c \
			win32/gtkwin32dep.c \
			win32/untar.c \
			win32/wspell.c

RC_SRC = win32/gaimrc.rc
EXE_C_SRC = win32/win_gaim.c
GTKGAIM_OBJECTS = $(GTKGAIM_C_SRC:%.c=%.o)
EXE_OBJECTS = $(EXE_C_SRC:%.c=%.o) $(RC_SRC:%.rc=%.o)

##
## LIBRARIES
##
LIBGAIM_LIBS =	\
		-lgaim \
		-lglib-2.0 \
		-lgthread-2.0 \
		-lgobject-2.0 \
		-lgmodule-2.0 \
		-lintl \
		-lws2_32 \
		-lwinmm \
		-lz \
		-liberty \
		-lidletrack

GTKGAIM_LIBS =	\
		$(LIBGAIM_LIBS) \
		-lgtk-win32-2.0 \
		-latk-1.0 \
		-lpango-1.0 \
		-lgdk-win32-2.0 \
		-lgdk_pixbuf-2.0

include $(GAIM_COMMON_RULES)

##
## TARGET DEFINITIONS
##
.PHONY: all clean

all: $(EXE_TARGET).exe $(GTKGAIM_TARGET).dll
	$(MAKE) -C $(GAIM_GTK_PLUGINS_TOP) -f $(GAIM_WIN32_MAKEFILE)

install: all $(GAIM_INSTALL_DIR)
	$(MAKE) -C $(GAIM_GTK_PLUGINS_TOP) -f $(GAIM_WIN32_MAKEFILE) install
	$(MAKE) -C $(GAIM_GTK_PIXMAPS_TOP) -f $(GAIM_WIN32_MAKEFILE) install
	$(MAKE) -C $(GAIM_GTK_SOUNDS_TOP) -f $(GAIM_WIN32_MAKEFILE) install
	$(MAKE) -C $(GAIM_GTK_IDLETRACK_TOP) -f $(GAIM_WIN32_MAKEFILE) install
	cp $(EXE_TARGET).exe $(GTKGAIM_TARGET).dll $(GAIM_INSTALL_DIR)
	cp $(NEEDED_DLLS) $(GAIM_INSTALL_DIR)

$(GTKGAIM_OBJECTS): $(GAIM_CONFIG_H)

$(GTKGAIM_TARGET).dll $(GTKGAIM_TARGET).dll.a: $(GAIM_LIBGAIM_DLL).a $(GAIM_IDLETRACK_DLL).a $(GTKGAIM_OBJECTS)
	$(CC) -shared $(LIBGAIM_OBJECTS) $(GTKGAIM_OBJECTS) $(LIB_PATHS) $(GTKGAIM_LIBS) $(DLL_LD_FLAGS) -Wl,--out-implib,$(GTKGAIM_TARGET).dll.a -o $(GTKGAIM_TARGET).dll

$(EXE_TARGET).exe: $(GAIM_CONFIG_H) $(GAIM_GTKGAIM_DLL).a $(GAIM_IDLETRACK_DLL).a $(EXE_OBJECTS)
	$(CC) $(LDFLAGS) $(EXE_OBJECTS) $(LIB_PATHS) $(EXE_LIBS) -o $(EXE_TARGET).exe

$(EXE_TARGET)-portable.exe: clean_exe $(GAIM_CONFIG_H) $(GAIM_GTKGAIM_DLL).a $(GAIM_IDLETRACK_DLL).a $(EXE_OBJECTS)
	$(CC) $(LDFLAGS) $(EXE_OBJECTS) $(LIB_PATHS) $(EXE_LIBS) -o $(EXE_TARGET)-portable.exe
	rm win_gaim.o

##
## CLEAN RULES
##
clean:
	$(MAKE) -C $(GAIM_GTK_IDLETRACK_TOP) -f $(GAIM_WIN32_MAKEFILE) clean
	$(MAKE) -C $(GAIM_GTK_PLUGINS_TOP) -f $(GAIM_WIN32_MAKEFILE) clean
	rm -f $(GTKGAIM_OBJECTS) $(EXE_OBJECTS)
	rm -f $(GTKGAIM_TARGET).dll
	rm -f $(GTKGAIM_TARGET).dll.a
	rm -f $(EXE_TARGET).exe
	rm -f $(EXE_TARGET)-portable.exe

clean_exe:
	rm -f win_gaim.o

include $(GAIM_COMMON_TARGETS)