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