build 459 B

123456789101112131415161718
  1. #!/bin/sh
  2. set -e
  3. # If there's no bootstrap version, compile it
  4. if [ ! -f rtc.bootstrap ]; then
  5. echo "Building bootstrap compiler..."
  6. # Building bootstrap compiler
  7. as --32 -o rtc.bootstrap.o reset.bootstrap.S
  8. ld -melf_i386 -o rtc.bootstrap rtc.bootstrap.o
  9. fi
  10. echo "Building compiler..."
  11. ./rtc.bootstrap reset.rt
  12. mv output.S rtc.S
  13. as --32 $@ -o rtc.o rtc.S
  14. ld -melf_i386 -o rtc rtc.o
  15. echo "Compiler was built successfully!"