Mercurial > pidgin
comparison libgaim/protocols/msn/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 libmsn | 4 # Description: Makefile for win32 (mingw) version of libmsn |
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 MSN_ROOT := . | |
15 GAIM_INSTALL_DIR := $(GAIM_TOP)/win32-install-dir | |
16 | |
17 ## | |
18 ## VARIABLE DEFINITIONS | |
19 ## | |
20 | 9 |
21 TARGET = libmsn | 10 TARGET = libmsn |
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$(MSN_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 = cmdproc.c \ | 39 C_SRC = cmdproc.c \ |
68 command.c \ | 40 command.c \ |
69 dialog.c \ | 41 dialog.c \ |
70 directconn.c \ | 42 directconn.c \ |
71 error.c \ | 43 error.c \ |
92 transaction.c \ | 64 transaction.c \ |
93 user.c \ | 65 user.c \ |
94 userlist.c \ | 66 userlist.c \ |
95 msn-utils.c | 67 msn-utils.c |
96 | 68 |
97 | |
98 OBJECTS = $(C_SRC:%.c=%.o) | 69 OBJECTS = $(C_SRC:%.c=%.o) |
99 | |
100 | 70 |
101 ## | 71 ## |
102 ## LIBRARIES | 72 ## LIBRARIES |
103 ## | 73 ## |
104 | |
105 LIBS = \ | 74 LIBS = \ |
106 -lglib-2.0 \ | 75 -lglib-2.0 \ |
107 -lintl \ | 76 -lintl \ |
108 -lws2_32 \ | 77 -lws2_32 \ |
109 -lgaim | 78 -lgaim |
110 | 79 |
111 | 80 include $(GAIM_COMMON_RULES) |
112 ## | |
113 ## RULES | |
114 ## | |
115 | |
116 # How to make a C file | |
117 | |
118 %.o: %.c | |
119 $(CC) $(CFLAGS) $(DEFINES) $(INCLUDE_PATHS) -o $@ -c $< | |
120 | 81 |
121 ## | 82 ## |
122 ## TARGET DEFINITIONS | 83 ## TARGET DEFINITIONS |
123 ## | 84 ## |
124 | |
125 .PHONY: all clean | 85 .PHONY: all clean |
126 | 86 |
127 all: $(TARGET).dll | 87 all: $(TARGET).dll |
128 | 88 |
129 install: | 89 install: all $(DLL_INSTALL_DIR) |
130 cp $(MSN_ROOT)/$(TARGET).dll $(DLL_INSTALL_DIR) | 90 cp $(TARGET).dll $(DLL_INSTALL_DIR) |
131 | 91 |
92 $(OBJECTS): $(GAIM_CONFIG_H) | |
132 | 93 |
133 ## | 94 $(TARGET).dll: $(GAIM_LIBGAIM_DLL).a $(OBJECTS) |
134 ## BUILD Dependencies | |
135 ## | |
136 | |
137 $(LIBGAIM_TOP)/libgaim.dll.a: | |
138 $(MAKE) -C $(LIBGAIM_TOP) -f Makefile.mingw libgaim.dll.a | |
139 | |
140 ## | |
141 ## BUILD DLL | |
142 ## | |
143 | |
144 $(TARGET).dll: $(OBJECTS) $(LIBGAIM_TOP)/libgaim.dll.a | |
145 $(CC) -shared $(OBJECTS) $(LIB_PATHS) $(LIBS) $(DLL_LD_FLAGS) -o $(TARGET).dll | 95 $(CC) -shared $(OBJECTS) $(LIB_PATHS) $(LIBS) $(DLL_LD_FLAGS) -o $(TARGET).dll |
146 | |
147 | 96 |
148 ## | 97 ## |
149 ## CLEAN RULES | 98 ## CLEAN RULES |
150 ## | 99 ## |
100 clean: | |
101 rm -rf $(OBJECTS) | |
102 rm -rf $(TARGET).dll | |
151 | 103 |
152 clean: | 104 include $(GAIM_COMMON_TARGETS) |
153 rm -rf *.o | |
154 rm -rf $(TARGET).dll |