Makefile.vc 2.03 KB
Newer Older
Emmanuel Bertin's avatar
Emmanuel Bertin committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#
# MS Visual C Makefile for Levenberg - Marquardt minimization
# Under Unix/Linux, use Makefile for GCC
#
# At the command prompt, type
# nmake /f Makefile.vc
#
# NOTE: To use this, you must have MSVC installed and properly
# configured for command line use (you might need to run VCVARS32.BAT
# included with your copy of MSVC). Another option is to use the
# free MSVC toolkit from http://msdn.microsoft.com/visualc/vctoolkit2003/
#

MAKE=nmake /nologo
CC=cl /nologo
CONFIGFLAGS=#/ULINSOLVERS_RETAIN_MEMORY
# YOU MIGHT WANT TO UNCOMMENT THE FOLLOWING LINE
#SPOPTFLAGS=/GL /G7 /arch:SSE2 # special optimization: resp. whole program opt., Athlon/Pentium4 opt., SSE2 extensions
# /MD COMPILES WITH MULTIPLE THREADS SUPPORT. TO DISABLE IT, SUBSTITUTE WITH /ML
# FLAG /EHsc SUPERSEDED /GX IN MSVC'05. IF YOU HAVE AN EARLIER VERSION THAT COMPLAINS ABOUT IT, CHANGE /EHsc TO /GX
CFLAGS=$(CONFIGFLAGS) /I. /MD /W3 /EHsc /O2 $(SPOPTFLAGS) # /Wall
LAPACKLIBS_PATH=C:\src\lib # WHEN USING LAPACK, CHANGE THIS TO WHERE YOUR COMPILED LIBS ARE!
LDFLAGS=/link /subsystem:console /opt:ref /libpath:$(LAPACKLIBS_PATH) /libpath:.
24
25
LIBOBJS=lm.obj Axb.obj misc.obj lmlec.obj lmbc.obj lmblec.obj lmbleic.obj
LIBSRCS=lm.c Axb.c misc.c lmlec.c lmbc.c lmblec.c lmbleic.c
Emmanuel Bertin's avatar
Emmanuel Bertin committed
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
DEMOBJS=lmdemo.obj
DEMOSRCS=lmdemo.c
AR=lib /nologo

# comment the following line if you are not using LAPACK
LAPACKLIBS=clapack.lib blas.lib libF77.lib libI77.lib

LIBS=levmar.lib $(LAPACKLIBS)

all: levmar.lib lmdemo.exe

levmar.lib: $(LIBOBJS)
	$(AR) /out:levmar.lib $(LIBOBJS)

lmdemo.exe: $(DEMOBJS) levmar.lib
	$(CC) $(DEMOBJS) $(LDFLAGS) /out:lmdemo.exe $(LIBS)

43
44
45
46
47
48
49
lm.obj: lm.c lm_core.c levmar.h misc.h compiler.h
Axb.obj: Axb.c Axb_core.c levmar.h misc.h
misc.obj: misc.c misc_core.c levmar.h misc.h
lmlec.obj: lmlec.c lmlec_core.c levmar.h misc.h
lmbc.obj: lmbc.c lmbc_core.c levmar.h misc.h  compiler.h
lmblec.obj: lmblec.c lmblec_core.c levmar.h misc.h
lmbleic.obj: lmbleic.c lmbleic_core.c levmar.h misc.h
Emmanuel Bertin's avatar
Emmanuel Bertin committed
50

51
lmdemo.obj: levmar.h
Emmanuel Bertin's avatar
Emmanuel Bertin committed
52
53
54
55
56
57
58
59

clean:
	-del $(LIBOBJS) $(DEMOBJS)

cleanall: clean
	-del lmdemo.exe
	-del levmar.lib