2
0

Makefile 595 B

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