
SDIR=D:\John\Clean2.0\RuntimeSystem\

istartup.b: $(SDIR)istartup.s $(SDIR)icopy.s $(SDIR)imark.s $(SDIR)icompact.s
    copy $(SDIR)istartup.s $(SDIR)istartup.cpp
    gcc -E -DPROFILE -DWRITE_HEAP -D_WINDOWS_ -I $(SDIR) $(SDIR)istartup.cpp -o istartup.b
    w

istartup.a: istartup.b a.sed
    sed -f a.sed < istartup.b > istartup.a
    w

itrace.b: $(SDIR)itrace.s
    copy $(SDIR)itrace.s $(SDIR)itrace.cpp
    gcc -E -D_WINDOWS_ -I $(SDIR) $(SDIR)itrace.cpp -o itrace.b
    w

itrace.a: itrace.b a.sed
    sed -f a.sed < itrace.b > itrace.a
    w

wcon.s: $(SDIR)wcon.c
    gcc -S -O -Wall -DWINDOWS -DTIME_PROFILE -DWRITE_HEAP -o wcon.s $(SDIR)wcon.c

wcon.a: wcon.s c.sed
    sed -f c.sed <wcon.s >wcon.a

wcon.o: wcon.a
    as wcon.a -o wcon.o

_startup1.s: istartup.a wcon.a itrace.a
    cp istartup.a _startup1.s
    type itrace.a >> _startup1.s
    type wcon.a >> _startup1.s

_startup1.go: _startup1.s
	as _startup1.s -o _startup1.go

_startup1Trace.o: _startup1.go
	fixgnuasobj _startup1.go _startup1Trace.o

$(SDIR)ifileIO3.a: $(SDIR)ifileIO3.s a.sed
    sed -f a.sed < $(SDIR)ifileIO3.s > $(SDIR)ifileIO3.a
    w

ifileIO3.s: $(SDIR)ifileIO3.a
    copy $(SDIR)ifileIO3.a $(SDIR)ifileIO3.cpp
    gcc -E -D_WINDOWS_ $(SDIR)ifileIO3.cpp -o ifileIO3.s
    w

ifileIO3.o: $(SDIR)ifileIO3.s
    as $(SDIR)ifileIO3.s -o ifileIO3.o

wfileIO3.a: $(SDIR)wfileIO3.c
    gcc -S -O -Wall -DWINDOWS -o wfileIO3.a $(SDIR)wfileIO3.c

wfileIO3.s: wfileIO3.a c.sed
    sed -f c.sed <wfileIO3.a >wfileIO3.s

wfileIO3.o: wfileIO3.s
    as wfileIO3.s -o wfileIO3.o

_startup2.s: ifileIO3.s wfileIO3.s
    cp ifileIO3.s _startup2.s
    type wfileIO3.s >> _startup2.s

_startup2.o: _startup2.s
    as _startup2.s -o _startup2.o
