1#
2# Makefile.mingw
3#
4# Description: Makefile for win32 (mingw) version of libirc
5#
6
7PIDGIN_TREE_TOP := ../../..
8include $(PIDGIN_TREE_TOP)/libpurple/win32/global.mak
9
10TARGET = libirc
11TYPE = PLUGIN
12
13# Static or Plugin...
14ifeq ($(TYPE),STATIC)
15  DEFINES += -DSTATIC
16  DLL_INSTALL_DIR =	$(PURPLE_INSTALL_DIR)
17else
18ifeq ($(TYPE),PLUGIN)
19  DLL_INSTALL_DIR =	$(PURPLE_INSTALL_PLUGINS_DIR)
20endif
21endif
22
23##
24## INCLUDE PATHS
25##
26INCLUDE_PATHS +=	-I. \
27			-I$(GTK_TOP)/include \
28			-I$(GTK_TOP)/include/glib-2.0 \
29			-I$(GTK_TOP)/lib/glib-2.0/include \
30			-I$(PURPLE_TOP) \
31			-I$(PURPLE_TOP)/win32 \
32			-I$(PIDGIN_TREE_TOP)
33
34LIB_PATHS +=		-L$(GTK_TOP)/lib \
35			-L$(PURPLE_TOP)
36
37##
38##  SOURCES, OBJECTS
39##
40C_SRC =			cmds.c \
41			dcc_send.c \
42			irc.c \
43			msgs.c \
44			parse.c
45
46OBJECTS = $(C_SRC:%.c=%.o)
47
48##
49## LIBRARIES
50##
51LIBS =	\
52			-lglib-2.0 \
53			-lws2_32 \
54			-lintl \
55			-lpurple
56
57
58ifeq ($(CYRUS_SASL), 1)
59INCLUDE_PATHS += -I$(CYRUS_SASL_TOP)/include
60LIB_PATHS += -L$(CYRUS_SASL_TOP)/lib
61LIBS += -llibsasl2
62endif
63
64include $(PIDGIN_COMMON_RULES)
65
66##
67## TARGET DEFINITIONS
68##
69.PHONY: all install clean
70
71all: $(TARGET).dll
72
73install: all $(DLL_INSTALL_DIR)
74	cp $(TARGET).dll $(DLL_INSTALL_DIR)
75
76$(OBJECTS): $(PURPLE_CONFIG_H)
77
78##
79## BUILD DLL
80##
81$(TARGET).dll: $(PURPLE_DLL).a $(OBJECTS)
82	$(CC) -shared $(OBJECTS) $(LIB_PATHS) $(LIBS) $(DLL_LD_FLAGS) -o $(TARGET).dll
83
84##
85## CLEAN RULES
86##
87
88clean:
89	rm -f $(OBJECTS)
90	rm -f $(TARGET).dll
91
92include $(PIDGIN_COMMON_TARGETS)
93