Salome HOME
Add methods to create menu and toolbar actions to be accessed from Python.
[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_old)
34 SIP_SRC  += sipSalomePyQtcmodule.cc
35 else
36 ifeq ($(SIP_VERS),v4_new)
37 SIP_SRC  += sipSalomePyQtcmodule.cc
38 else
39 SIP_SRC  += SalomePyQtcmodule.cc
40 endif
41 endif
42
43 # Sip/moc sources
44 ifeq ($(SIP_VERS),v4_old)
45 MOC_SRC   = sipSalomePyQtcmodule_moc.cxx
46 MOC_H     = sipSalomePyQtcmodule.h
47 else 
48 ifeq ($(SIP_VERS),v3_new)
49 MOC_SRC   = SalomePyQtcmodule_moc.cxx
50 MOC_H     = SalomePyQtcmodule.h
51 else
52 ifeq ($(SIP_VERS),v3_old)
53 MOC_SRC   = sipSalomePyQtProxySalomePyQt_moc.cxx
54 MOC_H     = sipSalomePyQtProxySalomePyQt.h
55 endif
56 endif
57 endif
58
59 # Sip definition files
60 ifeq ($(SIP_VERS),v4_old)
61 SIP_FILES = SalomePyQt_v4.sip
62 else
63 ifeq ($(SIP_VERS),v4_new)
64 SIP_FILES = SalomePyQt_v4.sip
65 else
66 SIP_FILES = SalomePyQt.sip
67 endif 
68 endif 
69
70 # Libraries targets
71 ifeq ($(SIP_VERS),v4_old)
72 LIB = SalomePyQt.so
73 else
74 ifeq ($(SIP_VERS),v4_new)
75 LIB = SalomePyQt.so
76 else
77 LIB = libSalomePyQtcmodule.la
78 endif 
79 endif 
80
81 # Exported python scripts
82 ifeq ($(SIP_VERS),v3_old)
83 EXPORT_SHAREDPYSCRIPTS = SalomePyQt.py
84 else
85 ifeq ($(SIP_VERS),v3_new)
86 EXPORT_SHAREDPYSCRIPTS = SalomePyQt.py
87 endif
88 endif
89
90 # Library sources
91 LIB_SRC = SalomePyQt.cxx \
92           $(SIP_SRC)     \
93           $(MOC_SRC) 
94
95 # Library moc sources
96 LIB_MOC = SalomePyQt.h
97
98 # Client IDL
99 LIB_CLIENT_IDL = SALOME_Exception.idl SALOME_GenericObj.idl
100
101 # Compilation/linkage flags
102 CPPFLAGS += $(QT_INCLUDES) $(PYTHON_INCLUDES) $(SIP_INCLUDES) $(OCC_INCLUDES) $(VTK_INCLUDES) $(OGL_INCLUDES) $(BOOST_CPPFLAGS) -DHAVE_CONFIG_H -I${KERNEL_ROOT_DIR}/include/salome
103 LIBS     += $(PYTHON_LIBS) $(SIP_LIBS) $(PYQT_LIBS) $(VTK_LIBS) $(OGL_LIBS)
104 LDFLAGS  += -lsuit -lCAM -lstd -lqtx -lSalomeApp -lSalomeSession -lEvent -lLogWindow -lVTKViewer -lToolsGUI -L${KERNEL_ROOT_DIR}/lib/salome -lSalomeDS -lSalomePyQtGUI
105
106
107 # Custom build step: generate C++ wrapping according to $(SIP_FILES)
108 $(SIP_SRC): $(SIP_FILES)
109         $(SIP) $(SIP_FLAGS) $<
110
111 $(MOC_SRC): $(MOC_H)
112         $(MOC) $< -o $@
113
114 @CONCLUDE@