view libpurple/plugins/perl/common/Makefile.mingw @ 16365:ca09f5b57672

This is mostly moving Purple::GtkUI:: -> Pidgin:: which has the side effect of actually making the module usable. It also cleans up some random bits in a handful of files, things like trailing slashes, empty extra lines, etc.
author Etan Reisner <pidgin@unreliablesource.net>
date Fri, 27 Apr 2007 05:18:14 +0000
parents 1843c0180fbe
children 39c7bb133a9f
line wrap: on
line source

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

PIDGIN_TREE_TOP := ../../../..
include $(PIDGIN_TREE_TOP)/libpurple/win32/global.mak

TARGET = Purple
AUTOSPLIT = lib/auto/Purple/autosplit.ix
EXTUTILS ?= C:/perl/lib/ExtUtils
PERL_PLUGIN_TOP := ..

CFLAGS += -Wno-comment -Wno-unused

##
## INCLUDE PATHS
##
INCLUDE_PATHS +=		-I. \
			-I$(PIDGIN_TREE_TOP) \
			-I$(PURPLE_TOP) \
			-I$(GTK_TOP)/include \
			-I$(GTK_TOP)/include/glib-2.0 \
			-I$(GTK_TOP)/lib/glib-2.0/include \
			-I$(PERL_LIB_TOP)/CORE

LIB_PATHS += 		-L$(PERL_LIB_TOP) \
			-L$(PERL_PLUGIN_TOP) \
			-L$(PURPLE_TOP) \
			-L$(GTK_TOP)/lib

##
##  SOURCES, OBJECTS
##
XS_FILES =		Account.xs \
				AccountOpts.xs \
				BuddyIcon.xs \
				BuddyList.xs \
				Cipher.xs \
				Cmds.xs \
				Connection.xs \
				Conversation.xs \
				Core.xs \
				Debug.xs \
				FT.xs \
				Purple.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 \
			-lpurple \
			-lglib-2.0

include $(PIDGIN_COMMON_RULES)

%.inc:
	cp fallback/$@ ./

##
## TARGETS
##
.PHONY: all install clean

all: $(TARGET).dll $(AUTOSPLIT)

install: all
	rm -rf $(PURPLE_INSTALL_PERLMOD_DIR)
	cp -R lib $(PURPLE_INSTALL_PERLMOD_DIR)
	cp $(TARGET).dll $(PURPLE_INSTALL_PERLMOD_DIR)

$(C_FILES): $(PURPLE_CONFIG_H)

$(AUTOSPLIT):
	mkdir -p ./lib/auto
	cp Purple.pm ./lib
	$(PERL) -MAutoSplit -e 'autosplit("lib/Purple.pm")'

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

##
## CLEAN
##
clean:
	rm -rf $(TARGET).dll $(FALLBACKS) lib
	rm -f *.o $(C_FILES)

include $(PIDGIN_COMMON_TARGETS)