summary refs log blame commit diff stats
path: root/plugins/python/makefile.mak
blob: dd321e892168398dd13e104f36a4a1483e398fc2 (plain) (tree)






















                                                                                                                                               
include "..\..\src\makeinc.mak"

TARGET = $(PYTHONOUTPUT)

all: $(TARGET)

python.def:
	echo EXPORTS > python.def
	echo xchat_plugin_init >> python.def
	echo xchat_plugin_deinit >> python.def
	echo xchat_plugin_get_info >> python.def

python.obj: python.c
	$(CC) $(CFLAGS) /Dusleep=_sleep /DPATH_MAX=255 python.c $(GLIB) /I.. /I$(PYTHONPATH)\INCLUDE /DPYTHON_DLL=\"$(PYTHONLIB).dll\"

$(TARGET): python.obj python.def
	$(LINK) /DLL /out:$(TARGET) $(LDFLAGS) python.obj $(PYTHONLIB).lib /LIBPATH:$(PYTHONPATH)\LIBS $(PYTHONLIB).lib $(LIBS) /def:python.def

clean:
	del $(TARGET)
	del *.obj
	del python.def
	del *.lib
	del *.exp
s/\\/\\\\/g; # double the number of \'s s/"/\\"/g; s/^\s*/"/; s/\n/\\n"\n/; } return @lines; } for my $files ( [ "xchat.pm.h", # output file "lib/Xchat.pm", # input files "lib/Xchat/Embed.pm", "lib/Xchat/List/Network.pm", "lib/Xchat/List/Network/Entry.pm", "lib/Xchat/List/Network/AutoJoin.pm", ], [ "irc.pm.h", # output file "lib/IRC.pm" # input file ] ) { my ($output,@inputs) = @$files; open my $header, ">", $output or die "Couldn't open '$output': $!"; print $header qq["BEGIN {\\n"\n]; for my $input ( @inputs ) { (my $trimmed = $input) =~ s{^lib/}{}; print $header qq["\$INC{'$trimmed'} = 'Compiled into the plugin.';\\n"\n]; } print $header qq["}\\n"\n]; for my $input ( @inputs ) { print $header qq["{\\n"\n]; print $header qq{"#line 1 \\"$input\\"\\n"\n}; print $header header( $input ); print $header qq["}\\n"\n]; } close $header; }