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