Makefile 535 B

12345678910111213141516171819202122232425262728293031323334353637
  1. BINS=\
  2. alloc \
  3. brk \
  4. args \
  5. chdir \
  6. create \
  7. dup \
  8. fchdir \
  9. fsync \
  10. ftruncate \
  11. math \
  12. printf \
  13. write
  14. all: $(BINS)
  15. clean:
  16. rm -f $(BINS) *.out
  17. run: $(BINS)
  18. for bin in $(BINS); do echo "\\033[1m$${bin}\\033[0m"; ./$${bin} test args; done
  19. GCCHEAD=\
  20. -nostdinc \
  21. -nostdlib \
  22. -I ../include \
  23. -I ../target/include \
  24. -I ../openlibm/include \
  25. -I ../openlibm/src \
  26. ../target/debug/libcrt0.a
  27. GCCTAIL=\
  28. ../target/debug/libc.a \
  29. ../openlibm/libopenlibm.a
  30. %: %.c
  31. gcc -fno-stack-protector $(GCCHEAD) $< $(GCCTAIL) -o $@