Salome HOME
Fix linkage problem
[modules/med.git] / src / MEDOP / gui / dialogs / Makefile.am
1 # Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
2 #
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License.
7 #
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 # Lesser General Public License for more details.
12 #
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 #
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 #
19
20 # author: Guillaume Boulant (EDF/R&D, 2012)
21
22 include $(top_srcdir)/adm_local/unix/make_common_starter.am
23
24 #
25 # ---------------------------------------------------------
26 # Generation rules to create moc files from QObject headers
27 # and form source files from ui files
28 # ---------------------------------------------------------
29 #
30 %_moc.cxx: %.hxx
31         $(MOC) $< -o $@
32
33 ui_%.hxx: %.ui
34         $(UIC) -o $@ $<
35
36 QT_CXXFLAGS  = @QT_INCLUDES@ @QT_MT_INCLUDES@
37 CAS_CXXFLAGS = @CAS_CPPFLAGS@ @CAS_CXXFLAGS@
38 OMNIORB_CXXFLAGS = @CORBA_INCLUDES@ @CORBA_CXXFLAGS@
39 BOOST_CXXFLAGS=@BOOST_CPPFLAGS@
40
41 QT_LDFLAGS = $(QT_MT_LIBS)
42 OMNIORB_LIBS=@OMNIORB_LIBS@
43
44 #
45 # ---------------------------------------------------------
46 # Declaration of form files generated by UIC and MOC files
47 # as BUILT_SOURCES to be used in the building process.
48 # ---------------------------------------------------------
49 #
50 UIC_FILES =                            \
51         ui_GenericDialog.hxx           \
52         ui_DlgAlias.hxx                \
53         ui_DlgUseInWorkspace.hxx       \
54         ui_DlgChangeUnderlyingMesh.hxx \
55         ui_DlgImageToMed.hxx
56 #
57 MOC_FILES =                       \
58         GenericDialog_moc.cxx     \
59         DlgAlias_moc.cxx          \
60         DlgUseInWorkspace_moc.cxx \
61         DlgChangeUnderlyingMesh_moc.cxx \
62         DlgImageToMed_moc.cxx
63
64 BUILT_SOURCES = $(UIC_FILES)
65
66 #
67 # ---------------------------------------------------------
68 # Declaration of sources files to the building process
69 # ---------------------------------------------------------
70 # MOC files and UIC files should be added to the list of undistributed
71 # source files with something like (where <MyLibrary> should be
72 # replaced by the name of the product declared by the directive
73 # lib_LTLIBRARIES):
74 #
75 lib_LTLIBRARIES = libMEDOPGUI_dialogs.la
76
77 nodist_libMEDOPGUI_dialogs_la_SOURCES = $(MOC_FILES) $(UIC_FILES)
78
79 dist_libMEDOPGUI_dialogs_la_SOURCES = \
80         GenericDialog.cxx            \
81         DlgAlias.cxx                 \
82         DlgUseInWorkspace.cxx        \
83         DlgChangeUnderlyingMesh.cxx  \
84         DlgImageToMed.cxx
85
86 libMEDOPGUI_dialogs_la_CPPFLAGS = \
87         $(QT_CXXFLAGS)           \
88         $(CAS_CXXFLAGS)          \
89         $(OMNIORB_CXXFLAGS)      \
90         $(BOOST_CXXFLAGS)        \
91         $(KERNEL_CXXFLAGS)       \
92         $(GUI_CXXFLAGS)          \
93         -I$(srcdir)/..
94
95 libMEDOPGUI_dialogs_la_LDFLAGS = \
96         -no-undefined -version-info=0:0:0 \
97         $(QT_LDFLAGS)                     \
98         $(GUI_LDFLAGS) -lSalomeGuiHelpers \
99         $(OMNIORB_LIBS)
100
101 salomeinclude_HEADERS =              \
102         GenericDialog.hxx            \
103         DlgAlias.hxx                 \
104         DlgUseInWorkspace.hxx        \
105         DlgChangeUnderlyingMesh.hxx  \
106         DlgImageToMed.hxx  \
107         MEDOPGUIdialogs.hxx
108
109 #
110 # ---------------------------------------------------------
111 # Unit test programs
112 # ---------------------------------------------------------
113 #
114
115 bin_PROGRAMS = dlgTester
116
117 dlgTester_SOURCES = \
118         dlgTester.cxx
119
120 #nodist_dlgTester_SOURCES = $(UIC_FILES)
121
122 dlgTester_CPPFLAGS = \
123         $(QT_CXXFLAGS)
124
125 # WARN: for the building of binary executable programs, you must use
126 # the LDADD option instead of the LDFLAGS used for library. The impact
127 # is in the expression of dependencies between the executable program
128 # and the library it relies on. In parallel construction (e.g. make
129 # -j8), the makefile try to generate the program while the library
130 # (file .la) is not generated.
131
132 dlgTester_LDADD = \
133         libMEDOPGUI_dialogs.la \
134         $(QT_LIBS) \
135         $(KERNEL_LDFLAGS) -lSalomeKernelHelpers -lSALOMEBasics -lSALOMELocalTrace \
136         -lSalomeNS -lSalomeLifeCycleCORBA -lSalomeContainer -lSalomeNotification \
137         -lSalomeGenericObj -lSalomeIDLKernel \
138         $(GUI_LDFLAGS) -lSalomeGuiHelpers -lSalomeApp
139
140
141 mostlyclean-local:
142         rm -f @builddir@/*_moc.cxx @builddir@/ui_*.hxx
143
144 EXTRA_DIST += $(UIC_FILES:ui_%.hxx=%.ui)