view libgaim/plugins/tcl/Makefile.mingw @ 14224:ab8a105eff62

[gaim-migrate @ 16905] First step of getting wingaim working again. libgaim and gtk are compiling. The protocols aren't compiling yet. There are a number of things that are compiling, but should be cleaned up. committer: Tailor Script <tailor@pidgin.im>
author Daniel Atallah <daniel.atallah@gmail.com>
date Sun, 20 Aug 2006 16:49:37 +0000
parents 60b1bc8dbf37
children 8793fc8f7064
line wrap: on
line source

#
# Makefile.mingw
#
# Description: Makefile for tcl plugin loader plugin.
#

#
# PATHS
#

GTK_TOP :=		../../../../win32-dev/gtk_2_0
GAIM_TOP :=		../../..
LIBGAIM_TOP :=		../..
TCL_LIB_DIR :=		../../../../win32-dev/tcl-8.4.5
TCL_INC_DIR :=		$(TCL_LIB_DIR)/include
GAIM_INSTALL_DIR :=	$(GAIM_TOP)/win32-install-dir
DLL_INSTALL_DIR :=	$(GAIM_INSTALL_DIR)/plugins

##
## VARIABLE DEFINITIONS
##

TARGET = tcl

# Compiler Options

CFLAGS =

DEFINES = -DHAVE_TK -DUSE_TCL_STUBS -DUSE_TK_STUBS

##
## INCLUDE  MAKEFILES
##

include $(LIBGAIM_TOP)/win32/global.mak

##
## INCLUDE PATHS
##

INCLUDE_PATHS +=	-I. \
			-I$(GAIM_TOP) \
			-I$(LIBGAIM_TOP) \
			-I$(LIBGAIM_TOP)/win32 \
			-I$(GTK_TOP)/include \
			-I$(GTK_TOP)/include/glib-2.0 \
			-I$(GTK_TOP)/lib/glib-2.0/include \
			-I$(TCL_INC_DIR)


LIB_PATHS =		-L$(GTK_TOP)/lib \
			-L$(LIBGAIM_TOP) \
			-L$(TCL_LIB_DIR)


##
##  SOURCES, OBJECTS
##

C_SRC =			tcl.c \
			tcl_cmd.c \
			tcl_cmds.c \
			tcl_glib.c \
			tcl_ref.c \
			tcl_signals.c


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


##
## LIBRARIES
##

LIBS =	\
			-lglib-2.0 \
			-lws2_32 \
			-lintl \
			-lgaim \
			-ltclstub84 \
			-ltkstub84


##
## RULES
##

# How to make a C file

%.o: %.c
	$(CC) $(CFLAGS) $(DEFINES) $(INCLUDE_PATHS) -o $@ -c $<

##
## TARGET DEFINITIONS
##

.PHONY: all clean

all: $(TARGET).dll

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

##
## BUILD Dependencies
##

$(LIBGAIM_TOP)/libgaim.dll.a:
	$(MAKE) -C $(LIBGAIM_TOP) -f Makefile.mingw libgaim.dll.a

##
## BUILD DLL
##

$(TARGET).dll: $(OBJECTS) $(LIBGAIM_TOP)/libgaim.dll.a
	$(CC) -shared $(OBJECTS) $(LIB_PATHS) $(LIBS) $(DLL_LD_FLAGS) -o $(TARGET).dll


##
## CLEAN RULES
##

clean:
	rm -rf *.o
	rm -rf $(TARGET).dll