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 \
16 GLIB_LIBS
:= -L
$(GLIB_PREFIX
)/lib \
23 $(shell PERL5LIB
= $(PERL
) -MConfig
-e
'print "-L$$Config::Config{archlibexp}/CORE";') \
31 -Werror-implicit-function-declaration \
32 -Wmissing-declarations \
33 -Wmissing-prototypes \
39 DEBUG_CFLAGS
= -DTH_DEBUG \
55 COMPILE
= gcc
-DHAVE_CONFIG_H
-I.
$(GLIB_CFLAGS
) $(DEBUG_CFLAGS
) $(CFLAGS
)
57 WRAPPER_PATH
= perl
/lib
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
76 if
test ! -d
$(DEPDIR
); then mkdir
$(DEPDIR
); fi
79 $(COMPILE
) -MT
$@
-MD
-MP
-MF
$(DEPDIR
)/$*.Tpo
-c
-o
$@
$<
80 mv
-f
$(DEPDIR
)/$*.Tpo
$(DEPDIR
)/$*.Po
87 $(RM
) -f thperl_wrap.
*
88 $(RM
) -f
$(WRAPPER
).so
89 $(RM
) -f
$(WRAPPER_PATH
)/$(WRAPPER
).pm
$(WRAPPER
).pm