Makefile 552 B

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