Salome HOME
SMH: Fixes and patches from Paul.
[modules/gui.git] / src / SALOME_PYQT / SalomePyQt / Makefile.in
1 #  Copyright (C) 2003  CEA/DEN, EDF R&D
2 #
3 #
4 #
5 #  File   : Makefile.in
6 #  Author : Nicolas REJNERI
7 #  Module : SALOME
8 #  $Header$
9
10 top_srcdir=@top_srcdir@
11 top_builddir=../../..
12 srcdir=@srcdir@
13 VPATH=.:@srcdir@:@top_srcdir@/idl
14
15
16 @COMMENCE@
17
18 # small trick for Mandrake-10.1: PyQt 3.13 does not support Qt 3.3.3
19 ifeq ($(QT_VERS),Qt_3_3_3)
20 QT_VERS = Qt_3_3_0
21 endif
22 ifeq ($(QT_VERS),Qt_3_3_4)
23 QT_VERS = Qt_3_3_0
24 endif
25
26 # Sip flags
27 SIP_FLAGS = -t WS_X11 -t $(QT_VERS) -s ".cc" -c . -I $(PYQT_SIPS)
28 # Sip common sources
29 SIP_SRC = sipSalomePyQtSalomePyQt.cc \
30           sipSalomePyQtSALOME_Selection.cc
31
32 # Sip version-specific sources
33 ifeq ($(SIP_VERS),v4)
34 SIP_SRC  += sipSalomePyQtcmodule.cc
35 else
36 SIP_SRC  += SalomePyQtcmodule.cc
37 endif
38
39 # Sip/moc sources
40 ifeq ($(SIP_VERS),v4)
41 MOC_SRC   = sipSalomePyQtcmodule_moc.cxx
42 MOC_H     = sipSalomePyQtcmodule.h
43 else 
44 ifeq ($(SIP_VERS),v3_new)
45 MOC_SRC   = SalomePyQtcmodule_moc.cxx
46 MOC_H     = SalomePyQtcmodule.h
47 else
48 MOC_SRC   = sipSalomePyQtProxySalomePyQt_moc.cxx
49 MOC_H     = sipSalomePyQtProxySalomePyQt.h
50 endif
51 endif
52
53 # Sip definition files
54 ifeq ($(SIP_VERS),v4)
55 SIP_FILES = SalomePyQt_v4.sip
56 else
57 SIP_FILES = SalomePyQt.sip
58 endif 
59
60 # Libraries targets
61 ifeq ($(SIP_VERS),v4)
62 LIB = SalomePyQt.so
63 else
64 LIB = libSalomePyQtcmodule.la
65 endif 
66
67 # Exported python scripts
68 ifneq ($(SIP_VERS),v4)
69 EXPORT_SHAREDPYSCRIPTS = SalomePyQt.py
70 endif
71
72 # Library sources
73 LIB_SRC = SalomePyQt.cxx \
74           $(SIP_SRC)     \
75           $(MOC_SRC) 
76
77 # Library moc sources
78 LIB_MOC = SalomePyQt.h
79
80 # Client IDL
81 LIB_CLIENT_IDL = SALOME_Exception.idl SALOME_GenericObj.idl
82
83 # Compilation/linkage flags
84 CPPFLAGS += $(QT_INCLUDES) $(PYTHON_INCLUDES) $(SIP_INCLUDES) $(OCC_INCLUDES) $(VTK_INCLUDES) $(OGL_INCLUDES) $(BOOST_CPPFLAGS) -DHAVE_CONFIG_H -I${KERNEL_ROOT_DIR}/include/salome
85 LIBS     += $(PYTHON_LIBS) $(SIP_LIBS) $(PYQT_LIBS) $(VTK_LIBS) $(OGL_LIBS)
86 LDFLAGS  += -lsuit -lCAM -lstd -lqtx -lSalomeApp -lSalomeSession -lEvent -lLogWindow -lVTKViewer -lToolsGUI -L${KERNEL_ROOT_DIR}/lib/salome -lSalomeDS
87
88
89 # Custom build step: generate C++ wrapping according to $(SIP_FILES)
90 $(SIP_SRC): $(SIP_FILES)
91         $(SIP) $(SIP_FLAGS) $<
92
93 $(MOC_SRC): $(MOC_H)
94         $(MOC) $< -o $@
95
96 @CONCLUDE@