@@ -4,31 +4,37 @@ REM ----------------------------------------------------
4
4
REM Batch file to build all runtime libraries
5
5
REM
6
6
REM (c) Zilog, Inc.
7
- REM Modified by Matt Waltz for CE support
7
+ REM Modified by Matt "MateoConLechuga" Waltz for CE support
8
8
REM ----------------------------------------------------
9
9
10
10
REM +--Setting environment variables-------------------+
11
+
12
+ set SRC = .
11
13
set BIN = %CEDEV% \bin
12
14
set INC = %CEDEV% \include
13
15
set LIBPATH = %CEDEV% \lib
14
- set SRC = .
16
+ set SHARED_PATH = std\shared
17
+ set STATIC_PATH = std\static
18
+ set LINKED_PATH = std\linked
19
+ set CE_PATH = ce
15
20
16
21
set ASM = %BIN% \ez80asm.exe
17
22
set CC = %BIN% \eZ80cc.exe
18
23
set LIB = %BIN% \ez80lib.exe
19
24
20
- set RTL_C_SRC = bsearch.c maptab.c modf.c qsort.c strtod.c strtol.c strtoul.c ufltinfo.c ufltrnd.c ureverse.c
21
- set RTL_ST_C_SRC = uitoa.c ultoa.c ustoa.c uuitoa.c uultoa.c uustoa.c vsprintf.c
25
+ REM -- Static and linked hold the same file names --
22
26
23
- set RTL_NOKERNEL_C_SRC = free .c malloc .c realloc .c
24
- set RTL_ASM_SRC = atoi .asm atol .asm atos .asm abs .asm calloc .asm isalnum.asm isalpha.asm iscntrl.asm isdigit.asm isgraph.asm islower.asm isprint.asm ispunct.asm isspace.asm isupper.asm isxdigit.asm isascii.asm labs.asm sprintf.asm strtok.asm longjmp.asm memchr.asm memcmp.asm memcpy.asm memmove.asm memset.asm sbrk.asm setjmp.asm strcat.asm strchr.asm strcmp.asm strcpy.asm strcspn.asm strlen.asm strncat.asm strncmp.asm strncpy.asm strpbrk.asm strrchr.asm strspn.asm strstr.asm div.asm ldiv.asm tolower.asm toupper.asm strncasecmp.asm srand.asm rand.asm strdup .asm
27
+ set RTL_STATIC_C_SRC = asin .c atan .c atan2.c exp.c floor.c fmod.c frexp.c ldexp.c log.c log10.c modf.c pow.c sin.c sinh.c sqrt.c strtod.c tan.c tanh.c ufltinfo.c ufltrnd .c
28
+ set RTL_STATIC_ASM_SRC = acos .asm atof .asm ceil .asm cos .asm fabs .asm isalnum.asm isalpha.asm iscntrl.asm isdigit.asm isgraph.asm islower.asm isprint.asm ispunct.asm isspace.asm isupper.asm isxdigit.asm
25
29
26
- set HLP_C_SRC =
27
- set HLP_ASM_SRC=bdivs.asm bdivu.asm bldix.asm bldiy.asm bmuls.asm brems.asm bremu.asm bshl.asm bshrs.asm bshru.asm bstix.asm bstiy.asm case.asm iand.asm idivs.asm idivu.asm ildix.asm ildiy.asm imulu.asm indcall.asm ineg.asm inot.asm ior.asm irems.asm iremu.asm ishl.asm ishrs.asm ishru.asm istix.asm istiy.asm itol.asm ixor.asm ladd.asm land.asm lcmpu.asm lcmps.asm ldivs.asm ldivu.asm lldix.asm lldiy.asm lmulu.asm lmuls.asm lneg.asm lnot.asm lor.asm lrems.asm lremu.asm lshl.asm lshrs.asm lshru.asm lstix.asm lstiy.asm lsub.asm lxor.asm sand.asm sdivs.asm sdivu.asm sldix.asm sldiy.asm smulu.asm sneg.asm snot.asm sor.asm srems.asm sremu.asm sshl.asm sshrs.asm sshru.asm sstix.asm sstiy.asm stoi.asm stoiu.asm sxor.asm frbmuls.asm frbtof.asm frftob.asm frftoi.asm frftos.asm frftoub.asm frftoui.asm frftous.asm frimuls.asm frimulu.asm fritof.asm frsmuls.asm frsmulu.asm frstof.asm frubtof.asm fruitof.asm frustof.asm frameset0.asm frameset.asm setflag.asm scmpzero.asm icmpzero.asm lcmpzero.asm seqcase.asm seqcaseD.asm case24.asm case24D.asm case16.asm case16D.asm case8.asm case8D.asm
30
+ set RTL_LINKED_C_SRC =
31
+ set RTL_LINKED_ASM_SRC = acos.asm asin.asm atan.asm atan2.asm atof.asm ceil.asm cos.asm cosh.asm exp.asm fabs.asm floor.asm fmod.asm frexp.asm isalnum.asm isalpha.asm iscntrl.asm isdigit.asm isgraph.asm islower.asm isprint.asm ispunct.asm isspace.asm isupper.asm isxdigit.asm ldexp.asm log.asm log10.asm modf.asm pow.asm sin.asm sinh.asm sqrt.asm strtod.asm tan.asm tanh.asm ufltinfo.asm ufltrnd.asm
32
+
33
+ set RTL_SHARED_C_SRC = bsearch.c fpdata.c free.c gamma.c malloc.c maptab.c qsort.c realloc.c strtol.c strtoul.c udtoe.c udtof.c udtog.c uitoa.c ultoa.c ureverse.c ustoa.c uuitoa.c uultoa.c uustoa.c vsprintf.c
34
+ set RTL_SHARED_ASM_SRC = abs.asm atoi.asm atol.asm atos.asm calloc.asm div.asm finite.asm fpadd.asm fpcmp.asm fpdiv.asm fpftol.asm fpltof.asm fpmul.asm fpneg.asm fppack.asm fpsub.asm fpultof.asm fpupop1.asm fpupop2.asm isascii.asm isinf.asm isnan.asm longjmp.asm memchr.asm memcmp.asm memcpy.asm memmove.asm memset.asm rand.asm sbrk.asm setjmp.asm sprintf.asm sqrtf.asm srand.asm stoi.asm strcasecmp.asm strcat.asm strchr.asm strcmp.asm strcpy.asm strcspn.asm strdup.asm strlen.asm strncasecmp.asm strncat.asm strncmp.asm strncpy.asm strpbrk.asm strrchr.asm strspn.asm strstr.asm strtok.asm tolower.asm toupper.asm uldiv.asm
28
35
29
- set FP_C_SRC = asin.c atan.c atan2.c exp.c floor.c fmod.c fpdata.c frexp.c ldexp.c log.c log10.c modf.c pow.c sin.c sinh.c sqrt.c tan.c tanh.c gamma.c udtoe.c
30
- set FP_ST_C_SRC = udtof.c udtog.c
31
- set FP_ASM_SRC = acos.asm atof.asm ceil.asm cos.asm fabs.asm finite.asm fpadd.asm fpcmp.asm fpdiv.asm fpftol.asm fpltof.asm fpmul.asm fpneg.asm fppack.asm fpsub.asm fpultof.asm fpupop1.asm fpupop2.asm sqrtf.asm isnan.asm isinf.asm
36
+ set HLP_C_SRC =
37
+ set HLP_ASM_SRC=bdivs.asm bdivu.asm bldix.asm bldiy.asm bmuls.asm brems.asm bremu.asm bshl.asm bshrs.asm bshru.asm bstix.asm bstiy.asm case.asm case24.asm case24D.asm case16.asm case16D.asm case8.asm case8D.asm iand.asm idivs.asm idivu.asm ildix.asm ildiy.asm imulu.asm imuls.asm indcall.asm ineg.asm inot.asm ior.asm irems.asm iremu.asm ishl.asm ishrs.asm ishru.asm istix.asm istiy.asm itol.asm ixor.asm ladd.asm land.asm lcmpu.asm lcmps.asm ldivs.asm ldivu.asm lldix.asm lldiy.asm lmulu.asm lmuls.asm lneg.asm lnot.asm lor.asm lrems.asm lremu.asm lshl.asm lshrs.asm lshru.asm lstix.asm lstiy.asm lsub.asm lxor.asm sand.asm sdivs.asm sdivu.asm sldix.asm sldiy.asm smulu.asm sneg.asm snot.asm sor.asm srems.asm sremu.asm sshl.asm sshrs.asm sshru.asm sstix.asm sstiy.asm stoi.asm stoiu.asm sxor.asm frbmuls.asm frbtof.asm frftob.asm frftoi.asm frftos.asm frftoub.asm frftoui.asm frftous.asm frimuls.asm frimulu.asm fritof.asm frsmuls.asm frsmulu.asm frstof.asm frubtof.asm fruitof.asm frustof.asm frameset0.asm frameset.asm setflag.asm scmpzero.asm icmpzero.asm lcmpzero.asm seqcase.asm seqcaseD.asm
32
38
33
39
set DEBUG_C_SRC =
34
40
set DEBUG_ASM_SRC = debugger.asm removeallbreakpoints.asm removeallwatchpoints.asm removebreakpoint.asm removewatchpoint.asm setbreakpoint.asm setreadwatchpoint.asm setwritewatchpoint.asm setreadwritewatchpoint.asm setwatchpoint.asm
@@ -38,7 +44,7 @@ set TICE_ASM_SRC=tice.asm memset_fast.asm prgmcleanup.asm abort.asm os.asm
38
44
set CPU = EZ80F91
39
45
set STDINC = %INC% \lib\std
40
46
set CEINC = %CEDEV% \include\lib\ce
41
- set ZLGINC = %SRC% \std_include
47
+ set ZLGINC = %SRC% \include
42
48
set CFLG_REL = -NOdebug -optsize -NOkeeplst -promote -quiet -fplib
43
49
set AFLG = -genobj -NOigcase -include:%STDINC% -include:%ZLGINC% -NOlist -NOlistmac -pagelen:56 -pagewidth:100 -quiet -sdiopt -warn -NOzmasm
44
50
@@ -49,60 +55,47 @@ mkdir %LIBPATH%\std\ce
49
55
50
56
REM --- CE Libraries
51
57
52
- echo --Building CE Debugger library...
58
+ set C_FLG = %CFLG_REL% -cpu:%CPU% -asmsw:" -cpu:%CPU% -include:%STDINC% -include:%ZLGINC% " -define:_%CPU%
59
+ set ASM_FLG = %AFLG% -cpu:%CPU% -NOdebug
60
+
61
+ echo -- Building CE Debugger library...
62
+ set MY_PATH = %CE_PATH%
53
63
set C_SRC = %DEBUG_C_SRC%
54
64
set ASM_SRC = %DEBUG_ASM_SRC%
55
- set C_FLG = %CFLG_DBG% -cpu:%CPU% -asmsw:" -cpu:%CPU% -include:%STDINC% -include:%ZLGINC% " -define:_%CPU%
56
- set ASM_FLG = %AFLG% -cpu:%CPU% -debug -include:%CEINC%
57
- call buildcelib.bat cdebug.lib
65
+ call buildlib.bat cdebug.lib
58
66
59
- echo --Building TICE library...
67
+ echo -- Building TICE library...
68
+ set MY_PATH = %CE_PATH%
60
69
set C_SRC = %TICE_C_SRC%
61
70
set ASM_SRC = %TICE_ASM_SRC%
62
- set C_FLG = %CFLG_DBG% -cpu:%CPU% -asmsw:" -cpu:%CPU% -include:%STDINC% -include:%ZLGINC% " -define:_%CPU%
63
- set ASM_FLG = %AFLG% -cpu:%CPU% -debug -include:%CEINC%
64
- call buildcelib.bat ctice.lib
65
-
66
- echo --Building RTL libraries...
67
- set C_SRC = %RTL_C_SRC%
68
- set ASM_SRC = %RTL_ASM_SRC%
69
- set C_FLG = %CFLG_REL% -cpu:%CPU% -asmsw:" -cpu:%CPU% -include:%STDINC% -include:%ZLGINC% " -define:_%CPU%
70
- set ASM_FLG = %AFLG% -cpu:%CPU% -NOdebug
71
- call buildstdlib.bat crt.lib
71
+ call buildlib.bat ctice.lib
72
72
73
- set C_SRC = %RTL_ST_C_SRC%
74
- set ASM_SRC =
75
- set C_FLG = %CFLG_REL% -cpu:%CPU% -asmsw:" -cpu:%CPU% -include:%STDINC% -include:%ZLGINC% " -define:_%CPU%
76
- set ASM_FLG = %AFLG% -cpu:%CPU% -NOdebug
77
- call buildstdlib.bat crtS.lib
78
-
79
- set C_SRC = %RTL_NOKERNEL_C_SRC%
80
- set ASM_SRC =
81
- set C_FLG = %CFLG_REL% -cpu:%CPU% -asmsw:" -cpu:%CPU% -include:%STDINC% -include:%ZLGINC% " -define:_%CPU%
82
- set ASM_FLG = %AFLG% -cpu:%CPU% -NOdebug
83
- call buildstdlib.bat nokernel.lib
84
-
85
- echo --Building CHLP libraries...
73
+ echo -- Building CHLP libraries...
74
+ set MY_PATH = %SHARED_PATH%
86
75
set C_SRC = %HLP_C_SRC%
87
76
set ASM_SRC = %HLP_ASM_SRC%
88
- set C_FLG = %CFLG_REL% -cpu:%CPU% -asmsw:" -cpu:%CPU% -include:%STDINC% -include:%ZLGINC% "
89
- set ASM_FLG = %AFLG% -cpu:%CPU% -NOdebug
90
- call buildstdlib.bat chelp.lib
77
+ call buildlib.bat chelp.lib
91
78
92
- echo --Building FPLIB libraries...
93
- set C_SRC = %FP_C_SRC%
94
- set ASM_SRC = %FP_ASM_SRC%
95
- set C_FLG = %CFLG_REL% -cpu:%CPU% -asmsw:" -cpu:%CPU% -include:%STDINC% -include:%ZLGINC% "
96
- set ASM_FLG = %AFLG% -cpu:%CPU% -NOdebug
97
- call buildstdlib.bat fplib.lib
79
+ echo -- Building RTL...
80
+ set MY_PATH = %SHARED_PATH%
81
+ set C_SRC = %RTL_SHARED_C_SRC%
82
+ set ASM_SRC = %RTL_SHARED_ASM_SRC%
83
+ call buildlib.bat crt.lib
98
84
99
- set C_SRC = %FP_ST_C_SRC%
100
- set ASM_SRC =
101
- set C_FLG = %CFLG_REL% -cpu:%CPU% -asmsw:" -cpu:%CPU% -include:%STDINC% -include:%ZLGINC% "
102
- set ASM_FLG = %AFLG% -cpu:%CPU% -NOdebug
103
- call buildstdlib.bat fplibS.lib
85
+ echo -- Building RT Linked Library Portion...
86
+ set MY_PATH = %LINKED_PATH%
87
+ set C_SRC = %RTL_LINKED_C_SRC%
88
+ set ASM_SRC = %RTL_LINKED_ASM_SRC%
89
+ call buildlib.bat crt_linked.lib
90
+
91
+ echo -- Building RT Static Library Portion...
92
+ set MY_PATH = %STATIC_PATH%
93
+ set C_SRC = %RTL_STATIC_C_SRC%
94
+ set ASM_SRC = %RTL_STATIC_ASM_SRC%
95
+ call buildlib.bat crt_static.lib
96
+
97
+ echo -- Copying the libraries...
104
98
105
- echo --Copying the libraries...
106
99
REM -- copy the libraries --
107
100
copy /Y *.lib %LIBPATH% \std
108
101
move /Y %LIBPATH% \std\ctice.lib %LIBPATH% \std\ce\ctice.lib
0 commit comments