Revision 1070 trunk/src/Makefile

Makefile (revision 1070)
3 3
LEXDESTDIR=..\build\lex
4 4

  
5 5
!IF DEFINED(DEBUG)
6
CXXFLAGS_SAF=/nologo /G7 /W4 /GF /EHsc /DSAFE_ALL /DUSE_LAPLACE /DWIN32 /D__MSVC32__=8 /I..\$(DESTDIR)\include
7
CXXFLAGS_OPT=/nologo /G7 /W4 /GF /EHsc /DOPT_LIB  /DUSE_LAPLACE /DWIN32 /D__MSVC32__=8 /I..\$(DESTDIR)\include
6
CXXFLAGS_SAF=/nologo /G7 /W4 /GF /EHsc /DSAFE_ALL /DUSE_LAPLACE /DWIN32 /D__MSVC32__=8 /I$(DESTDIR)\include
7
CXXFLAGS_OPT=/nologo /G7 /W4 /GF /EHsc /DOPT_LIB  /DUSE_LAPLACE /DWIN32 /D__MSVC32__=8 /I$(DESTDIR)\include
8
CXXFLAGS_SAF2=/nologo /G7 /W4 /GF /EHsc /DSAFE_ALL /DUSE_LAPLACE /DWIN32 /D__MSVC32__=8 /I..\$(DESTDIR)\include
9
CXXFLAGS_OPT2=/nologo /G7 /W4 /GF /EHsc /DOPT_LIB  /DUSE_LAPLACE /DWIN32 /D__MSVC32__=8 /I..\$(DESTDIR)\include
8 10
!ELSE
9
CXXFLAGS_SAF=/nologo /O2 /W4 /GF /EHsc /DSAFE_ALL /DUSE_LAPLACE /DWIN32 /D__MSVC32__=8 /I..\$(DESTDIR)\include
10
CXXFLAGS_OPT=/nologo /O2 /W4 /GF /EHsc /DOPT_LIB  /DUSE_LAPLACE /DWIN32 /D__MSVC32__=8 /I..\$(DESTDIR)\include
11
CXXFLAGS_SAF=/nologo /O2 /W4 /GF /EHsc /DSAFE_ALL /DUSE_LAPLACE /DWIN32 /D__MSVC32__=8 /I$(DESTDIR)\include
12
CXXFLAGS_OPT=/nologo /O2 /W4 /GF /EHsc /DOPT_LIB  /DUSE_LAPLACE /DWIN32 /D__MSVC32__=8 /I$(DESTDIR)\include
13
CXXFLAGS_SAF2=/nologo /O2 /W4 /GF /EHsc /DSAFE_ALL /DUSE_LAPLACE /DWIN32 /D__MSVC32__=8 /I..\$(DESTDIR)\include
14
CXXFLAGS_OPT2=/nologo /O2 /W4 /GF /EHsc /DOPT_LIB  /DUSE_LAPLACE /DWIN32 /D__MSVC32__=8 /I..\$(DESTDIR)\include
11 15
!ENDIF
12 16

  
17
!INCLUDE df1b2-separable\objects.lst
18
OPTLP_DF1B2_SEPARABLE_OBJS=$(OBJ0: = ..\build\objects\dist\optlp-df1b2-separable-)
19
SAFLP_DF1B2_SEPARABLE_OBJS=$(OBJ0: = ..\build\objects\dist\saflp-df1b2-separable-)
20

  
21
!INCLUDE linad99\objects.lst
22
OPTLP_LINAD99_OBJS=$(OBJ1: = ..\build\objects\dist\optlp-linad99-) $(OBJ2: = ..\build\objects\dist\optlp-linad99-) $(OBJ3: = ..\build\objects\dist\optlp-linad99-) $(OBJ4: = ..\build\objects\dist\optlp-linad99-)
23
SAFLP_LINAD99_OBJS=$(OBJ1: = ..\build\objects\dist\saflp-linad99-) $(OBJ2: = ..\build\objects\dist\saflp-linad99-) $(OBJ3: = ..\build\objects\dist\saflp-linad99-) $(OBJ4: = ..\build\objects\dist\saflp-linad99-)
24

  
25
!INCLUDE nh99\objects.lst
26
OPTLP_NH99_OBJS=$(OBJ6: = ..\build\objects\dist\optlp-nh99-)
27
SAFLP_NH99_OBJS=$(OBJ6: = ..\build\objects\dist\saflp-nh99-)
28

  
29
!INCLUDE tools99\objects.lst
30
OPTLP_TOOLS99_OBJS=$(OBJ7: = ..\build\objects\dist\optlp-tools99-)
31
SAFLP_TOOLS99_OBJS=$(OBJ7: = ..\build\objects\dist\saflp-tools99-)
32

  
13 33
all: dist bins contrib
14 34
	pushd $(DESTDIR) & cscript ..\..\scripts\create-admb-shortcut.vbs & popd
