3630
|
1 #
|
|
2 # Makefile.mingw
|
|
3 #
|
|
4 # Description: Makefile for win32 (mingw) version of Gaim Plugins
|
|
5 #
|
|
6
|
|
7 #
|
|
8 # PATHS
|
|
9 #
|
|
10
|
|
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
|
|
18 ##
|
|
19 ## VARIABLE DEFINITIONS
|
|
20 ##
|
|
21
|
|
22 VERSION := $(shell cat $(GAIM_TOP)/VERSION)
|
|
23
|
|
24 # Compiler Options
|
|
25
|
|
26 CC = gcc.exe
|
|
27
|
|
28 CFLAGS = -O2 -Wall -Werror -mno-cygwin -fnative-struct
|
|
29
|
|
30 DEFINES = -DGTK_ENABLE_BROKEN -DVERSION=\"$(VERSION)\"
|
|
31
|
|
32 .SUFFIXES:
|
|
33 .SUFFIXES: .c .dll
|
|
34
|
|
35 ##
|
|
36 ## INCLUDE MAKEFILES
|
|
37 ##
|
|
38
|
|
39
|
|
40 ##
|
|
41 ## INCLUDE PATHS
|
|
42 ##
|
|
43
|
|
44 INCLUDE_PATHS += -I$(OSCAR_ROOT) \
|
|
45 -I$(GTK_TOP)/include \
|
|
46 -I$(GTK_TOP)/include/gtk-2.0 \
|
|
47 -I$(GTK_TOP)/include/glib-2.0 \
|
|
48 -I$(GTK_TOP)/include/pango-1.0 \
|
|
49 -I$(GTK_TOP)/include/atk-1.0 \
|
|
50 -I$(GTK_TOP)/lib/glib-2.0/include \
|
|
51 -I$(GTK_TOP)/lib/gtk-2.0/include \
|
|
52 -I$(GAIM_TOP) \
|
|
53 -I$(GAIM_TOP)/src \
|
|
54 -I$(GAIM_TOP)/src/win32
|
|
55
|
|
56
|
|
57 LIB_PATHS = -L$(GTK_TOP)/lib \
|
|
58 -L$(GAIM_TOP)/src
|
|
59
|
|
60
|
|
61 ##
|
|
62 ## LIBRARIES
|
|
63 ##
|
|
64
|
|
65 LIBS = -lgtk-win32-2.0 -lglib-2.0 -lgdk-win32-2.0 -lgobject-2.0 -lgmodule-2.0 -lintl -lws2_32 -liberty -lgaim
|
|
66
|
|
67 ##
|
|
68 ## RULES
|
|
69 ##
|
|
70
|
|
71 ##
|
|
72 ## TARGET DEFINITIONS
|
|
73 ##
|
|
74
|
|
75 .PHONY: all clean
|
|
76
|
|
77 all: plugins
|
|
78 $(MAKE) -C $(TICKER) -f Makefile.mingw
|
|
79
|
|
80 install:
|
|
81 cp $(GAIM_PLUGINS)/*.dll $(GAIM_PLUGINS)/*.pl $(GAIM_INSTALL_DIR)/plugins
|
|
82 $(MAKE) -C $(TICKER) -f Makefile.mingw install
|
|
83
|
|
84 #
|
|
85 # BUILD Plugin
|
|
86 #
|
|
87
|
|
88 .c.dll:
|
|
89 $(CC) $(CFLAGS) $(DEFINES) $(INCLUDE_PATHS) -o tmp$@.o -c $<
|
|
90 dlltool -D $@ -z $@.def tmp$@.o
|
|
91 gcc -mdll -o junk.tmp -Wl,--base-file,$@.base tmp$@.o $(LIB_PATHS) $(LIBS)
|
|
92 dlltool -D $@ -b $@.base -e $@.exp -d $@.def
|
|
93 gcc -mdll -o $@ tmp$@.o -Wl,$@.exp $(LIB_PATHS) $(LIBS)
|
|
94 rm -rf $@.base $@.def $@.exp junk.tmp
|
|
95
|
|
96 plugins: autorecon.dll iconaway.dll spellchk.dll
|
|
97
|
|
98
|
|
99 ##
|
|
100 ## CLEAN RULES
|
|
101 ##
|
|
102
|
|
103 clean:
|
|
104 rm -rf *.o
|
|
105 rm -rf *.dll
|
|
106 $(MAKE) -C $(TICKER) -f Makefile.mingw clean
|