14192
|
1 #
|
|
2 # Makefile.mingw
|
|
3 #
|
|
4 # Description: Makefile for win32 (mingw) version of libsimple
|
|
5 #
|
|
6
|
|
7 #
|
|
8 # PATHS
|
|
9 #
|
|
10
|
|
11 INCLUDE_DIR := .
|
|
12 GTK_TOP := ../../../../win32-dev/gtk_2_0
|
|
13 GAIM_TOP := ../../..
|
|
14 SIMPLE_ROOT := .
|
|
15 GAIM_INSTALL_DIR := $(GAIM_TOP)/win32-install-dir
|
|
16
|
|
17 ##
|
|
18 ## VARIABLE DEFINITIONS
|
|
19 ##
|
|
20
|
|
21 TARGET = libsimple
|
|
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$(SIMPLE_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 = simple.c \
|
|
72 sipmsg.c
|
|
73
|
|
74
|
|
75 OBJECTS = $(C_SRC:%.c=%.o)
|
|
76
|
|
77
|
|
78 ##
|
|
79 ## LIBRARIES
|
|
80 ##
|
|
81
|
|
82 LIBS = \
|
|
83 -lglib-2.0 \
|
|
84 -lgobject-2.0 \
|
|
85 -lws2_32 \
|
|
86 -lintl \
|
|
87 -lgaim
|
|
88
|
|
89
|
|
90 ##
|
|
91 ## RULES
|
|
92 ##
|
|
93
|
|
94 # How to make a C file
|
|
95
|
|
96 %.o: %.c
|
|
97 $(CC) $(CFLAGS) $(DEFINES) $(INCLUDE_PATHS) -o $@ -c $<
|
|
98
|
|
99 ##
|
|
100 ## TARGET DEFINITIONS
|
|
101 ##
|
|
102
|
|
103 .PHONY: all clean
|
|
104
|
|
105 all: $(TARGET).dll
|
|
106
|
|
107 install:
|
|
108 cp $(SIMPLE_ROOT)/$(TARGET).dll $(DLL_INSTALL_DIR)
|
|
109
|
|
110
|
|
111 ##
|
|
112 ## BUILD Dependencies
|
|
113 ##
|
|
114
|
|
115 $(GAIM_TOP)/src/gaim.lib:
|
|
116 $(MAKE) -C $(GAIM_TOP)/src -f Makefile.mingw gaim.lib
|
|
117
|
|
118 ##
|
|
119 ## BUILD DLL
|
|
120 ##
|
|
121
|
|
122 $(TARGET).dll: $(OBJECTS) $(GAIM_TOP)/src/gaim.lib
|
|
123 $(CC) -shared $(OBJECTS) $(LIB_PATHS) $(LIBS) $(DLL_LD_FLAGS) -Wl,--out-implib,$(TARGET).lib -o $(TARGET).dll
|
|
124
|
|
125
|
|
126 ##
|
|
127 ## CLEAN RULES
|
|
128 ##
|
|
129
|
|
130 clean:
|
|
131 rm -rf *.o
|
|
132 rm -rf $(TARGET).dll
|
|
133 rm -rf $(TARGET).lib
|