Salome HOME
MPV: fix for bug IPAL9221
[modules/kernel.git] / Makefile.in
1 # -* Makefile *- 
2 #
3 # Author : Patrick GOLDBRONN (CEA)
4 # Date : 28/06/2001
5 # $Header$
6 #
7
8 # source path
9 top_srcdir=@top_srcdir@
10 top_builddir=.
11 srcdir=@srcdir@
12 VPATH=.:@srcdir@:@top_srcdir@/bin:./bin/salome:@top_srcdir@/resources:./bin:@top_srcdir@/idl
13
14
15 @COMMENCE@
16
17 SUBDIRS = idl src examples doc salome_adm
18
19 RESOURCES_FILES = \
20 CatalogDataType.xml \
21 KERNELCatalog.xml \
22 CatalogResources.xml \
23 CatalogRessources.xml \
24 config \
25 channel.cfg \
26 SALOMEDS_Resources
27
28 BIN_SCRIPT= \
29 runIDLparser \
30 VERSION \
31 orbmodule.py \
32 runSalome.py \
33 killSalome.py \
34 killSalomeWithPort.py \
35 runSalome \
36 runSalome.csh \
37 runNS.sh \
38 launchConfigureParser.py \
39 salome.launch \
40 envSalome.py \
41 salomeConsole.py \
42 showNS.py \
43 addToKillList.py
44
45 # copy header files in common directory
46 OWN_CONFIG_H=@OWN_CONFIG_H@
47
48 ifeq ($(OWN_CONFIG_H),yes)
49     ifeq ($(HAVE_SSTREAM),yes)
50         include_list=include/salome/SALOMEconfig.h include/salome/config.h
51     else
52         include_list=include/salome/SALOMEconfig.h include/salome/config.h include/salome/sstream
53     endif
54 else
55     ifeq ($(HAVE_SSTREAM),yes)
56         include_list=include/salome/SALOMEconfig.h
57     else
58         include_list=include/salome/SALOMEconfig.h include/salome/sstream
59     endif
60 endif
61
62 inc: idl $(include_list)
63
64 include/salome/SALOMEconfig.h: salome_adm/unix/SALOMEconfig.ref
65         -$(RM) $@
66         $(LN_S) ../../$< $@
67
68 # test if SALOMEconfig.h has changed (contents)
69 salome_adm/unix/SALOMEconfig.ref: salome_adm/unix/SALOMEconfig.h
70         @if ! [ -a $@ ]; then \
71           cp -p $< $@;        \
72         fi;                   \
73         if ! cmp $< $@; then  \
74           cp -p $< $@;        \
75         fi;                   \
76
77 include/salome/config.h: salome_adm/unix/config.h
78         -$(RM) $@
79         $(LN_S) ../../$< $@
80
81 include/salome/sstream: salome_adm/unix/sstream
82         -$(RM) $@
83         $(LN_S) ../../$< $@
84
85 depend: depend_idl
86
87 depend_idl:
88         (cd idl ; $(MAKE) $@) || exit 1
89
90 # doc is already build : if you want to had documents, go manually to doc and run 'make doc'
91 #doc:
92 #       (cd doc && $(MAKE) $@) || exit 1
93
94 # Install make_commence make_conclude ... for other modules
95 install-make:
96         ($(INSTALL) -d  $(incmakedir) || exit 1);
97         (sed 's/^prefix=/#prefix=/' $(top_builddir)/salome_adm/unix/make_commence > $(incmakedir)/make_commence || exit 1);
98         (sed 's/^prefix=/#prefix=/' $(top_builddir)/salome_adm/unix/make_conclude > $(incmakedir)/make_conclude || exit 1);
99
100
101 install-end:
102 # finish libtool install
103 #       @$(LT) --mode=finish $(libdir)
104
105 install-include: $(include_list)
106         $(INSTALL) -d  $(includedir)
107         @for f in X $(include_list); do                         \
108            if test $$f != X; then                               \
109              (cp -p $$f $(includedir) || exit 1);               \
110            fi;                                                  \
111         done
112
113 # install script in $(bindir) :
114 install-bin: $(BIN_SCRIPT)
115         $(INSTALL) -d  $(bindir)
116         $(INSTALL_PROGRAM) $^ $(bindir)
117
118 # install Plugin file
119 install-plugin: $(top_builddir)/share/salome/resources/Plugin
120         ($(INSTALL_DATA) $^ $(datadir)/resources/. || exit 1); \
121        
122 uninstall: uninstall-idl
123
124 uninstall-idl:
125         $(RM) $(idldir)/*.idl
126
127 distclean: distclean-other
128
129 distclean-other:
130         -$(RM) salome_adm/unix/*~ salome_adm/unix/*% salome_adm/unix/*.bak salome_adm/unix/*.new salome_adm/unix/*.old
131         -$(RM) salome_adm/unix/make_* 
132         -$(RM) salome_adm/unix/depend salome_adm/unix/SALOMEconfig.h salome_adm/unix/config.h 
133         -$(RM) config.cache config.log config.status 
134
135 @MODULE@
136
137 $(top_builddir)/share/salome/resources/Plugin: resources/Plugin
138         cp -f $< $@ ; \
139
140 resources: $(top_builddir)/share/salome/resources/Plugin
141
142 install: install-bin install-include install-make install-plugin install-end
143