Makefile 461 B

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