Mercurial > pidgin.yaz
annotate libgaim/protocols/silc/Makefile.mingw @ 14232:a7590884324d
[gaim-migrate @ 16914]
Protocols now compile on win32.
Next, everything needs to be put all together.
committer: Tailor Script <tailor@pidgin.im>
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Sun, 20 Aug 2006 18:49:08 +0000 |
parents | 60b1bc8dbf37 |
children | 8793fc8f7064 |
rev | line source |
---|---|
14192 | 1 # |
2 # Makefile.mingw | |
3 # | |
4 # Description: Makefile for win32 (mingw) version of libsilc protocol plugin | |
5 # | |
6 | |
7 # | |
8 # PATHS | |
9 # | |
10 | |
11 GTK_TOP := ../../../../win32-dev/gtk_2_0 | |
12 GAIM_TOP := ../../.. | |
14232
a7590884324d
[gaim-migrate @ 16914]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
14192
diff
changeset
|
13 LIBGAIM_TOP := ../.. |
14192 | 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 | |
22 TARGET = libsilc | |
23 | |
24 NEEDED_DLLS = $(SILC_TOOLKIT)/lib/silc.dll \ | |
25 $(SILC_TOOLKIT)/lib/silcclient.dll | |
26 | |
27 # Compiler Options | |
28 | |
29 CFLAGS = | |
30 | |
31 DEFINES = | |
32 | |
14232
a7590884324d
[gaim-migrate @ 16914]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
14192
diff
changeset
|
33 # Static or Plugin... |
14192 | 34 ifeq ($(TYPE),STATIC) |
35 DEFINES += -DSTATIC | |
36 DLL_INSTALL_DIR = $(GAIM_INSTALL_DIR) | |
37 else | |
38 ifeq ($(TYPE),PLUGIN) | |
39 DLL_INSTALL_DIR = $(GAIM_INSTALL_DIR)/plugins | |
40 endif | |
41 endif | |
42 | |
43 | |
44 ## | |
45 ## INCLUDE MAKEFILES | |
46 ## | |
47 | |
14232
a7590884324d
[gaim-migrate @ 16914]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
14192
diff
changeset
|
48 include $(LIBGAIM_TOP)/win32/global.mak |
14192 | 49 |
50 ## | |
51 ## INCLUDE PATHS | |
52 ## | |
53 | |
54 INCLUDE_PATHS += -I$(SILC_TOP) \ | |
55 -I$(GTK_TOP)/include \ | |
56 -I$(GTK_TOP)/include/glib-2.0 \ | |
57 -I$(GTK_TOP)/lib/glib-2.0/include \ | |
14232
a7590884324d
[gaim-migrate @ 16914]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
14192
diff
changeset
|
58 -I$(LIBGAIM_TOP) \ |
a7590884324d
[gaim-migrate @ 16914]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
14192
diff
changeset
|
59 -I$(LIBGAIM_TOP)/win32 \ |
14192 | 60 -I$(GAIM_TOP) \ |
61 -I$(SILC_TOOLKIT)/include | |
62 | |
63 | |
64 LIB_PATHS = -L$(GTK_TOP)/lib \ | |
14232
a7590884324d
[gaim-migrate @ 16914]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
14192
diff
changeset
|
65 -L$(LIBGAIM_TOP) \ |
14192 | 66 -L$(SILC_TOOLKIT)/lib |
67 | |
68 | |
69 ## | |
70 ## SOURCES, OBJECTS | |
71 ## | |
72 | |
73 C_SRC = silc.c \ | |
74 buddy.c \ | |
75 chat.c \ | |
76 ft.c \ | |
77 ops.c \ | |
78 pk.c \ | |
79 util.c \ | |
80 wb.c | |
81 | |
82 | |
83 OBJECTS = $(C_SRC:%.c=%.o) | |
84 | |
85 | |
86 ## | |
87 ## LIBRARIES | |
88 ## | |
89 | |
90 LIBS = \ | |
91 -lglib-2.0 \ | |
92 -lws2_32 \ | |
93 -lintl \ | |
94 -lgaim \ | |
95 -lsilc \ | |
96 -lsilcclient | |
97 | |
98 | |
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 | |
108 ## | |
109 ## TARGET DEFINITIONS | |
110 ## | |
111 | |
112 .PHONY: all clean | |
113 | |
114 all: $(TARGET).dll | |
115 | |
116 install: | |
117 cp $(SILC_TOP)/$(TARGET).dll $(DLL_INSTALL_DIR) | |
118 cp $(NEEDED_DLLS) $(GAIM_INSTALL_DIR) | |
119 | |
120 | |
121 ## | |
122 ## BUILD Dependencies | |
123 ## | |
124 | |
14232
a7590884324d
[gaim-migrate @ 16914]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
14192
diff
changeset
|
125 $(LIBGAIM_TOP)/libgaim.dll.a: |
a7590884324d
[gaim-migrate @ 16914]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
14192
diff
changeset
|
126 $(MAKE) -C $(LIBGAIM_TOP) -f Makefile.mingw libgaim.dll.a |
14192 | 127 |
128 ## | |
129 ## BUILD DLL | |
130 ## | |
131 | |
14232
a7590884324d
[gaim-migrate @ 16914]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
14192
diff
changeset
|
132 $(TARGET).dll: $(OBJECTS) $(LIBGAIM_TOP)/libgaim.dll.a |
14192 | 133 $(CC) -shared $(OBJECTS) $(LIB_PATHS) $(LIBS) $(DLL_LD_FLAGS) -Wl,--image-base,0x64000000 -o $(TARGET).dll |
134 | |
135 ## | |
136 ## CLEAN RULES | |
137 ## | |
138 | |
139 clean: | |
140 rm -rf *.o | |
141 rm -rf $(TARGET).dll |