Makefile 849 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. TESTDIR=../
  2. include $(TESTDIR)/Rules.mak
  3. TARGETS=hello_source hello hello_glibc
  4. all: $(TARGETS)
  5. hello_source:
  6. -@ rm -f $(TARGETS)
  7. -@ echo "-------"
  8. -@ echo "hello.c source: "
  9. -@ echo " "
  10. -@ cat hello.c
  11. -@ echo " "
  12. hello: hello.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(TESTCC)
  13. -@ echo "-------"
  14. -@ echo " "
  15. -@ echo "Compiling vs uClibc: "
  16. -@ echo " "
  17. $(TESTCC) $(CFLAGS) -c $< -o $@.o
  18. $(TESTCC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  19. $(STRIPTOOL) -x -R .note -R .comment $@
  20. -ldd $@
  21. ls $(LSFLAGS) $@
  22. -./$@
  23. -@ echo " "
  24. hello_glibc: hello.c Makefile
  25. -@ echo "-------"
  26. -@ echo " "
  27. -@ echo "Compiling vs GNU libc: "
  28. -@ echo " "
  29. $(CC) $(CFLAGS) -c $< -o $@.o
  30. $(CC) $(LDFLAGS) $@.o -o $@
  31. $(STRIPTOOL) -x -R .note -R .comment $@
  32. -ldd $@
  33. ls $(LSFLAGS) $@
  34. -./$@
  35. -@ echo " "
  36. clean:
  37. rm -f *.[oa] *~ core $(TARGETS)