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 $(CC)
  13. -@ echo "-------"
  14. -@ echo " "
  15. -@ echo "Compiling vs uClibc: "
  16. -@ echo " "
  17. $(CC) $(CFLAGS) -c $< -o $@.o
  18. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  19. $(STRIPTOOL) -x -R .note -R .comment $@
  20. -$(LDD) $@
  21. ls -l $@
  22. -./$@
  23. -@ echo " "
  24. hello_glibc: hello.c Makefile
  25. -@ echo "-------"
  26. -@ echo " "
  27. -@ echo "Compiling vs GNU libc: "
  28. -@ echo " "
  29. $(HOST_CC) $(GLIBC_CFLAGS) -c $< -o $@.o
  30. $(HOST_CC) $(GLIBC_LDFLAGS) $@.o -o $@
  31. $(STRIPTOOL) -x -R .note -R .comment $@
  32. -$(LDD) $@
  33. ls -l $@
  34. -./$@
  35. -@ echo " "
  36. clean:
  37. rm -f *.[oa] *~ core $(TARGETS)