DEADSOFTWARE

d035870dab4ba6f8c01de72df358f0e59d2b6b8a
[cpc.git] / make-stage0c.sh
1 #! /bin/sh
3 set -e
5 THIS="$(dirname "$(readlink -f "$0")")"
6 OUT="$THIS/stage0/i486"
8 linkall() {
9 local name="$1";
10 shift
12 local list=""
13 for mod in "$@" "$name"; do
14 list="$list $THIS/CodeC/$mod.c"
15 done
17 gcc -m32 -g -O0 -lm -ldl -o "$OUT/$name" \
18 -Wno-int-conversion \
19 -Wno-int-to-pointer-cast \
20 -Wno-incompatible-pointer-types \
21 -Wno-implicit-function-declaration \
22 -I "$THIS/C" "$THIS/C/SYSTEM.c" $list
23 }
25 rm -rf "$OUT"
26 mkdir -p "$OUT"
28 linkall cpc486 \
29 C99types C99macro \
30 Kernel Console Files Dates Math Strings Services Log \
31 HostLang HostConsole HostFiles HostDates DswLog \
32 DevCPM DevCPT DevCPS DevCPB DevCPP DevCPE DevCPH \
33 DevCPL486 DevCPC486 DevCPV486 \
34 DswDocuments DswCompiler486Main
36 linkall cpfront \
37 C99types C99macro \
38 Kernel Console Files Dates Math Strings Services Log \
39 HostLang HostConsole HostFiles HostDates DswLog \
40 DevCPM DevCPT DevCPS DevCPB DevCPP DevCPE DevCPH \
41 CPfrontCPG CPfrontCPC CPfrontCPV\
42 DswDocuments DswCompilerCPfrontMain
44 linkall cpl486 \
45 C99types C99macro \
46 Kernel Console Files Math Strings Services Log \
47 HostLang HostConsole HostFiles DswLog \
48 Dev2LnkBase Dev2LnkChmod Dev2LnkLoad Dev2LnkWriteElf \
49 Dev2LnkWriteElfStatic Dev2LnkWritePe \
50 DswLinker486Main
52 #linkall cplist \
53 # C99types C99macro \
54 # Kernel Console Files Math Strings Services Log \
55 # HostLang HostConsole HostFiles DswLog \
56 # DswListMain
58 #linkall cpecho \
59 # C99types C99macro \
60 # Kernel Console Files Math Strings Services Log \
61 # HostLang HostConsole HostFiles DswLog \
62 # DswEchoMain
64 #linkall cploop \
65 # C99types C99macro \
66 # Kernel Console Files Math Strings Services Log \
67 # HostLang HostConsole HostFiles DswLog \
68 # DswLoopMain
70 chmod a+x "$OUT/cpfront" "$OUT/cpc486" "$OUT/cpl486"