Mercurial > pidgin
diff libgaim/Makefile.mingw @ 14315:8793fc8f7064
[gaim-migrate @ 17008]
Lee Roach revamped the win32 makefiles. This makes me happy, they were in dire need of some loving.
This makes life a great deal easier for anyone who wants to build out-of-tree plugins.
committer: Tailor Script <tailor@pidgin.im>
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Wed, 23 Aug 2006 21:34:43 +0000 |
parents | c54ea2572de9 |
children | fd45915c6988 |
line wrap: on
line diff
--- a/libgaim/Makefile.mingw Wed Aug 23 18:50:46 2006 +0000 +++ b/libgaim/Makefile.mingw Wed Aug 23 21:34:43 2006 +0000 @@ -1,63 +1,33 @@ # # Makefile.mingw # -# Description: Makefile for win32 (mingw) version of Gaim -# - -# -# PATHS +# Description: Makefile for win32 (mingw) version of libGaim # -GTK_TOP := ../../win32-dev/gtk_2_0 -GAIM_TOP := .. -LIBGAIM_TOP := . -PLUGINS_TOP := $(LIBGAIM_TOP)/plugins -PROTOCOLS_TOP := $(LIBGAIM_TOP)/protocols -GAIM_INSTALL_DIR := $(GAIM_TOP)/win32-install-dir -LIBXML2_DIR := ../../win32-dev/libxml2 - -NEEDED_DLLS = $(LIBXML2_DIR)/bin/libxml2.dll - - -## -## VARIABLE DEFINITIONS -## +GAIM_TOP := .. +include $(GAIM_TOP)/libgaim/win32/global.mak TARGET = libgaim - -# Compiler and Linker Options - -CFLAGS = - -DEFINES = - -## -## INCLUDE MAKEFILES -## - -include $(LIBGAIM_TOP)/win32/global.mak +NEEDED_DLLS = $(LIBXML2_TOP)/bin/libxml2.dll ## ## INCLUDE PATHS ## - INCLUDE_PATHS = \ - -I$(LIBGAIM_TOP) \ - -I$(LIBGAIM_TOP)/win32 \ + -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 \ - -I$(LIBXML2_DIR)/include + -I$(LIBXML2_TOP)/include LIB_PATHS = -L$(GTK_TOP)/lib \ - -L$(LIBGAIM_TOP) \ - -L$(LIBXML2_DIR)/lib + -L$(LIBXML2_TOP)/lib ## ## SOURCES, OBJECTS ## - C_SRC = \ account.c \ accountopt.c \ @@ -106,13 +76,11 @@ win32/libc_interface.c \ win32/win32dep.c - OBJECTS = $(C_SRC:%.c=%.o) ## ## LIBRARIES ## - LIBS = \ -lglib-2.0 \ -lgthread-2.0 \ @@ -123,44 +91,36 @@ -liberty \ -lxml2 -## -## RULES -## - -# How to make a C file -%.o: %.c - $(CC) $(CFLAGS) $(INCLUDE_PATHS) $(DEFINES) -c $< -o $@ +include $(GAIM_COMMON_RULES) ## ## TARGET DEFINITIONS ## - -.PHONY: all clean include_path +.PHONY: all clean all: $(TARGET).dll - $(MAKE) -C $(PROTOCOLS_TOP) -f Makefile.mingw - $(MAKE) -C $(PLUGINS_TOP) -f Makefile.mingw + $(MAKE) -C $(GAIM_PROTOS_TOP) -f $(GAIM_WIN32_MAKEFILE) + $(MAKE) -C $(GAIM_LIB_PLUGINS_TOP) -f $(GAIM_WIN32_MAKEFILE) -install: all - $(MAKE) -C $(PROTOCOLS_TOP) -f Makefile.mingw install - $(MAKE) -C $(PLUGINS_TOP) -f Makefile.mingw install - cp $(LIBGAIM_TOP)/$(TARGET).dll $(GAIM_INSTALL_DIR) +install: all $(GAIM_INSTALL_DIR) + $(MAKE) -C $(GAIM_PROTOS_TOP) -f $(GAIM_WIN32_MAKEFILE) install + $(MAKE) -C $(GAIM_LIB_PLUGINS_TOP) -f $(GAIM_WIN32_MAKEFILE) install + cp $(TARGET).dll $(GAIM_INSTALL_DIR) cp $(NEEDED_DLLS) $(GAIM_INSTALL_DIR) -# -# BUILD DLL -# -$(TARGET).dll.a $(TARGET).dll: -$(TARGET).dll.a $(TARGET).dll: $(OBJECTS) +$(OBJECTS): $(GAIM_CONFIG_H) + +$(TARGET).dll $(TARGET).dll.a: $(OBJECTS) $(CC) -shared $(OBJECTS) $(LIB_PATHS) $(LIBS) $(DLL_LD_FLAGS) -Wl,--out-implib,$(TARGET).dll.a -o $(TARGET).dll ## ## CLEAN RULES ## - clean: - rm -rf *.o ./win32/*.o + rm -rf $(OBJECTS) rm -rf $(TARGET).dll rm -rf $(TARGET).dll.a - $(MAKE) -C $(PROTOCOLS_TOP) -f Makefile.mingw clean - $(MAKE) -C $(PLUGINS_TOP) -f Makefile.mingw clean + $(MAKE) -C $(GAIM_PROTOS_TOP) -f $(GAIM_WIN32_MAKEFILE) clean + $(MAKE) -C $(GAIM_LIB_PLUGINS_TOP) -f $(GAIM_WIN32_MAKEFILE) clean + +include $(GAIM_COMMON_TARGETS)