view plugins/perl/common/Makefile.mingw @ 8618:70aad91d9cb5

[gaim-migrate @ 9369] (00:55:17) JBSilvest: oh, btw, the other part of my Changelog.diff was to capitalize the first letter of the prior entry...it wasn't completely pointless (00:55:30) Luke: your diff didn't apply (00:55:37) JBSilvest: oh, right (00:55:37) Luke: cause i'd already fixed one mistake in it (00:55:44) JBSilvest: because of the other... (00:55:54) Luke: so i tried to manually merge it. i'm not very good at that (00:56:00) JBSilvest: (just consider it a future FYI ) committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Thu, 08 Apr 2004 04:43:53 +0000
parents f1fe68ef00c7
children 6dcfec6f2f7c
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/glib-2.0 \
			-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 \
			BuddyList.xs \
			BuddyList_Buddy.xs \
			BuddyList_Chat.xs \
			BuddyList_Group.xs \
			Connection.xs \
			ConvWindow.xs \
			Conversation.xs \
			Conversation_Chat.xs \
			Conversation_IM.xs \
			Gaim.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