Makefile 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. TESTDIR=../
  2. include $(TESTDIR)/Rules.mak
  3. TARGETS=test_pwd test_pwd_glibc
  4. TARGETS+=test_grp test_grp_glibc
  5. TARGETS+=test_pwd_diff test_grp_diff
  6. all: $(TARGETS)
  7. test_pwd: test_pwd.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(CC)
  8. -@ echo "-------"
  9. -@ echo " "
  10. -@ echo "Compiling vs uClibc: "
  11. -@ echo " "
  12. $(CC) $(CFLAGS) -c $< -o $@.o
  13. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  14. $(STRIPTOOL) -x -R .note -R .comment $@
  15. -./$@ 2>&1 >test_pwd.out
  16. -@ echo " "
  17. test_pwd_glibc: test_pwd.c Makefile
  18. -@ echo "-------"
  19. -@ echo " "
  20. -@ echo "Compiling vs GNU libc: "
  21. -@ echo " "
  22. $(HOST_CC) $(GLIBC_CFLAGS) -c $< -o $@.o
  23. $(HOST_CC) $(GLIBC_LDFLAGS) $@.o -o $@
  24. $(STRIPTOOL) -x -R .note -R .comment $@
  25. -./$@ 2>&1 >test_pwd_glibc.out
  26. -@ echo " "
  27. test_grp: test_grp.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(CC)
  28. -@ echo "-------"
  29. -@ echo " "
  30. -@ echo "Compiling vs uClibc: "
  31. -@ echo " "
  32. $(CC) $(CFLAGS) -c $< -o $@.o
  33. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  34. $(STRIPTOOL) -x -R .note -R .comment $@
  35. -./$@ 2>&1 >test_grp.out
  36. -@ echo " "
  37. test_grp_glibc: test_grp.c Makefile
  38. -@ echo "-------"
  39. -@ echo " "
  40. -@ echo "Compiling vs GNU libc: "
  41. -@ echo " "
  42. $(HOST_CC) $(GLIBC_CFLAGS) -c $< -o $@.o
  43. $(HOST_CC) $(GLIBC_LDFLAGS) $@.o -o $@
  44. $(STRIPTOOL) -x -R .note -R .comment $@
  45. -./$@ 2>&1 >test_grp_glibc.out
  46. -@ echo " "
  47. test_pwd_diff: test_pwd_glibc test_pwd
  48. -@ echo "-------"
  49. -@ echo " "
  50. -@ echo "Diffing output: "
  51. -@ echo " "
  52. -diff -u test_pwd_glibc.out test_pwd.out
  53. -@ echo " "
  54. test_grp_diff: test_grp_glibc test_grp
  55. -@ echo "-------"
  56. -@ echo " "
  57. -@ echo "Diffing output: "
  58. -@ echo " "
  59. -diff -u test_grp_glibc.out test_grp.out
  60. -@ echo " "
  61. clean:
  62. rm -f *.[oa] *~ core $(TARGETS) *.out