Mercurial > pidgin.yaz
comparison libgaim/protocols/yahoo/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 | a7590884324d |
children | 12cb76aeb21c |
comparison
equal
deleted
inserted
replaced
14314:8b8188fa98f4 | 14315:8793fc8f7064 |
---|---|
2 # Makefile.mingw | 2 # Makefile.mingw |
3 # | 3 # |
4 # Description: Makefile for win32 (mingw) version of libyahoo | 4 # Description: Makefile for win32 (mingw) version of libyahoo |
5 # | 5 # |
6 | 6 |
7 # | 7 GAIM_TOP := ../../.. |
8 # PATHS | 8 include $(GAIM_TOP)/libgaim/win32/global.mak |
9 # | |
10 | |
11 GTK_TOP := ../../../../win32-dev/gtk_2_0 | |
12 GAIM_TOP := ../../.. | |
13 LIBGAIM_TOP := ../.. | |
14 YAHOO_ROOT := . | |
15 GAIM_INSTALL_DIR := $(GAIM_TOP)/win32-install-dir | |
16 | |
17 ## | |
18 ## VARIABLE DEFINITIONS | |
19 ## | |
20 | 9 |
21 TARGET = libyahoo | 10 TARGET = libyahoo |
22 | |
23 # Compiler Options | |
24 | |
25 CFLAGS = | |
26 | |
27 DEFINES = | |
28 | 11 |
29 # Static or Plugin... | 12 # Static or Plugin... |
30 ifeq ($(TYPE),STATIC) | 13 ifeq ($(TYPE),STATIC) |
31 DEFINES += -DSTATIC | 14 DEFINES += -DSTATIC |
32 DLL_INSTALL_DIR = $(GAIM_INSTALL_DIR) | 15 DLL_INSTALL_DIR = $(GAIM_INSTALL_DIR) |
33 else | 16 else |
34 ifeq ($(TYPE),PLUGIN) | 17 ifeq ($(TYPE),PLUGIN) |
35 DLL_INSTALL_DIR = $(GAIM_INSTALL_DIR)/plugins | 18 DLL_INSTALL_DIR = $(GAIM_INSTALL_PLUGINS_DIR) |
36 endif | 19 endif |
37 endif | 20 endif |
38 | |
39 | |
40 ## | |
41 ## INCLUDE MAKEFILES | |
42 ## | |
43 | |
44 include $(LIBGAIM_TOP)/win32/global.mak | |
45 | 21 |
46 ## | 22 ## |
47 ## INCLUDE PATHS | 23 ## INCLUDE PATHS |
48 ## | 24 ## |
49 | 25 INCLUDE_PATHS += -I. \ |
50 INCLUDE_PATHS += -I$(YAHOO_ROOT) \ | |
51 -I$(GTK_TOP)/include \ | 26 -I$(GTK_TOP)/include \ |
52 -I$(GTK_TOP)/include/glib-2.0 \ | 27 -I$(GTK_TOP)/include/glib-2.0 \ |
53 -I$(GTK_TOP)/lib/glib-2.0/include \ | 28 -I$(GTK_TOP)/lib/glib-2.0/include \ |
54 -I$(LIBGAIM_TOP) \ | 29 -I$(GAIM_LIB_TOP) \ |
55 -I$(LIBGAIM_TOP)/win32 \ | 30 -I$(GAIM_LIB_TOP)/win32 \ |
56 -I$(GAIM_TOP) | 31 -I$(GAIM_TOP) |
57 | 32 |
58 | |
59 LIB_PATHS = -L$(GTK_TOP)/lib \ | 33 LIB_PATHS = -L$(GTK_TOP)/lib \ |
60 -L$(LIBGAIM_TOP) | 34 -L$(GAIM_LIB_TOP) |
61 | |
62 | 35 |
63 ## | 36 ## |
64 ## SOURCES, OBJECTS | 37 ## SOURCES, OBJECTS |
65 ## | 38 ## |
66 | |
67 C_SRC = util.c \ | 39 C_SRC = util.c \ |
68 yahoo.c \ | 40 yahoo.c \ |
69 yahoochat.c \ | 41 yahoochat.c \ |
70 yahoo_auth.c \ | 42 yahoo_auth.c \ |
71 yahoo_crypt.c \ | 43 yahoo_crypt.c \ |
75 yahoo_packet.c \ | 47 yahoo_packet.c \ |
76 yahoo_picture.c \ | 48 yahoo_picture.c \ |
77 yahoo_profile.c \ | 49 yahoo_profile.c \ |
78 ycht.c | 50 ycht.c |
79 | 51 |
80 | |
81 OBJECTS = $(C_SRC:%.c=%.o) | 52 OBJECTS = $(C_SRC:%.c=%.o) |
82 | |
83 | 53 |
84 ## | 54 ## |
85 ## LIBRARIES | 55 ## LIBRARIES |
86 ## | 56 ## |
87 | |
88 LIBS = \ | 57 LIBS = \ |
89 -lglib-2.0 \ | 58 -lglib-2.0 \ |
90 -lgobject-2.0 \ | 59 -lgobject-2.0 \ |
91 -lws2_32 \ | 60 -lws2_32 \ |
92 -lintl \ | 61 -lintl \ |
93 -lgaim | 62 -lgaim |
94 | 63 |
95 | 64 include $(GAIM_COMMON_RULES) |
96 ## | |
97 ## RULES | |
98 ## | |
99 | |
100 # How to make a C file | |
101 | |
102 %.o: %.c | |
103 $(CC) $(CFLAGS) $(DEFINES) $(INCLUDE_PATHS) -o $@ -c $< | |
104 | 65 |
105 ## | 66 ## |
106 ## TARGET DEFINITIONS | 67 ## TARGET DEFINITIONS |
107 ## | 68 ## |
108 | 69 |
109 .PHONY: all clean | 70 .PHONY: all clean |
110 | 71 |
111 all: $(TARGET).dll | 72 all: $(TARGET).dll |
112 | 73 |
113 install: | 74 install: all $(DLL_INSTALL_DIR) |
114 cp $(YAHOO_ROOT)/$(TARGET).dll $(DLL_INSTALL_DIR) | 75 cp $(TARGET).dll $(DLL_INSTALL_DIR) |
115 | 76 |
77 $(OBJECTS): $(GAIM_CONFIG_H) | |
116 | 78 |
117 ## | 79 $(TARGET).dll: $(GAIM_LIBGAIM_DLL).a $(OBJECTS) |
118 ## BUILD Dependencies | |
119 ## | |
120 | |
121 $(LIBGAIM_TOP)/libgaim.dll.a: | |
122 $(MAKE) -C $(LIBGAIM_TOP) -f Makefile.mingw libgaim.dll.a | |
123 | |
124 ## | |
125 ## BUILD DLL | |
126 ## | |
127 | |
128 $(TARGET).dll: $(OBJECTS) $(LIBGAIM_TOP)/libgaim.dll.a | |
129 $(CC) -shared $(OBJECTS) $(LIB_PATHS) $(LIBS) $(DLL_LD_FLAGS) -o $(TARGET).dll | 80 $(CC) -shared $(OBJECTS) $(LIB_PATHS) $(LIBS) $(DLL_LD_FLAGS) -o $(TARGET).dll |
130 | |
131 | 81 |
132 ## | 82 ## |
133 ## CLEAN RULES | 83 ## CLEAN RULES |
134 ## | 84 ## |
85 clean: | |
86 rm -rf $(OBJECTS) | |
87 rm -rf $(TARGET).dll | |
135 | 88 |
136 clean: | 89 include $(GAIM_COMMON_TARGETS) |
137 rm -rf *.o | |
138 rm -rf $(TARGET).dll |