35
	@echo ADMB build completed.
36
	@echo For installation, check README.txt.
15 37

  
16 38
dist: srcs
17 39

  
......
65 87
	..\utilities\flex -w -o$(LEXDESTDIR)\lex.yy.c df1b2-separable\tpl2rem.lex 
66 88
	..\utilities\sed -f df1b2-separable\sedflex $(LEXDESTDIR)\lex.yy.c > $@
67 89

  
68
lexfiles2:
69
	pushd nh99& ..\..\utilities\make  --file=Makefile CC="$(CC)" DESTDIR="..\$(DESTDIR)" bins& popd
70
	pushd df1b2-separable& ..\..\utilities\make --file=Makefile CC="$(CC)" DESTDIR="..\$(DESTDIR)" bins& popd
71

  
72
libs: includes admbsaf admbopt
73

  
74
admbsaf:
75
	IF NOT EXIST $(OBJDESTDIR) md $(OBJDESTDIR)
76
	pushd df1b2-separable & ..\..\utilities\make CXX=$(CXX) CXXFLAGS="$(CXXFLAGS_SAF)" PREFIX_OBJ="..\$(OBJDESTDIR)\saflp-df1b2-separable-" DESTDIR="..\$(DESTDIR)" --file=Makefile & popd
77
	pushd linad99 & ..\..\utilities\make CXX=$(CXX) CXXFLAGS="$(CXXFLAGS_SAF)" PREFIX_OBJ="..\$(OBJDESTDIR)\saflp-linad99-" DESTDIR="..\$(DESTDIR)" --file=Makefile & popd
78
	pushd nh99 & ..\..\utilities\make CXX=$(CXX) CXXFLAGS="$(CXXFLAGS_SAF)" PREFIX_OBJ="..\$(OBJDESTDIR)\saflp-nh99-" DESTDIR="..\$(DESTDIR)" --file=Makefile & popd
79
	pushd tools99 & ..\..\utilities\make CXX=$(CXX) CXXFLAGS="$(CXXFLAGS_SAF)" PREFIX_OBJ="..\$(OBJDESTDIR)\saflp-tools99-" DESTDIR="..\$(DESTDIR)" --file=Makefile & popd
80
	IF NOT EXIST $(DESTDIR)\lib md $(DESTDIR)\lib
81
	pushd $(OBJDESTDIR) & lib /OUT:..\..\dist\lib\admb.lib /NOLOGO /IGNORE:4006 saflp-df1b2-separable*.obj saflp-linad99*.obj saflp-nh99*.obj saflp-tools99*.obj
82

  
83
admbopt:
84
	IF NOT EXIST $(OBJDESTDIR) md $(OBJDESTDIR)
85
	pushd df1b2-separable & ..\..\utilities\make CXX=$(CXX) CXXFLAGS="$(CXXFLAGS_OPT)" PREFIX_OBJ="..\$(OBJDESTDIR)\optlp-df1b2-separable-" DESTDIR="..\$(DESTDIR)" --file=Makefile & popd
