#
# Makefile.mingw
#
# Description: Makefile for ticker plugin.
#

GAIM_TOP := ../../..
include $(GAIM_TOP)/libgaim/win32/global.mak

TARGET = ticker

##
## INCLUDE PATHS
##
INCLUDE_PATHS +=	-I. \
			-I$(GTK_TOP)/include \
			-I$(GTK_TOP)/include/gtk-2.0 \
			-I$(GTK_TOP)/include/glib-2.0 \
			-I$(GTK_TOP)/include/pango-1.0 \
			-I$(GTK_TOP)/include/atk-1.0 \
			-I$(GTK_TOP)/lib/glib-2.0/include \
			-I$(GTK_TOP)/lib/gtk-2.0/include \
			-I$(GAIM_LIB_TOP) \
			-I$(GAIM_LIB_TOP)/win32 \
			-I$(GAIM_GTK_TOP) \
			-I$(GAIM_GTK_TOP)/win32 \
			-I$(GAIM_TOP)

LIB_PATHS =		-L$(GTK_TOP)/lib \
			-L$(GAIM_LIB_TOP) \
			-L$(GAIM_GTK_TOP)

##
##  SOURCES, OBJECTS
##
C_SRC =			ticker.c \
			gtkticker.c

OBJECTS = $(C_SRC:%.c=%.o)

##
## LIBRARIES
##
LIBS =			-lgtk-win32-2.0 \
			-lglib-2.0 \
			-lgdk-win32-2.0 \
			-lgmodule-2.0 \
			-lgobject-2.0 \
			-lintl \
			-lgaim \
			-lgtkgaim

include $(GAIM_COMMON_RULES)

##
## TARGET DEFINITIONS
##
.PHONY: all clean

all: $(TARGET).dll

install: $(GAIM_INSTALL_PLUGINS_DIR)
	cp $(TARGET).dll $(GAIM_INSTALL_PLUGINS_DIR)

$(OBJECTS): $(GAIM_CONFIG_H)

$(TARGET).dll: $(GAIM_LIBGAIM_DLL).a $(GAIM_GTKGAIM_DLL).a $(OBJECTS)
	$(CC) -shared $(OBJECTS) $(LIB_PATHS) $(LIBS) $(DLL_LD_FLAGS) -o $(TARGET).dll

##
## CLEAN RULES
##
clean:
	rm -rf $(OBJECTS)
	rm -rf $(TARGET).dll

include $(GAIM_COMMON_TARGETS)
