Revision 1028

trunk/src/Makefile (revision 1028)
1
DESTDIR=..\build\dist
2
OBJDESTDIR=..\build\objects\dist
3

  
4
CXXFLAGS_SAF=/nologo /O2 /W4 /GF /EHsc /DSAFE_ALL /DUSE_LAPLACE /DWIN32 /D__MSVC32__=8 /I..\$(DESTDIR)\include
5
CXXFLAGS_OPT=/nologo /O2 /W4 /GF /EHsc /DOPT_LIB  /DUSE_LAPLACE /DWIN32 /D__MSVC32__=8 /I..\$(DESTDIR)\include
6

  
7
all: dist bins contrib
8
	pushd $(DESTDIR) & cscript ..\..\scripts\create-admb-shortcut.vbs & popd
9

  
10
dist: srcs
11

  
12
srcs:
13
	IF NOT EXIST $(DESTDIR) md $(DESTDIR)
14
	copy ..\LICENSE.txt $(DESTDIR)
15
	copy ..\CHANGES.txt $(DESTDIR)
16
	copy ..\README.txt $(DESTDIR)
17
	copy ..\VERSION $(DESTDIR)
18
	IF NOT EXIST $(DESTDIR) md $(DESTDIR)\examples
19
	IF NOT EXIST $(DESTDIR)\examples xcopy /I /E /Y ..\examples $(DESTDIR)\examples
20
	IF NOT EXIST $(DESTDIR) md $(DESTDIR)\contrib
21
	IF NOT EXIST $(DESTDIR)\contrib xcopy /I /E /Y ..\contrib $(DESTDIR)\contrib
22

  
23
bins: libs
24
	IF NOT EXIST $(DESTDIR)\bin md $(DESTDIR)\bin
25
	copy df1b2-separable\sed* $(DESTDIR)\bin
26
	copy ..\scripts\cl\*.bat $(DESTDIR)\bin
27
	copy ..\scripts\admb\admb.bat $(DESTDIR)\bin
28
	copy ..\scripts\admb\root-admb.bat ..\admb.bat
29
	copy ..\utilities\sed.exe $(DESTDIR)\bin
30
	copy ..\utilities\*.dll $(DESTDIR)\bin
31
	pushd nh99& ..\..\utilities\make  --file=Makefile CC="$(CC)" DESTDIR="..\$(DESTDIR)" bins& popd
32
	pushd df1b2-separable& ..\..\utilities\make --file=Makefile CC="$(CC)" DESTDIR="..\$(DESTDIR)" bins& popd
33

  
34
libs: includes admbsaf admbopt
35

  
36
admbsaf:
37
	IF NOT EXIST $(OBJDESTDIR) md $(OBJDESTDIR)
38
	pushd df1b2-separable & ..\..\utilities\make CXX=$(CXX) CXXFLAGS="$(CXXFLAGS_SAF)" PREFIX_OBJ="..\$(OBJDESTDIR)\saflp-df1b2-separable-" DESTDIR="..\$(DESTDIR)" --file=Makefile & popd
39
	pushd linad99 & ..\..\utilities\make CXX=$(CXX) CXXFLAGS="$(CXXFLAGS_SAF)" PREFIX_OBJ="..\$(OBJDESTDIR)\saflp-linad99-" DESTDIR="..\$(DESTDIR)" --file=Makefile & popd
40
	pushd nh99 & ..\..\utilities\make CXX=$(CXX) CXXFLAGS="$(CXXFLAGS_SAF)" PREFIX_OBJ="..\$(OBJDESTDIR)\saflp-nh99-" DESTDIR="..\$(DESTDIR)" --file=Makefile & popd
41
	pushd tools99 & ..\..\utilities\make CXX=$(CXX) CXXFLAGS="$(CXXFLAGS_SAF)" PREFIX_OBJ="..\$(OBJDESTDIR)\saflp-tools99-" DESTDIR="..\$(DESTDIR)" --file=Makefile & popd
42
	IF NOT EXIST $(DESTDIR)\lib md $(DESTDIR)\lib
43
	pushd $(OBJDESTDIR) & lib /OUT:..\..\dist\lib\admb.lib /NOLOGO /IGNORE:4006 saflp-df1b2-separable*.obj saflp-linad99*.obj saflp-nh99*.obj saflp-tools99*.obj
44

  
45
admbopt:
46
	IF NOT EXIST $(OBJDESTDIR) md $(OBJDESTDIR)
47
	pushd df1b2-separable & ..\..\utilities\make CXX=$(CXX) CXXFLAGS="$(CXXFLAGS_OPT)" PREFIX_OBJ="..\$(OBJDESTDIR)\optlp-df1b2-separable-" DESTDIR="..\$(DESTDIR)" --file=Makefile & popd