86
	pushd linad99 & ..\..\utilities\make CXX=$(CXX) CXXFLAGS="$(CXXFLAGS_OPT)" PREFIX_OBJ="..\$(OBJDESTDIR)\optlp-linad99-" DESTDIR="..\$(DESTDIR)" --file=Makefile & popd
87
	pushd nh99 & ..\..\utilities\make CXX=$(CXX) CXXFLAGS="$(CXXFLAGS_OPT)" PREFIX_OBJ="..\$(OBJDESTDIR)\optlp-nh99-" DESTDIR="..\$(DESTDIR)" --file=Makefile & popd
88
	pushd tools99 & ..\..\utilities\make CXX=$(CXX) CXXFLAGS="$(CXXFLAGS_OPT)" PREFIX_OBJ="..\$(OBJDESTDIR)\optlp-tools99-" DESTDIR="..\$(DESTDIR)" --file=Makefile & popd
89
	IF NOT EXIST $(DESTDIR)\lib md $(DESTDIR)\lib
90
	pushd $(OBJDESTDIR) & lib /OUT:..\..\dist\lib\admbo.lib /NOLOGO /IGNORE:4006 optlp-df1b2-separable*.obj optlp-linad99*.obj optlp-nh99*.obj optlp-tools99*.obj
91

  
92

  
93 90
includes:
94 91
	IF NOT EXIST $(DESTDIR)\include md $(DESTDIR)\include
95 92
	copy df1b2-separable\df1b2fun.h $(DESTDIR)\include
......
114 111
	copy tools99\adstring.hpp $(DESTDIR)\include
115 112
	copy tools99\admb_messages.h $(DESTDIR)\include
116 113

  
114
libs: includes objects
115
	IF NOT EXIST $(DESTDIR)\lib md $(DESTDIR)\lib
116
	IF EXIST $(DESTDIR)\lib\admb.lib del $(DESTDIR)\lib\admb.lib
117
	pushd $(OBJDESTDIR) & lib /OUT:..\..\$(DESTDIR)\lib\admb.lib /NOLOGO /IGNORE:4006 saflp-df1b2-separable*.obj saflp-linad99*.obj saflp-nh99*.obj saflp-tools99*.obj saflp-sparse*.obj
118
	IF EXIST $(DESTDIR)\lib\admbo.lib del $(DESTDIR)\lib\admbo.lib
119
	pushd $(OBJDESTDIR) & lib /OUT:..\..\$(DESTDIR)\lib\admbo.lib /NOLOGO /IGNORE:4006 optlp-df1b2-separable*.obj optlp-linad99*.obj optlp-nh99*.obj optlp-tools99*.obj optlp-sparse*.obj
120

  
121
objects: objdestdir $(OPTLP_DF1B2_SEPARABLE_OBJS) $(SAFLP_DF1B2_SEPARABLE_OBJS) $(OPTLP_LINAD99_OBJS) $(SAFLP_LINAD99_OBJS) $(OPTLP_NH99_OBJS) $(SAFLP_NH99_OBJS) $(OPTLP_TOOLS99_OBJS) $(SAFLP_TOOLS99_OBJS) $(OBJDESTDIR)\optlp-sparse-hs_sparse.obj $(OBJDESTDIR)\saflp-sparse-hs_sparse.obj
122

  
123
$(SAFLP_DF1B2_SEPARABLE_OBJS):: $(@B:saflp-df1b2-separable-=df1b2-separable\).cpp
124
	$(CXX) /c $(CXXFLAGS_SAF) /Fo$@ $?
125

  
126
$(OPTLP_DF1B2_SEPARABLE_OBJS):: $(@B:optlp-df1b2-separable-=df1b2-separable\).cpp
127
	$(CXX) /c $(CXXFLAGS_OPT) /Fo$@ $?
128

  
129
$(SAFLP_LINAD99_OBJS):: $(@B:saflp-linad99-=linad99\).cpp
130
	$(CXX) /c $(CXXFLAGS_SAF) /Fo$@ $?
131

  
132
$(OPTLP_LINAD99_OBJS):: $(@B:optlp-linad99-=linad99\).cpp
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff