Mercurial > pidgin.yaz
comparison libgaim/protocols/irc/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 | 4dce0b552c83 |
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 libirc | 4 # Description: Makefile for win32 (mingw) version of libirc |
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 IRC_ROOT := . | |
15 GAIM_INSTALL_DIR := $(GAIM_TOP)/win32-install-dir | |
16 | |
17 ## | |
18 ## VARIABLE DEFINITIONS | |
19 ## | |
20 | 9 |
21 TARGET = libirc | 10 TARGET = libirc |
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$(IRC_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 = cmds.c \ | 39 C_SRC = cmds.c \ |
68 dcc_send.c \ | 40 dcc_send.c \ |
69 irc.c \ | 41 irc.c \ |
70 msgs.c \ | 42 msgs.c \ |
71 parse.c | 43 parse.c |
72 | 44 |
73 | |
74 OBJECTS = $(C_SRC:%.c=%.o) | 45 OBJECTS = $(C_SRC:%.c=%.o) |
75 | |
76 | 46 |
77 ## | 47 ## |
78 ## LIBRARIES | 48 ## LIBRARIES |
79 ## | 49 ## |
80 | |
81 LIBS = \ | 50 LIBS = \ |
82 -lglib-2.0 \ | 51 -lglib-2.0 \ |
83 -lgobject-2.0 \ | 52 -lgobject-2.0 \ |
84 -lws2_32 \ | 53 -lws2_32 \ |
85 -lintl \ | 54 -lintl \ |
86 -lgaim | 55 -lgaim |
87 | 56 |
88 | 57 include $(GAIM_COMMON_RULES) |
89 ## | |
90 ## RULES | |
91 ## | |
92 | |
93 # How to make a C file | |
94 | |
95 %.o: %.c | |
96 $(CC) $(CFLAGS) $(DEFINES) $(INCLUDE_PATHS) -o $@ -c $< | |
97 | 58 |
98 ## | 59 ## |
99 ## TARGET DEFINITIONS | 60 ## TARGET DEFINITIONS |
100 ## | 61 ## |
101 | |
102 .PHONY: all clean | 62 .PHONY: all clean |
103 | 63 |
104 all: $(TARGET).dll | 64 all: $(TARGET).dll |
105 | 65 |
106 install: | 66 install: all $(DLL_INSTALL_DIR) |
107 cp $(IRC_ROOT)/$(TARGET).dll $(DLL_INSTALL_DIR) | 67 cp $(TARGET).dll $(DLL_INSTALL_DIR) |
108 | 68 |
109 | 69 $(OBJECTS): $(GAIM_CONFIG_H) |
110 ## | |
111 ## BUILD Dependencies | |
112 ## | |
113 | |
114 $(LIBGAIM_TOP)/libgaim.dll.a: | |
115 $(MAKE) -C $(LIBGAIM_TOP) -f Makefile.mingw libgaim.dll.a | |
116 | 70 |
117 ## | 71 ## |
118 ## BUILD DLL | 72 ## BUILD DLL |
119 ## | 73 ## |
120 | 74 $(TARGET).dll: $(GAIM_LIBGAIM_DLL).a $(OBJECTS) |
121 $(TARGET).dll: $(OBJECTS) $(LIBGAIM_TOP)/libgaim.dll.a | |
122 $(CC) -shared $(OBJECTS) $(LIB_PATHS) $(LIBS) $(DLL_LD_FLAGS) -o $(TARGET).dll | 75 $(CC) -shared $(OBJECTS) $(LIB_PATHS) $(LIBS) $(DLL_LD_FLAGS) -o $(TARGET).dll |
123 | 76 |
124 ## | 77 ## |
125 ## CLEAN RULES | 78 ## CLEAN RULES |
126 ## | 79 ## |
127 | 80 |
128 clean: | 81 clean: |
129 rm -rf *.o | 82 rm -rf $(OBJECTS) |
130 rm -rf $(TARGET).dll | 83 rm -rf $(TARGET).dll |
84 | |
85 include $(GAIM_COMMON_RULES) |