--- /dev/null	
+++ scsolver/workben/addon_pkg/Makefile_build	
@@ -0,0 +1,207 @@
+TARGET=scsolver.uno
+
+BASEDIR=../../..
+SRCDIR=$(BASEDIR)/source
+SLVDIR=../../../../solver/680/unxlngi6.pro
+IDLDIR=$(BASEDIR)/idl/org/openoffice/sc/solver
+
+DEBUG=
+LDFLAGS= -lsal -lcppuhelpergcc3 -lcppu -lstlport_gcc $(DEBUG)
+CXXCPP=-I$(SLVDIR)/inc -I$(SRCDIR)/inc -I.
+CXX_DEFINES=-DUNX -DGCC -DLINUX -DCPPU_ENV=gcc3 -DHAVE_GCC_VISIBILITY_FEATURE
+#CXX_SHARED_FLAGS=-fPIC -fno-common -export-dynamic -fvisibility=hidden
+#CXX=/usr/bin/g++
+#LIBLPSOLVE=$(SLVDIR)/lib/liblpsolve55.a
+CXX_SHARED_FLAGS=-fPIC -fno-common -export-dynamic
+CXX=/usr/local/gcc-3.4.1/bin/g++
+LIBLPSOLVE=../../external/lp_solve_5.5/lpsolve55/liblpsolve55.a
+
+CPPFLAGS=-DDEBUG -Wall -Os -mtune=pentium3
+
+BINDIR=$(SLVDIR)/bin
+
+
+HEADER= \
+	$(SRCDIR)/inc/numeric/matrix.hxx \
+	$(SRCDIR)/inc/numeric/funcobj.hxx \
+	$(SRCDIR)/inc/numeric/lpmodel.hxx \
+	$(SRCDIR)/inc/numeric/lpbase.hxx \
+	$(SRCDIR)/inc/numeric/lpsimplex.hxx \
+	$(SRCDIR)/inc/numeric/lpsolve.hxx \
+	$(SRCDIR)/inc/numeric/nlpbase.hxx \
+	$(SRCDIR)/inc/numeric/nlpmodel.hxx \
+	$(SRCDIR)/inc/numeric/nlpnewton.hxx \
+	$(SRCDIR)/inc/numeric/diff.hxx \
+	$(SRCDIR)/inc/global.hxx \
+	$(SRCDIR)/inc/unoglobal.hxx \
+	$(SRCDIR)/inc/solver.hxx \
+	$(SRCDIR)/inc/dialog.hxx \
+	$(SRCDIR)/inc/baselistener.hxx \
+	$(SRCDIR)/inc/listener.hxx \
+	$(SRCDIR)/inc/lpbuilder.hxx \
+	$(SRCDIR)/inc/xcalc.hxx \
+	$(SRCDIR)/inc/basedlg.hxx \
+	$(SRCDIR)/inc/type.hxx \
+	$(SRCDIR)/inc/solvemodel.hxx \
+	$(SRCDIR)/inc/unohelper.hxx \
+	$(SRCDIR)/inc/msgdlg.hxx
+
+OBJFILES= \
+	matrix.o lpbase.o lpmodel.o lpsimplex.o lpsolve.o nlpqnewton.o nlpbase.o \
+	nlpmodel.o diff.o funcobj.o service.o basedlg.o baselistener.o \
+	dialog.o global.o listener.o lpbuilder.o msgdlg.o solvemodel.o \
+	unoglobal.o unohelper.o xcalc.o	
+
+XCUFILES = ../Addons.xcu ../ProtocolHandler.xcu
+
+IDLFILES = \
+	$(IDLDIR)/Equality.idl \
+	$(IDLDIR)/Goal.idl \
+	$(IDLDIR)/Bound.idl \
+	$(IDLDIR)/XLpAlgorithm.idl \
+	$(IDLDIR)/XLpModel.idl
+	
+URDFILES = \
+	Equality.urd \
+	Goal.urd \
+	Bound.urd \
+	XLpAlgorithm.urd \
+	XLpModel.urd
+
+all: $(TARGET).zip
+
+idlc:
+	export LD_LIBRARY_PATH=$(SLVDIR)/lib && \
+	$(BINDIR)/idlc -O. -I$(SLVDIR)/idl -I$(BASEDIR)/idl $(IDLFILES)
+
+preprocess: idlc
+	export LD_LIBRARY_PATH=$(SLVDIR)/lib && \
+	$(BINDIR)/regmerge $(TARGET).rdb /UCR $(URDFILES) && \
+	$(BINDIR)/cppumaker -BUCR -Torg.openoffice.sc.solver.XLpAlgorithm -Torg.openoffice.sc.solver.XLpModel $(BINDIR)/types.rdb $(TARGET).rdb
+
+#----------------------------------------------------------------------------
+# Numeric
+
+NUMDIR=$(SRCDIR)/numeric
+
+funcobj.o: $(HEADER) $(NUMDIR)/funcobj.cxx
+	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
+	-o $@ $(CXX_SHARED_FLAGS) -c $(NUMDIR)/funcobj.cxx
+
+matrix.o: $(HEADER) $(NUMDIR)/matrix.cxx
+	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
+	-o $@ $(CXX_SHARED_FLAGS) -c $(NUMDIR)/matrix.cxx
+
+diff.o: $(HEADER) $(NUMDIR)/diff.cxx
+	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
+	-o $@ $(CXX_SHARED_FLAGS) -c $(NUMDIR)/diff.cxx
+
+lpbase.o: $(HEADER) $(NUMDIR)/lpbase.cxx
+	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
+	-o $@ $(CXX_SHARED_FLAGS) -c $(NUMDIR)/lpbase.cxx
+	
+lpmodel.o: $(HEADER) $(NUMDIR)/lpmodel.cxx
+	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
+	-o $@ $(CXX_SHARED_FLAGS) -c $(NUMDIR)/lpmodel.cxx
+
+lpsimplex.o: $(HEADER) $(NUMDIR)/lpsimplex.cxx
+	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
+	-o $@ $(CXX_SHARED_FLAGS) -c $(NUMDIR)/lpsimplex.cxx
+
+lpsolve.o: preprocess $(HEADER) $(NUMDIR)/lpsolve.cxx
+	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
+	-o $@ $(CXX_SHARED_FLAGS) -c $(NUMDIR)/lpsolve.cxx
+
+nlpmodel.o: $(HEADER) $(NUMDIR)/nlpmodel.cxx
+	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
+	-o $@ $(CXX_SHARED_FLAGS) -c $(NUMDIR)/nlpmodel.cxx
+
+nlpbase.o: $(HEADER) $(NUMDIR)/nlpbase.cxx
+	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
+	-o $@ $(CXX_SHARED_FLAGS) -c $(NUMDIR)/nlpbase.cxx
+
+nlpqnewton.o: $(HEADER) $(NUMDIR)/nlpqnewton.cxx
+	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
+	-o $@ $(CXX_SHARED_FLAGS) -c $(NUMDIR)/nlpqnewton.cxx
+
+
+#----------------------------------------------------------------------------
+# Service
+
+SRVDIR=$(SRCDIR)/service
+
+service.o: $(HEADER) $(SRVDIR)/service.cxx
+	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
+	-o $@ $(CXX_SHARED_FLAGS) -c $(SRVDIR)/service.cxx
+
+
+#----------------------------------------------------------------------------
+# UI
+
+UIDIR=$(SRCDIR)/ui
+
+basedlg.o: $(HEADER) $(UIDIR)/basedlg.cxx
+	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
+	-o $@ $(CXX_SHARED_FLAGS) -c $(UIDIR)/basedlg.cxx
+
+baselistener.o: $(HEADER) $(UIDIR)/baselistener.cxx
+	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
+	-o $@ $(CXX_SHARED_FLAGS) -c $(UIDIR)/baselistener.cxx
+
+dialog.o: $(HEADER) $(UIDIR)/dialog.cxx
+	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
+	-o $@ $(CXX_SHARED_FLAGS) -c $(UIDIR)/dialog.cxx
+
+global.o: $(HEADER) $(UIDIR)/global.cxx
+	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
+	-o $@ $(CXX_SHARED_FLAGS) -c $(UIDIR)/global.cxx
+
+listener.o: $(HEADER) $(UIDIR)/listener.cxx
+	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
+	-o $@ $(CXX_SHARED_FLAGS) -c $(UIDIR)/listener.cxx
+
+lpbuilder.o: $(HEADER) $(UIDIR)/lpbuilder.cxx
+	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
+	-o $@ $(CXX_SHARED_FLAGS) -c $(UIDIR)/lpbuilder.cxx
+
+msgdlg.o: $(HEADER) $(UIDIR)/msgdlg.cxx
+	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
+	-o $@ $(CXX_SHARED_FLAGS) -c $(UIDIR)/msgdlg.cxx
+
+solvemodel.o: $(HEADER) $(UIDIR)/solvemodel.cxx
+	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
+	-o $@ $(CXX_SHARED_FLAGS) -c $(UIDIR)/solvemodel.cxx
+
+unoglobal.o: $(HEADER) $(UIDIR)/unoglobal.cxx
+	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
+	-o $@ $(CXX_SHARED_FLAGS) -c $(UIDIR)/unoglobal.cxx
+
+unohelper.o: $(HEADER) $(UIDIR)/unohelper.cxx
+	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
+	-o $@ $(CXX_SHARED_FLAGS) -c $(UIDIR)/unohelper.cxx
+
+xcalc.o: $(HEADER) $(UIDIR)/xcalc.cxx
+	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
+	-o $@ $(CXX_SHARED_FLAGS) -c $(UIDIR)/xcalc.cxx
+
+
+#----------------------------------------------------------------------------
+# Misc
+
+$(TARGET).zip: $(TARGET).so
+	zip -j $@ $< $(TARGET).rdb $(XCUFILES)
+
+$(TARGET).so: $(OBJFILES)
+	export LD_LIBRARY_PATH=$(SLVDIR)/lib && \
+	$(CXX) -shared -Wl,-soname,$@ -o $@ -lc $(OBJFILES) $(LIBLPSOLVE) && \
+ 	$(BINDIR)/regcomp -register -r $(TARGET).rdb -c $@
+
+regview:
+	$(BINDIR)/regview $(TARGET).rdb
+
+clean:
+	rm -f $(OBJFILES)
+	
+distclean: clean
+	rm -f $(TARGET).* *~ 
+
