[gaim-migrate @ 4340]
[pidgin-git.git] / plugins / Makefile.mingw
blob4f4921fce1516c5030c333949b00798b84f3d2ee
2 # Makefile.mingw
4 # Description: Makefile for win32 (mingw) version of Gaim Plugins 
8 # PATHS
11 GAIM_PLUGINS :=         .
12 GAIM_TOP :=             ..
13 GTK_TOP :=              ../../win32-dev/gtk_2_0
14 OSCAR_ROOT :=           ../src/protocols/oscar
15 GAIM_INSTALL_DIR :=     $(GAIM_TOP)/win32-install-dir
16 TICKER :=               ./ticker
17 TRANSPARENCY :=         ./win32/transparency
20 ## VARIABLE DEFINITIONS
23 # Compiler Options
25 CFLAGS =
27 DEFINES =
29 .SUFFIXES:
30 .SUFFIXES: .c .dll
33 ## INCLUDE  MAKEFILES
36 include $(GAIM_TOP)/src/win32/global.mak
39 ## INCLUDE PATHS
42 INCLUDE_PATHS +=        -I$(OSCAR_ROOT) \
43                         -I$(GTK_TOP)/include \
44                         -I$(GTK_TOP)/include/gtk-2.0 \
45                         -I$(GTK_TOP)/include/glib-2.0 \
46                         -I$(GTK_TOP)/include/pango-1.0 \
47                         -I$(GTK_TOP)/include/atk-1.0 \
48                         -I$(GTK_TOP)/lib/glib-2.0/include \
49                         -I$(GTK_TOP)/lib/gtk-2.0/include \
50                         -I$(GAIM_TOP) \
51                         -I$(GAIM_TOP)/src \
52                         -I$(GAIM_TOP)/src/win32
55 LIB_PATHS =             -L$(GTK_TOP)/lib \
56                         -L$(GAIM_TOP)/src
60 ## LIBRARIES
63 LIBS = -lgtk-win32-2.0 -lglib-2.0 -lgdk-win32-2.0 -lgobject-2.0 -lgmodule-2.0 -lintl -lws2_32 -liberty -lgaim
66 ## RULES
70 ## TARGET DEFINITIONS
73 .PHONY: all clean
75 all: plugins
76         $(MAKE) -C $(TICKER) -f Makefile.mingw
77         $(MAKE) -C $(TRANSPARENCY) -f Makefile.mingw
79 install:
80         cp $(GAIM_PLUGINS)/*.dll $(GAIM_PLUGINS)/gaim.pl $(GAIM_INSTALL_DIR)/plugins
81         $(MAKE) -C $(TICKER) -f Makefile.mingw install
82         $(MAKE) -C $(TRANSPARENCY) -f Makefile.mingw install
85 # BUILD Plugin
88 .c.dll:
89         $(CC) $(CFLAGS) $(DEFINES) $(INCLUDE_PATHS) -o tmp$@.o -c $<
90         dlltool -D $@ -z $@.def tmp$@.o
91         $(CC) -mdll -o junk.tmp -Wl,--base-file,$@.base tmp$@.o $(LIB_PATHS) $(LIBS)
92         dlltool -D $@ -b $@.base -e $@.exp -d $@.def
93         $(CC) -mdll -o $@ tmp$@.o -Wl,$@.exp $(LIB_PATHS) $(LIBS)
94         rm -rf $@.base $@.def $@.exp junk.tmp
96 plugins: iconaway.dll spellchk.dll
100 ## CLEAN RULES
103 clean:
104         rm -rf *.o
105         rm -rf *.dll
106         $(MAKE) -C $(TICKER) -f Makefile.mingw clean
107         $(MAKE) -C $(TRANSPARENCY) -f Makefile.mingw clean