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