8675
|
1 #
|
|
2 # Makefile.mingw
|
|
3 #
|
|
4 # Description: Makefile for win32 (mingw) version of libnovell
|
|
5 #
|
|
6
|
|
7 #
|
|
8 # PATHS
|
|
9 #
|
|
10
|
|
11 INCLUDE_DIR := .
|
|
12 GTK_TOP := ../../../../win32-dev/gtk_2_0
|
|
13 GAIM_TOP := ../../..
|
|
14 NOVELL_ROOT := .
|
|
15 GAIM_INSTALL_DIR := $(GAIM_TOP)/win32-install-dir
|
|
16
|
|
17 ##
|
|
18 ## VARIABLE DEFINITIONS
|
|
19 ##
|
|
20
|
|
21 TARGET = libnovell
|
|
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$(NOVELL_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 = nmfield.c \
|
|
72 nmconn.c \
|
|
73 nmconference.c \
|
|
74 nmcontact.c \
|
|
75 nmevent.c \
|
|
76 nmmessage.c \
|
|
77 nmrequest.c \
|
|
78 nmuser.c \
|
|
79 nmuserrecord.c \
|
|
80 novell.c
|
|
81
|
|
82 OBJECTS = $(C_SRC:%.c=%.o)
|
|
83
|
|
84
|
|
85 ##
|
|
86 ## LIBRARIES
|
|
87 ##
|
|
88
|
|
89 LIBS = -lgtk-win32-2.0 \
|
|
90 -lglib-2.0 \
|
|
91 -lgdk-win32-2.0 \
|
|
92 -lgmodule-2.0 \
|
|
93 -lgobject-2.0 \
|
|
94 -lws2_32 \
|
|
95 -lintl \
|
|
96 -lgaim
|
|
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 $(NOVELL_ROOT)/$(TARGET).dll $(DLL_INSTALL_DIR)
|
|
118
|
|
119
|
|
120 ##
|
|
121 ## BUILD Dependencies
|
|
122 ##
|
|
123
|
|
124 $(GAIM_TOP)/src/gaim.lib:
|
|
125 $(MAKE) -C $(GAIM_TOP)/src -f Makefile.mingw gaim.lib
|
|
126
|
|
127 ##
|
|
128 ## BUILD DLL
|
|
129 ##
|
|
130
|
|
131 $(TARGET).dll: $(OBJECTS) $(GAIM_TOP)/src/gaim.lib
|
|
132 $(CC) -shared $(OBJECTS) $(LIB_PATHS) $(LIBS) $(DLL_LD_FLAGS) -Wl,--out-implib,$(TARGET).lib -o $(TARGET).dll
|
|
133
|
|
134
|
|
135 ##
|
|
136 ## CLEAN RULES
|
|
137 ##
|
|
138
|
|
139 clean:
|
|
140 rm -rf *.o
|
|
141 rm -rf $(TARGET).dll
|
|
142 rm -rf $(TARGET).lib
|