Makefile 544 B

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