Makefile 426 B

12345678910111213141516171819202122232425262728
  1. BINS=\
  2. alloc \
  3. args \
  4. create \
  5. math \
  6. write
  7. all: $(BINS)
  8. clean:
  9. rm -f $(BINS) *.out
  10. run: $(BINS)
  11. for bin in $(BINS); do echo "\\033[1m$${bin}\\033[0m"; ./$${bin} test args; done
  12. %: %.c
  13. gcc \
  14. -nostdinc \
  15. -nostdlib \
  16. -I ../include \
  17. -I ../target/include \
  18. -I ../openlibm/include \
  19. -I ../openlibm/src \
  20. ../target/debug/libcrt0.a \
  21. $< \
  22. ../target/debug/libc.a \
  23. ../openlibm/libopenlibm.a \
  24. -o $@