[Kst] extragear/graphics/kst/plugins/fits_nonlinear/general_levenberg_marquardt
Nicolas Brisset
nicolas.brisset at eurocopter.com
Mon Nov 21 11:18:52 CET 2005
SVN commit 481977 by brisset:
Improved Makefile:
- links to the static parser library for now to avoid having to adjust LD_LIBRARY_PATH. If we prefer to link against the .so (I suppose we do in the long term ?) libmuparser.so will need to be installed in some place where we are sure to find it.
- links against gslcblas which is also required
- also generates the plugin's .so
- ^M cleanups
M +67 -72 Makefile
--- trunk/extragear/graphics/kst/plugins/fits_nonlinear/general_levenberg_marquardt/Makefile #481976:481977
@@ -1,72 +1,67 @@
-#
-# Hand-written Makefile until we have an auto*-generated one :-)
-# (based on Ingo Berg's original Makefile for the muParser)
-#
-
-CC = g++
-
-#Release Version
-#CFLAGS = -mcpu=pentium -O3 -ffast-math -fomit-frame-pointer -fexpensive-optimizations
-#CFLAGS = -mcpu=supersparc -O3 -ffast-math -fomit-frame-pointer -fexpensive-optimizations
-# the -fomit-frame-pointer flag seems to create wrong code, better remove it...
-# the -mcpu=... flag works, but it will make the Makefile generation more complicated.
-# Not sure it is worh the trouble.
-CFLAGS = -O3 -fPIC -ffast-math -fexpensive-optimizations
-
-#Debug-Version
-#CFLAGS = -g -Wall
-
-OBJ_LIB = muParser.o \
- muParserBase.o \
- muParserError.o \
- muParserCallback.o \
- muParserTokenReader.o \
- muParserBytecode.o
-
-TARGET_LIB = muparser
-KST_PLUGIN = kstfit_general_levenberg_marquardt.so
-
-INCDIR = -I.
-LINK_LIBS = -L. -lmuparser -L/ldk/0/soft/lib -lgsl
-
-### Parser - list of targets ###################################################
-
-all: $(KST_PLUGIN)
-
-
-### Parser - library ##########################################################
-#
-# generate the parser library
-#
-
-splash_lib:
- @echo ""
- @echo "Creating muParser library";
- @echo "-------------------------"
- @echo ""
-
-
-$(TARGET_LIB): splash_lib $(OBJ_LIB)
- @ar ru lib$(TARGET_LIB).a $(OBJ_LIB)
- @ranlib lib$(TARGET_LIB).a
- @$(CC) -shared -o lib$(TARGET_LIB).so $(OBJ_LIB)
- @rm -f $(OBJ_LIB)
-
-$(KST_PLUGIN): $(TARGET_LIB) kstfit_general_levenberg_marquardt.o
- @$(CC) -shared -o $(KST_PLUGIN) $(LINK_LIBS)
-
-### Parser - secondary compile targets #########################################
-
-%.o: %.cpp
- $(CC) $(CFLAGS) $(INCDIR) -c $< -o $@
-
-clean:
- @echo -n "cleaning up..."
- @rm -f $(TARGET_LIB) *.[ao] *~ &> /dev/null
- @rm -f DEADJOE core &> /dev/null
- @rm -f $(OBJ_LIB)
- @echo "done"
-
-new:
- $(MAKE) clean
- $(MAKE) all
+#
+# Hand-written Makefile until we have an auto*-generated one :-)
+# (based on Ingo Berg's original Makefile for the muParser)
+#
+
+CC = g++
+
+#Release Version
+#CFLAGS = -mcpu=pentium -O3 -ffast-math -fomit-frame-pointer -fexpensive-optimizations
+#CFLAGS = -mcpu=supersparc -O3 -ffast-math -fomit-frame-pointer -fexpensive-optimizations
+# the -fomit-frame-pointer flag seems to create wrong code, better remove it...
+# the -mcpu=... flag works, but it will make the Makefile generation more complicated.
+# Not sure it is worh the trouble.
+CFLAGS = -O3 -fPIC -ffast-math -fexpensive-optimizations
+
+#Debug-Version
+#CFLAGS = -g -Wall
+
+OBJ_LIB = muParser.o \
+ muParserBase.o \
+ muParserError.o \
+ muParserCallback.o \
+ muParserTokenReader.o \
+ muParserBytecode.o
+
+TARGET_LIB = muparser
+KST_PLUGIN = kstfit_general_levenberg_marquardt.so
+
+INCDIR = -I. -I/usr/local/kde/include
+#LINK_LIBS = -L. -lmuparser -L/usr/local/kde/lib -lgsl
+LINK_LIBS = libmuparser.a -L/usr/local/kde/lib -lgsl -lgslcblas
+
+### Parser - list of targets ###################################################
+
+all: $(KST_PLUGIN)
+
+
+### Parser - library ##########################################################
+#
+# generate the parser library
+#
+
+$(TARGET_LIB): $(OBJ_LIB)
+ @ar ru lib$(TARGET_LIB).a $(OBJ_LIB)
+ @ranlib lib$(TARGET_LIB).a
+ @$(CC) -shared -o lib$(TARGET_LIB).so $(OBJ_LIB)
+
+$(KST_PLUGIN): $(TARGET_LIB) kstfit_general_levenberg_marquardt.o
+ @echo Linking...
+ @echo $(CC) -shared -o $(KST_PLUGIN) kstfit_general_levenberg_marquardt.o $(LINK_LIBS)
+ @$(CC) -shared -o $(KST_PLUGIN) kstfit_general_levenberg_marquardt.o $(LINK_LIBS)
+
+### Parser - secondary compile targets #########################################
+
+%.o: %.cpp
+ $(CC) $(CFLAGS) $(INCDIR) -c $< -o $@
+
+clean:
+ @echo -n "cleaning up..."
+ @rm -f $(TARGET_LIB) *.[ao] *~ &> /dev/null
+ @rm -f DEADJOE core &> /dev/null
+ @rm -f $(OBJ_LIB)
+ @echo "done"
+
+new:
+ $(MAKE) clean
+ $(MAKE) all
More information about the Kst
mailing list