Makefile 795 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. .POSIX:
  2. .SUFFIXES: .h .d
  3. include config.mk
  4. TESTOBJS=main.o \
  5. assert.o \
  6. complex.o \
  7. ctype.o \
  8. errno.o \
  9. fenv.o \
  10. float.o \
  11. inttypes.o \
  12. iso646.o \
  13. limits.o \
  14. locale.o \
  15. math.o \
  16. setjmp.o \
  17. signal.o \
  18. stdalign.o \
  19. stdarg.o \
  20. stdatomic.o \
  21. stdbool.o \
  22. stddef.o \
  23. stdint.o \
  24. stdio.o \
  25. stdlib.o \
  26. stdnoreturn.o \
  27. string.o \
  28. tgmath.o \
  29. threads.o \
  30. time.o \
  31. uchar.o \
  32. wchar.o \
  33. wctype.o \
  34. test.o
  35. testlibc: $(TESTOBJS)
  36. $(CC) -o $@ $(TESTOBJS) $(LDFLAGS)
  37. $(TESTOBJS): test.h
  38. float.o: _float.h
  39. math.o: _math.h
  40. stdalign.o: _stdalign.h
  41. stdio.o: _stdio.h
  42. stdnoreturn.o: _stdnoreturn.h
  43. wchar.o: _wchar.h
  44. wctype.o: _wctype.h
  45. test.o: test.h
  46. main.o: test.h
  47. .d.h:
  48. awk '{printf("#ifndef %s\n#error %s not defined\n#endif\n", $$0, $$0);}' $< > $@
  49. clean:
  50. rm -f *.o testlibc