Makefile 561 B

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