Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Makefile.cygwin « swig « intern « freestyle « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1f5b3ce2a7913102b7c76ce1371e485082cb78f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#                             W A R N I N G ! ! !                             #
#             a u t h o r i z e d    p e r s o n a l    o n l y               #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

CXX	  = g++
RM	  = rm -f
INSTALL	  = install
SWIG	  = swig

PYTHON_VERSION_MAJ = 2
PYTHON_VERSION_MIN = 5

BUILD     = debug
PLATEFORM = cygwin-g++
MODNAME   = Freestyle

LIBNAME   = _${MODNAME}.dll
LIBDIR    = ../../build/${PLATEFORM}/${BUILD}/lib/python
IPATH     = -I../geometry -I../image -I../scene_graph -I../stroke \
            -I../system -I../view_map -I../winged_edge \
            -I/usr/include/python${PYTHON_VERSION_MAJ}.${PYTHON_VERSION_MIN}
LPATH     = -L/usr/lib/python${PYTHON_VERSION_MAJ}.${PYTHON_VERSION_MIN}/config -lpython${PYTHON_VERSION_MAJ}.${PYTHON_VERSION_MIN} \
            -L../../build/${PLATEFORM}/${BUILD}/lib -lFreestyleSystem -lFreestyleImage -lFreestyleGeometry -lFreestyleSceneGraph -lFreestyleWingedEdge -lFreestyleViewMap -lFreestyleRendering -lFreestyleStroke
# options to compile with static python : -lpthread -lm -lutil -shared -Xlinker -x -export-dynamic
#OPTI      = -lpthread -lm -lutil -shared -Xlinker -x -export-dynamic #-O3 -funroll-loops -fomit-frame-pointer -ffast-math -march=i686
DBUG      = #-ggdb #-pg
WARN	  = -w #-W -Wall #-pedantic -ansi

CFLAGS    = ${OPTI} ${DBUG} ${WARN} ${IPATH}
LDFLAGS   = ${OPTI} ${DBUG} ${WARN} ${LPATH}

SWIG_SRC  = Freestyle.i
PY_SRC    = ${SWIG_SRC:.i=.py}
CXX_SRC	  = ModuleWrapper.cpp
CXX_INC	  = ${CXX_SRC:.cpp=.h}
CXX_OBJ	  = ${CXX_SRC:.cpp=.o}

ifndef DBUG
  STRIP   = strip --strip-all ${LIBDIR}/${LIBNAME}
endif

# # # # # # # # # # # # # # # #   R u l e s   # # # # # # # # # # # # # # # # #

all	: swig cxx

.PHONY	: clean re

clean	: swig_clean cxx_clean

re	: swig_re cxx_re

# # # # # # # # # # # # #   S W I G   r u l e s   # # # # # # # # # # # # # # #

.SUFFIXES:
.SUFFIXES: .i .py .cpp .h .o

.IGNORE	:

swig	: ${CXX_INC} ${CXX_SRC} ${PY_SRC}

.i.py	: ${SWIG_SRC}
	${SWIG} -c++ -python -o ${CXX_SRC} $<

.PHONY	: swig_clean swig_re

swig_clean	:
	${RM} *~ \#* .\#* : ${CXX_INC} ${CXX_SRC} ${PY_SRC}

swig_re	: swig_clean swig

# # # # # # # # #   P y t h o n   &   C + +   r u l e s   # # # # # # # # # # #

cxx	: ${CXX_OBJ} ${PY_SRC}
	${INSTALL} -d ${LIBDIR}
	${CXX} -shared ${LDFLAGS} -o ${LIBDIR}/${LIBNAME} ${CXX_OBJ}
	${INSTALL} ${PY_SRC} ${LIBDIR}
	@${STRIP}

.cpp.o	: ${CXX_INC} ${CXX_SRC}
	${CXX} ${CFLAGS} -c $< -o $@

${CXX_SRC}	: ${PY_SRC}

${CXX_INC}	: ${PY_SRC}

.PHONY	: cxx_clean cxx_re

cxx_clean	:
	${RM} *~ \#* .\#* *.core gmon.out ${CXX_OBJ} 

cxx_re	: cxx_clean cxx_all