view plugins/perl/common/Makefile.mingw @ 13664:4132d997ccec

[gaim-migrate @ 16066] Fix Coverity CID 45: Check to make sure a channel 2 ICBM actually contains an IP address TLV before attempting to use it. This avoids a crash when the server sends us an abnormal channel 2 ICBM. I'm not sure if that ever happens. Fix Coverity CID 204: Don't attempt to send data over a FLAP BOS connection that doesn't exist. This should never happen because the account should get disconnected first. Fix Coverity CID 205: Don't check that a variable 'od' which we know is valid is not equal to NULL in aim_search_address() in family_userlookup.c Fix Coverity CID 206: Don't check that the variable 'od' which we know is valid is not equal to NULL in aim_chat_join() in family_oservice.c Fix Coverity CID 207: I neglected to remove a "return;" line from aim_admin_setnick() in family_admin.c which caused setting your AIM screen name formatting to not work. Fix Coverity CID 208: Remove a duplicate call to gaim_connection_get_account() in peer_connection_propose() in peer.c. Fix Coverity CID 209: Remove the unused variable "username" from incomingim_chan2() in oscar.c. Fix Coverity CID 210: Remove the unused variable "account" from peer_connection_listen_cb() in peer.c. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Thu, 20 Apr 2006 04:45:06 +0000
parents 60b863ecd89b
children
line wrap: on
line source

#
# Makefile.mingw
#
# Description: Makefile for Gaim perl module.
#

TARGET = Gaim
AUTOSPLIT = lib/auto/Gaim/autosplit.ix

##
## TOOLS
##

CC := gcc
PERL := /cygdrive/c/perl/bin/perl

##
## PATHS
##

EXTUTILS := C:/perl/lib/ExtUtils
GAIM_TOP := ../../..
GTK_TOP := ../../../../win32-dev/gtk_2_0
PERL_TOP := ../../../../win32-dev/perl58
PERL_PLUGIN_TOP := ..
GAIM_INSTALL_DIR :=	$(GAIM_TOP)/win32-install-dir
PERLMOD_INSTALL_DIR :=	$(GAIM_INSTALL_DIR)/perlmod


INCLUDE_PATHS =		-I. \
			-I$(GAIM_TOP) \
			-I$(GAIM_TOP)/src \
			-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/gtk-2.0/include \
			-I$(GTK_TOP)/lib/glib-2.0/include \
			-I$(PERL_TOP)/CORE

LIB_PATHS = 		-L$(PERL_TOP) \
			-L$(PERL_PLUGIN_TOP) \
			-L$(GAIM_TOP)/src \
			-L$(GTK_TOP)/lib


##
##  SOURCES, OBJECTS
##

XS_FILES =		Account.xs \
				AccountOpts.xs \
				BuddyIcon.xs \
				BuddyList.xs \
				Cipher.xs \
				Cmds.xs \
				Connection.xs \
				Conversation.xs \
				Debug.xs \
				FT.xs \
				Gaim.xs \
				ImgStore.xs \
				Log.xs \
				Network.xs \
				Notify.xs \
				Plugin.xs \
				PluginPref.xs \
				Pounce.xs \
				Prefs.xs \
				Privacy.xs \
				Proxy.xs \
				Prpl.xs \
				Request.xs \
				Roomlist.xs \
				SSLConn.xs \
				SavedStatuses.xs \
				Signal.xs \
				Server.xs \
				Sound.xs \
				Status.xs \
				Stringref.xs \
				Util.xs \
				XMLNode.xs \

FALLBACKS =		const-c.inc const-xs.inc

C_FILES = $(XS_FILES:%.xs=%.c)

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

##
## LIBRARIES
##

LIBS =			-lperl58 \
			-lperl \
			-lgaim \
			-lglib-2.0

##
## RULES
##

# How to make a C file
%.o: %.c
	$(CC) $(CFLAGS) $(INCLUDE_PATHS) $(DEFINES) -c $< -o $@

# How to make a XS file
%.c: %.xs
	$(PERL) $(EXTUTILS)/xsubpp -typemap $(EXTUTILS)/typemap -typemap typemap $< > $@

%.inc:
	cp fallback/$@ ./

##
## TARGETS
##

.PHONY: all clean

all: $(TARGET).dll $(AUTOSPLIT)
	
install:
	rm -rf $(PERLMOD_INSTALL_DIR)
	cp -R lib $(PERLMOD_INSTALL_DIR)
	cp $(TARGET).dll $(PERLMOD_INSTALL_DIR)
	
$(AUTOSPLIT): Gaim.pm
	mkdir -p ./lib/auto
	cp Gaim.pm ./lib
	$(PERL) -MAutoSplit -e 'autosplit("lib/Gaim.pm")'

$(TARGET).dll: $(FALLBACKS) $(OBJECTS)
	$(CC) -shared $(OBJECTS) $(LIB_PATHS) $(LIBS) -o $(TARGET).dll

##
## CLEAN
##

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