changeset 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 424e5c4759d0
children 1607fa5f3c1e
files src/Makefile.mingw
diffstat 1 files changed, 211 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/Makefile.mingw	Fri Oct 11 04:41:44 2002 +0000
@@ -0,0 +1,211 @@
+#
+# Makefile.mingw
+#
+# Description: Makefile for win32 (mingw) version of Gaim
+#
+
+#
+# PATHS
+#
+
+BUILD_TOOLS = /usr/local/mingw
+
+INCLUDE_DIR :=		.
+GTK_TOP :=		../../win32-dev/gtk_2_0
+GAIM_TOP :=		..
+GAIM_SRC :=		.
+PERL_LIB_DIR :=		../../win32-dev/perl56
+PERL_INCLUDE :=         $(PERL_LIB_DIR)/CORE
+GAIM_INSTALL_DIR :=	$(GAIM_TOP)/win32-install-dir
+
+##
+## VARIABLE DEFINITIONS
+##
+
+TARGET = gaim
+
+VERSION := $(shell cat $(GAIM_TOP)/VERSION)
+
+# Compiler and Linker Options
+
+GCOPTS = -B $(BUILD_TOOLS)
+
+CC = gcc.exe $(GCOPTS)
+
+CFLAGS = -g -mno-cygwin -fnative-struct
+
+DEFINES = -DHAVE_CONFIG_H -DVERSION=\"$(VERSION)\" -DGTK_ENABLE_BROKEN
+
+LDFLAGS = -mwindows
+
+#-mconsole
+#-mwindows
+
+##
+## INCLUDE  MAKEFILES
+##
+
+
+##
+## INCLUDE PATHS
+##
+
+INCLUDE_PATHS =		-I$(INCLUDE_DIR) \
+			-I$(INCLUDE_DIR)/win32 \
+			-I$(GAIM_TOP) \
+			-I$(GTK_TOP)/include \
+			-I$(GTK_TOP)/include/gtk-2.0 \
+			-I$(GTK_TOP)/include/glib-2.0 \
+			-I$(GTK_TOP)/include/pango-1.0 \
+			-I$(GTK_TOP)/include/atk-1.0 \
+			-I$(GTK_TOP)/lib/glib-2.0/include \
+			-I$(GTK_TOP)/lib/gtk-2.0/include \
+			-I$(PERL_INCLUDE)
+
+
+LIB_PATHS =		-L$(GTK_TOP)/lib \
+			-L$(GAIM_SRC) \
+			-L$(PERL_LIB_DIR)
+
+
+##
+##  SOURCES, OBJECTS
+##
+
+SOUND_H_FILES =		$(GAIM_TOP)/sounds/BuddyArrive.h \
+			$(GAIM_TOP)/sounds/BuddyLeave.h \
+			$(GAIM_TOP)/sounds/Receive.h \
+			$(GAIM_TOP)/sounds/RedAlert.h \
+			$(GAIM_TOP)/sounds/Send.h
+
+HEADER_DEPS =		$(SOUND_H_FILES)
+
+DLL_C_SRC =		aim.c \
+			about.c \
+			away.c \
+			browser.c \
+			buddy.c \
+			buddy_chat.c \
+			conversation.c \
+			core.c \
+			dialogs.c \
+			ft.c \
+			gaimrc.c \
+			gtkimhtml.c \
+			gtkspell.c \
+			html.c \
+			idle.c \
+			list.c \
+			md5.c \
+			module.c \
+			multi.c \
+			perl.c \
+			prefs.c \
+			proxy.c \
+			prpl.c \
+			server.c \
+			sound.c \
+			util.c \
+			win32/win32dep.c \
+			win32/MinimizeToTray.c
+
+RC_SRC =		win32/gaimrc.rc
+
+EXE_C_SRC = 		win_aim.c
+
+DLL_OBJECTS = $(DLL_C_SRC:%.c=%.o) 
+
+EXE_OBJECTS = $(EXE_C_SRC:%.c=%.o) $(RC_SRC:%.rc=%.o) 
+
+##
+## LIBRARIES
+##
+
+DLL_LIBS = 		-lgtk-win32-2.0 \
+			-lpango-1.0 \
+			-lglib-2.0 \
+			-lgdk-win32-2.0 \
+			-lgobject-2.0 \
+			-lintl \
+			-lgmodule-2.0 \
+			-lgdk_pixbuf-2.0 \
+			-lws2_32 \
+			-liberty \
+			-lwinmm \
+			-lperl56
+
+
+EXE_LIBS = -lgaim -lglib-2.0
+
+##
+## RULES
+##
+
+# Make Sound headers
+$(GAIM_TOP)/sounds/%.h:
+	$(MAKE) -C $(GAIM_TOP)/sounds -f Makefile.mingw $(@F)
+
+# How to make a C file
+%.o: %.c
+	$(CC) $(CFLAGS) $(INCLUDE_PATHS) $(DEFINES) -c $< -o $@
+
+# How to make an RC file
+%.o: %.rc
+	windres -i $< -o $@
+
+##
+## TARGET DEFINITIONS
+##
+
+.PHONY: all clean
+
+all: $(TARGET).exe $(TARGET).dll
+
+install:
+	cp $(GAIM_SRC)/gaim.exe $(GAIM_SRC)/gaim.dll $(GAIM_INSTALL_DIR)
+
+
+#
+# BUILD DLL
+#
+
+$(TARGET).def: $(HEADER_DEPS) $(DLL_OBJECTS)
+	dlltool -D $(TARGET).dll -z $(TARGET).def --export-all-symbols \
+		--exclude-symbols WinMain@16 $^
+
+$(TARGET).base: $(HEADER_DEPS) $(DLL_OBJECTS)
+	gcc -mdll $(LDFLAGS) -o junk.tmp -Wl,--base-file,$@ $(DLL_OBJECTS) $(LIB_PATHS) $(DLL_LIBS)
+	rm -rf junk.tmp
+
+$(TARGET).exp: $(TARGET).base $(TARGET).def
+	dlltool --dllname $(TARGET).dll --base-file $(TARGET).base \
+		--output-exp $(TARGET).exp --def $(TARGET).def
+
+$(TARGET).dll: $(HEADER_DEPS) $(DLL_OBJECTS) $(TARGET).exp
+	gcc -mdll $(LDFLAGS) -o $(TARGET).dll $(DLL_OBJECTS) -Wl,$(TARGET).exp $(LIB_PATHS) $(DLL_LIBS)
+	rm -rf $(TARGET).exp $(TARGET).def $(TARGET).base
+
+$(TARGET).lib: $(TARGET).def
+	dlltool -D $(TARGET).dll -d $(TARGET).def -l $(TARGET).lib	
+
+#
+# BUILD EXE
+#
+
+$(TARGET).exe: $(TARGET).lib $(EXE_OBJECTS)
+	gcc $(LDFLAGS) $(EXE_OBJECTS) $(LIB_PATHS) $(EXE_LIBS) -o $(TARGET).exe
+
+# -Wl,--subsystem,windows
+
+##
+## CLEAN RULES
+##
+
+clean:
+	$(MAKE) -C $(GAIM_TOP)/sounds -f Makefile.mingw clean
+	rm -rf *.o ./win32/*.o
+	rm -rf $(TARGET).dll
+	rm -rf $(TARGET).lib
+	rm -rf $(TARGET).exe
+
+