-
Notifications
You must be signed in to change notification settings - Fork 1
/
make_msc_static.bat
executable file
·94 lines (75 loc) · 2.73 KB
/
make_msc_static.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
@echo off
rem %1: microsoft runtime library to link with
set libc=
if "%1" == "default" set libc=
if "%1" == "ml" set libc=ml
if "%1" == "mld" set libc=mld
if "%1" == "md" set libc=md
if "%1" == "mdd" set libc=mdd
if "%1" == "mt" set libc=mt
if "%1" == "mtd" set libc=mtd
if "%1" == "" goto usage
set forcepostfix=none
if "%2" == "default" set forcepostfix=default
if "%2" == "ml" set forcepostfix=ml
if "%2" == "mld" set forcepostfix=mld
if "%2" == "md" set forcepostfix=md
if "%2" == "mdd" set forcepostfix=mdd
if "%2" == "mt" set forcepostfix=mt
if "%2" == "mtd" set forcepostfix=mtd
set make=nmake -nologo
set vccomp=vc7
REM install necessary makefiles to folders
echo installing build files
copy confdir\msvsstatic\make.all Makefile
copy confdir\msvsstatic\make.src src\Makefile
copy confdir\msvsstatic\make.lst.src src\make.lst
copy confdir\msvsstatic\make.pro test\Makefile
copy confdir\msvsstatic\make.lst.test test\make.lst
copy confdir\msvsstatic\make.pro demo\Makefile
copy confdir\msvsstatic\make.lst.demo demo\make.lst
rem install appropriate compiler options
echo installing appropriate compiler options
copy confdir\msvsstatic\comp\%vccomp%\cc%libc% src\comp.lst
copy confdir\msvsstatic\comp\%vccomp%\cc%libc% test\comp.lst
copy confdir\msvsstatic\comp\%vccomp%\cc%libc% demo\comp.lst
REM test if we should force the postfix of the leda library name
if "%forcepostfix%" == "none" goto :endforcepostfix
if "%forcepostfix%" == "default" goto :addemptyforcepostfix
echo LINKVER = _%forcepostfix% >> src\comp.lst
echo LINKVER = _%forcepostfix% >> test\comp.lst
echo LINKVER = _%forcepostfix% >> demo\comp.lst
goto :endforcepostfix
:addemptyforcepostfix
echo LINKVER = >> src\comp.lst
echo LINKVER = >> test\comp.lst
echo LINKVER = >> demo\comp.lst
:endforcepostfix
REM test for LEDA-5.0 include structure
if not exist %LEDAROOT%\incl\LEDA\system\basic.h goto leda_l_5
echo LEDAFLAGS = $(LEDAFLAGS) -DLEDA_GE_V5 >> test\make.lst
echo LEDAFLAGS = $(LEDAFLAGS) -DLEDA_GE_V5 >> demo\make.lst
echo LEDAFLAGS = $(LEDAFLAGS) -DLEDA_GE_V5 >> src\make.lst
:leda_l_5
%make%
set make=
goto :quit
:usage
echo.
echo Usage: make_msvs_static runtimelib [forceledapostfix]
echo.
echo Possible options for runtimelib:
echo.
echo ml, mld, mt, mtd, md, mdd, default
echo.
echo If forceledapostfix is not empty, it is assumed that the leda
echo libraries are named like libleda_forceledapostfix.lib
echo.
echo Possible options for forceledapostfix:
echo.
echo ml, mld, mt, mtd, md, mdd, default
echo.
echo default corresponds to forceledapostfix beeing the empty string.
goto :quit
:quit
set libc=