Mercurial > pidgin.yaz
comparison libgaim/protocols/oscar/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 | 82373bb6a47a |
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 liboscar | 4 # Description: Makefile for win32 (mingw) version of liboscar |
5 # | 5 # |
6 | 6 |
7 # | 7 GAIM_TOP := ../../.. |
8 # PATHS | 8 include $(GAIM_TOP)/libgaim/win32/global.mak |
9 # | |
10 | |
11 OSCAR_ROOT := . | |
12 GTK_TOP := ../../../../win32-dev/gtk_2_0 | |
13 GAIM_TOP := ../../.. | |
14 LIBGAIM_TOP := ../.. | |
15 GAIM_INSTALL_DIR := $(GAIM_TOP)/win32-install-dir | |
16 | |
17 ## | |
18 ## VARIABLE DEFINITIONS | |
19 ## | |
20 | 9 |
21 TARGET = liboscar | 10 TARGET = liboscar |
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$(OSCAR_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 = \ | 39 C_SRC = \ |
68 bstream.c \ | 40 bstream.c \ |
69 family_admin.c \ | 41 family_admin.c \ |
70 family_advert.c \ | 42 family_advert.c \ |
71 family_alert.c \ | 43 family_alert.c \ |
98 rxhandlers.c \ | 70 rxhandlers.c \ |
99 snac.c \ | 71 snac.c \ |
100 tlv.c \ | 72 tlv.c \ |
101 util.c | 73 util.c |
102 | 74 |
103 | |
104 OBJECTS = $(C_SRC:%.c=%.o) | 75 OBJECTS = $(C_SRC:%.c=%.o) |
105 | |
106 | 76 |
107 ## | 77 ## |
108 ## LIBRARIES | 78 ## LIBRARIES |
109 ## | 79 ## |
110 | |
111 LIBS = \ | 80 LIBS = \ |
112 -lglib-2.0 \ | 81 -lglib-2.0 \ |
113 -lintl \ | 82 -lintl \ |
114 -lws2_32 \ | 83 -lws2_32 \ |
115 -lgaim | 84 -lgaim |
116 | 85 |
117 | 86 include $(GAIM_COMMON_RULES) |
118 ## | |
119 ## RULES | |
120 ## | |
121 | |
122 # How to make a C file | |
123 | |
124 %.o: %.c | |
125 $(CC) $(CFLAGS) $(DEFINES) $(INCLUDE_PATHS) -o $@ -c $< | |
126 | 87 |
127 ## | 88 ## |
128 ## TARGET DEFINITIONS | 89 ## TARGET DEFINITIONS |
129 ## | 90 ## |
130 | |
131 .PHONY: all clean | 91 .PHONY: all clean |
132 | 92 |
133 all: $(TARGET).dll | 93 all: $(TARGET).dll |
134 | 94 |
135 install: | 95 install: all $(DLL_INSTALL_DIR) |
136 cp $(OSCAR_ROOT)/$(TARGET).dll $(DLL_INSTALL_DIR) | 96 cp $(TARGET).dll $(DLL_INSTALL_DIR) |
137 | 97 |
98 $(OBJECTS): $(GAIM_CONFIG_H) | |
138 | 99 |
139 ## | 100 $(TARGET).dll: $(GAIM_LIBGAIM_DLL).a $(OBJECTS) |
140 ## BUILD Dependencies | |
141 ## | |
142 | |
143 $(LIBGAIM_TOP)/libgaim.dll.a: | |
144 $(MAKE) -C $(LIBGAIM_TOP) -f Makefile.mingw libgaim.dll.a | |
145 | |
146 ## | |
147 ## BUILD DLL | |
148 ## | |
149 | |
150 $(TARGET).dll: $(OBJECTS) $(LIBGAIM_TOP)/libgaim.dll.a | |
151 $(CC) -shared $(OBJECTS) $(LIB_PATHS) $(LIBS) $(DLL_LD_FLAGS) -o $(TARGET).dll | 101 $(CC) -shared $(OBJECTS) $(LIB_PATHS) $(LIBS) $(DLL_LD_FLAGS) -o $(TARGET).dll |
152 | 102 |
153 ## | 103 ## |
154 ## CLEAN RULES | 104 ## CLEAN RULES |
155 ## | 105 ## |
106 clean: | |
107 rm -rf $(OBJECTS) | |
108 rm -rf $(TARGET).dll | |
156 | 109 |
157 clean: | 110 include $(GAIM_COMMON_TARGETS) |
158 rm -rf *.o | |
159 rm -rf $(TARGET).dll |