Makefile 522 B

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