Makefile 480 B

12345678910111213141516171819202122232425262728293031
  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. GCCHEAD=\
  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. GCCTAIL=\
  22. ../target/debug/libc.a \
  23. ../openlibm/libopenlibm.a
  24. %: %.c
  25. gcc -fno-stack-protector $(GCCHEAD) $< $(GCCTAIL) -o $@