48
	pushd linad99 & ..\..\utilities\make CXX=$(CXX) CXXFLAGS="$(CXXFLAGS_OPT)" PREFIX_OBJ="..\$(OBJDESTDIR)\optlp-linad99-" DESTDIR="..\$(DESTDIR)" --file=Makefile & popd
49
	pushd nh99 & ..\..\utilities\make CXX=$(CXX) CXXFLAGS="$(CXXFLAGS_OPT)" PREFIX_OBJ="..\$(OBJDESTDIR)\optlp-nh99-" DESTDIR="..\$(DESTDIR)" --file=Makefile & popd
50
	pushd tools99 & ..\..\utilities\make CXX=$(CXX) CXXFLAGS="$(CXXFLAGS_OPT)" PREFIX_OBJ="..\$(OBJDESTDIR)\optlp-tools99-" DESTDIR="..\$(DESTDIR)" --file=Makefile & popd
51
	IF NOT EXIST $(DESTDIR)\lib md $(DESTDIR)\lib
52
	pushd $(OBJDESTDIR) & lib /OUT:..\..\dist\lib\admbo.lib /NOLOGO /IGNORE:4006 optlp-df1b2-separable*.obj optlp-linad99*.obj optlp-nh99*.obj optlp-tools99*.obj
53

  
54

  
55
includes:
56
	IF NOT EXIST $(DESTDIR)\include md $(DESTDIR)\include
57
	copy df1b2-separable\df1b2fun.h $(DESTDIR)\include
58
	copy df1b2-separable\adpool.h $(DESTDIR)\include
59
	copy df1b2-separable\adrndeff.h $(DESTDIR)\include
60
	copy df1b2-separable\df1b2fnl.h $(DESTDIR)\include
61
	copy df1b2-separable\df3fun.h $(DESTDIR)\include
62
	copy df1b2-separable\df32fun.h $(DESTDIR)\include
63
	copy df1b2-separable\df1b2loc.h $(DESTDIR)\include
64
	copy linad99\fvar.hpp $(DESTDIR)\include
65
	copy linad99\d4arr.hpp $(DESTDIR)\include
66
	copy linad99\dfpool.h $(DESTDIR)\include
67
	copy linad99\factors.h $(DESTDIR)\include
68
	copy nh99\admodel.h $(DESTDIR)\include
69
	copy nh99\adsplus.h $(DESTDIR)\include
70
	copy nh99\spcomm.h $(DESTDIR)\include
71
	copy nh99\s.h $(DESTDIR)\include
72
	copy nh99\newredef.h $(DESTDIR)\include
73
	copy nh99\param_init_bounded_number_matrix.h $(DESTDIR)\include
74
	copy tools99\clist.h $(DESTDIR)\include
75
	copy tools99\cifstrem.h $(DESTDIR)\include
76
	copy tools99\adstring.hpp $(DESTDIR)\include
77
	copy tools99\admb_messages.h $(DESTDIR)\include
78

  
79
contrib: contribdirs libcontribsaf libcontribopt
80

  
81
contribdirs:
82
	IF NOT EXIST $(DESTDIR)\contrib\lib md $(DESTDIR)\contrib\lib
83
	IF NOT EXIST $(DESTDIR)\contrib\bin md $(DESTDIR)\contrib\bin
84
	IF NOT EXIST $(DESTDIR)\contrib\include md $(DESTDIR)\contrib\include
85

  
86
libcontribsaf:
87
	pushd ..\contrib& $(MAKE) ADMB_HOME="$(MAKEDIR)\$(DESTDIR)" CXXFLAGS="$(CXXFLAGS_SAF)" PREFIX_OBJ="..\$(OBJDESTDIR)\saflp-contrib-"& popd
88
	lib /OUT:$(DESTDIR)\contrib\lib\contrib.lib /NOLOGO /IGNORE:4006 $(OBJDESTDIR)\saflp-contrib*.obj
89

  
90
libcontribopt:
91
	pushd ..\contrib& $(MAKE) ADMB_HOME="$(MAKEDIR)\$(DESTDIR)" CXXFLAGS="$(CXXFLAGS_OPT)" PREFIX_OBJ="..\$(OBJDESTDIR)\optlp-contrib-"& popd
92
	lib /OUT:$(DESTDIR)\contrib\lib\contribo.lib /NOLOGO /IGNORE:4006 $(OBJDESTDIR)\optlp-contrib*.obj
93

  
94
tests:
95
	pushd ..\tests& $(MAKE) ADMB_HOME="$(MAKEDIR)\$(DESTDIR)"& popd
96

  
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff