aboutsummaryrefslogtreecommitdiffstats
path: root/makefile
diff options
context:
space:
mode:
authorastrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675>2008-12-15 07:26:12 +0000
committerastrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675>2008-12-15 07:26:12 +0000
commit1f4a944064bc42284c33e6b755353d191cf288e8 (patch)
treec8cb2253dea5f395e0f867aa6976433bd3eb00de /makefile
downloadopt-utilities-1f4a944064bc42284c33e6b755353d191cf288e8.tar.bz2
git-svn-id: file:///home/svn/opt_utilities@1 ed2142bd-67ad-457f-ba7c-d818d4011675
Diffstat (limited to 'makefile')
-rw-r--r--makefile67
1 files changed, 67 insertions, 0 deletions
diff --git a/makefile b/makefile
new file mode 100644
index 0000000..e40ac11
--- /dev/null
+++ b/makefile
@@ -0,0 +1,67 @@
+OPT_HEADS=models/beta1d.hpp statistics/chisq.hpp models/lin1d.hpp\
+ models/pl1d.hpp models/bl1d.hpp\
+ core/fitter.hpp models/models.hpp\
+ core/opt_traits.hpp\
+ methods/powell/powell_method.hpp models/bpl1d.hpp\
+ core/freeze_param.hpp\
+ models/gauss1d.hpp core/optimizer.hpp\
+ misc/bootstrap.hpp\
+ models/dl_model.hpp\
+ models/mul_model.hpp\
+ models/add_model.hpp\
+
+LDL=-ldl
+
+export CPP=g++
+export CC=gcc
+export AR = ar rv
+export RANLIB = ranlib
+export RM=rm -f
+export CFLAGS=-DNDEBUG -g -O2 -Wall -c -I .
+export CPPFLAGS=-DNDEBUG -g -O2 -Wall -c -I . --ansi -DHAVE_X_ERROR
+
+
+INC=-I. -I/usr/include/gsl/
+LIB= -L./muparser $(LDL) -lmuparser -g -lgsl -lgslcblas
+OPT_OBJ=models/models.o version_ctrl.o models/strmodel1d.o
+
+TARGET=liboptcall test_dl.so models/strmodel1d.o models/models.o
+
+all: $(TARGET)
+
+models/models.o:models/models.cc ${OPT_HEADS}
+ $(CPP) -c $< -o $@ ${INC} ${CPPFLAGS}
+
+version_ctrl.o:version_ctrl.cc
+ $(CPP) -c $< ${CPPFLAGS}
+
+bin/test.o:test.cc ${OPT_HEADS}
+ $(CPP) -c $< -o $@ ${INC} ${CPPFLAGS} --ansi
+
+test:${OPT_OBJ} bin/test.o
+ $(CPP) bin/test.o models/strmodel1d.o models/models.o version_ctrl.o -o $@ ${LIB}
+
+test_dl.so:models/dlmodel_template.c
+ gcc $< --shared -o $@
+
+
+models/strmodel1d.o:models/strmodel1d.cc models/strmodel1d.hpp
+ $(CPP) -c $< -o $@ -I./muparser $(INC) $(CPPFLAGS)
+
+
+libmuparser:
+ make -C muparser
+
+liboptcall:
+ make -C interface
+
+clean:
+ rm -f `find .|grep \~`
+ rm -f `find .|grep '\.o'`
+ rm -f muparser/libmuparser.a
+ make -C muparser clean
+ make -C interface clean
+
+distclean:clean
+ rm -f `find . -iname *.a`
+ rm -f $(TARGET)