Salome HOME
no message
[modules/gui.git] / src / Style / Makefile.in
index c947ad335758ea9fd6b783b5c55ef31e5b388639..1c79d289174d7015ff6bf82b84970c4875cd397f 100644 (file)
@@ -32,5 +32,30 @@ CPPFLAGS+=$(QT_INCLUDES)
 LDFLAGS+=$(QT_MT_LIBS)
 LIBS+=
 
+# create $(top_builddir)/src/Session/styles directory and copy libSalomeStyle.so there
+LIB_PLUGINDIR = $(top_builddir)/src/Session/styles
+LIB_PLUGINLIB = $(patsubst %.la, $(LIB_PLUGINDIR)/%.so, $(filter %.la, $(LIB)))
+
+lib: $(LIB) $(LIB_PLUGINDIR) $(LIB_PLUGINLIB)
+
+$(LIB_PLUGINDIR):
+       mkdir -p $@
+
+$(LIB_PLUGINLIB): $(LIB_PLUGINDIR)/%.so: .libs/%.so
+       -$(RM) $@
+       ln -sf $(CURDIR)/$< $@ || true
+
+# do the same in install step
+INSTALL_PLUGINDIR = $(bindir)/styles
+INSTALL_COPYLIB = $(patsubst %.la, $(INSTALL_PLUGINDIR)/%.so, $(filter %.la, $(LIB)))
+
+install: $(INSTALL_PLUGINDIR) $(INSTALL_COPYLIB)
+
+$(INSTALL_PLUGINDIR):
+       mkdir -p $@
+
+$(INSTALL_COPYLIB):
+       (cd $(bindir)/styles; ln -sf $(patsubst %.la, ../../../lib/salome/%.so, $(filter %.la, $(LIB))) $@) || true
+
 @CONCLUDE@