~vaifrax/inkscape/bugfix170049

« back to all changes in this revision

Viewing changes to src/extension/script/Makefile.tmp

  • Committer: mental
  • Date: 2006-01-16 02:36:01 UTC
  • Revision ID: mental@users.sourceforge.net-20060116023601-wkr0h7edl5veyudq
moving trunk for module inkscape

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#############################################
 
2
# Makefile for testing embedding
 
3
#
 
4
# This temporary makefile is for designing
 
5
# and testing a generic structure for embedding
 
6
# interpreters in Inkscape, and binding back
 
7
# from them into the Inkscape internals.  This
 
8
# would allow users to automate some Inkscape
 
9
# functionality.
 
10
#############################################
 
11
 
 
12
CXX = g++
 
13
 
 
14
WRAPS = \
 
15
inkscape_py_wrap.o \
 
16
inkscape_perl_wrap.o
 
17
 
 
18
OBJ = \
 
19
InkscapeScript.o \
 
20
InkscapeInterpreter.o \
 
21
InkscapeBinding.o \
 
22
InkscapePython.o  \
 
23
InkscapePerl.o \
 
24
$(WRAPS)
 
25
 
 
26
#########################################################
 
27
# NOTE that we are using the interpreters themselves, to
 
28
# discover the settings for compiling and linking
 
29
#########################################################
 
30
 
 
31
PERL_CFLAGS  := $(shell perl -MExtUtils::Embed -e ccopts )
 
32
PERL_LDFLAGS := $(shell perl -MExtUtils::Embed -e ldopts )
 
33
 
 
34
#INCLUDEPY, LIBPL, LIBRARY
 
35
PYTHON_CFLAGS := -I$(shell python -c "import distutils.sysconfig ; print distutils.sysconfig.get_config_var('INCLUDEPY')" )
 
36
PYTHON_LDPATH := $(shell python -c "import distutils.sysconfig ; print distutils.sysconfig.get_config_var('LIBPL')" )
 
37
PYTHON_LIB    := $(shell python -c "import distutils.sysconfig ; print distutils.sysconfig.get_config_var('LIBRARY')" )
 
38
PYTHON_LDFLAGS = $(PYTHON_LDPATH)/$(PYTHON_LIB)
 
39
#PYTHON_LDFLAGS = $(PYTHON_LDPATH)
 
40
 
 
41
GLIB_INC := $(shell pkg-config --cflags glib-2.0)
 
42
GLIB_LIB := $(shell pkg-config --libs glib-2.0)
 
43
 
 
44
INC = -I. -I../.. $(GLIB_INC)
 
45
 
 
46
CFLAGS = -g $(PYTHON_CFLAGS) $(PERL_CFLAGS)
 
47
CXXFLAGS = $(CFLAGS)
 
48
 
 
49
LIBS = $(PYTHON_LDFLAGS) $(PERL_LDFLAGS) $(GLIB_LIB)
 
50
 
 
51
all: bindtest cpptest
 
52
 
 
53
wraps: $(WRAPS)
 
54
 
 
55
bindtest: bindtest.o  $(OBJ)
 
56
        $(CXX) -o $@ bindtest.o $(OBJ) $(LIBS)
 
57
 
 
58
cpptest: cpptest.o $(OBJ)
 
59
        $(CXX) -o $@ cpptest.o $(OBJ) $(LIBS)
 
60
 
 
61
 
 
62
#_inkscape_py.so : inkscape_py_wrap.o $(OBJ)
 
63
#       $(CXX) -shared -o _inkscape_py.so $(OBJ)
 
64
        
 
65
inkscape_py_wrap.cpp: InkscapeBinding.h inkscape_py.i
 
66
        swig -c++ -python -o inkscape_py_wrap.cpp inkscape_py.i
 
67
        perl quotefile.pl inkscape_py.py inkscape_py.py.h
 
68
        
 
69
InkscapePython.o: InkscapePython.cpp InkscapePython.h inkscape_py_wrap.o
 
70
        $(CXX) $(CXXFLAGS) $(INC) $(PYINC) -o $@ -c InkscapePython.cpp
 
71
 
 
72
inkscape_perl_wrap.cpp: InkscapeBinding.h inkscape_perl.i
 
73
        swig -c++ -perl5 -static -o inkscape_perl_wrap.cpp inkscape_perl.i 
 
74
        perl quotefile.pl inkscape_perl.pm inkscape_perl.pm.h
 
75
        
 
76
InkscapePerl.o: InkscapePerl.cpp InkscapePerl.h inkscape_perl_wrap.o
 
77
        $(CXX) $(CXXFLAGS) $(INC) $(PERLINC) -o $@ -c InkscapePerl.cpp
 
78
 
 
79
.cpp.o:
 
80
        $(CXX) $(CXXFLAGS) $(INC) -o $@ -c $<
 
81
 
 
82
clean:
 
83
        -$(RM) bindtest
 
84
        -$(RM) cpptest
 
85
        -$(RM) *.o
 
86
        -$(RM) *.so
 
87
        -$(RM) *.pyc
 
88
 
 
89