Handle unescaped accented chars in incoming MSN presences.
[thrasher.git] / Makefile
blob8af786639d341591ab87e38092ca8f5f5291e984
1 ### "config" options
2 PERL = /usr/bin/perl
3 GLIB_PREFIX = /usr
4 PURPLE_PREFIX = /usr
5 ### end of build config
7 PERL_INC := $(shell PERL5LIB= $(PERL) -MExtUtils::Embed -e ccopts -e ldpopts)
9 GLIB_CFLAGS = -I$(GLIB_PREFIX)/include/glib-2.0 \
10 -I$(GLIB_PREFIX)/include/glib-2.0/glib \
11 -I$(GLIB_PREFIX)/lib/glib-2.0/include \
12 -I$(PURPLE_PREFIX)/include/libpurple \
13 -DPURPLE_DISABLE_DEPRECATED \
14 $(PERL_INC)
16 GLIB_LIBS := -L$(GLIB_PREFIX)/lib \
17 -lpurple \
18 -lgobject-2.0 \
19 -lgmodule-2.0 \
20 -lgthread-2.0 \
21 -lglib-2.0 \
22 -ldl \
23 $(shell PERL5LIB= $(PERL) -MConfig -e'print "-L$$Config::Config{archlibexp}/CORE";') \
24 -lperl \
25 -lcrypt \
26 -lrt
28 CFLAGS = -Wall \
29 -Waggregate-return \
30 -Wcast-align \
31 -Werror-implicit-function-declaration \
32 -Wmissing-declarations \
33 -Wmissing-prototypes \
34 -Wnested-externs \
35 -Wpointer-arith \
36 -Wundef \
37 -O2
39 DEBUG_CFLAGS = -DTH_DEBUG \
40 -DERROR_DEBUG
42 DEBUG_GLIB = -g \
43 -ggdb
45 DEPDIR = .deps
46 OBJS = thperl.o \
47 thblist.o \
48 thrasher.o \
49 thpresence.o \
50 thconnection.o \
51 threquest.o \
52 thconversations.o \
53 thft.o
55 COMPILE = gcc -DHAVE_CONFIG_H -I. $(GLIB_CFLAGS) $(DEBUG_CFLAGS) $(CFLAGS)
56 WRAPPER = THPPW
57 WRAPPER_PATH = perl/lib
60 .PHONY: clean again
62 all: $(DEPDIR) $(OBJS) thperl_wrap.c wrapper
64 wrapper: $(WRAPPER_PATH)/$(WRAPPER).pm thperl_wrap.o $(WRAPPER).so
66 thperl_wrap.o: thperl_wrap.c
67 $(CC) $(DEBUG_CFLAGS) $(DEBUG_GLIB) -fPIC -c thperl.c thperl_wrap.c -fPIC $(GLIB_CFLAGS)
69 $(WRAPPER).so: $(OBJS) thperl_wrap.o
70 $(CC) -shared $(GLIB_LIBS) $(OBJS) thperl_wrap.o -o $(WRAPPER).so
72 thperl_wrap.c $(WRAPPER_PATH)/$(WRAPPER).pm: thperl.h
73 swig -I$(PURPLE_PREFIX)/include $(DEBUG_CFLAGS) -perl -outdir $(WRAPPER_PATH) thperl.h
75 $(DEPDIR):
76 if test ! -d $(DEPDIR); then mkdir $(DEPDIR); fi
78 .c.o:
79 $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
80 mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
82 again: clean all
84 clean:
85 $(RM) -f $(OBJS)
86 $(RM) -rf $(DEPDIR)
87 $(RM) -f thperl_wrap.*
88 $(RM) -f $(WRAPPER).so
89 $(RM) -f $(WRAPPER_PATH)/$(WRAPPER).pm $(WRAPPER).pm