Makefile 603 B

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