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