Makefile 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. # Makefile for uClibc
  2. #
  3. # Copyright (C) 2000,2001 Erik Andersen <andersen@uclibc.org>
  4. #
  5. # This program is free software; you can redistribute it and/or modify it under
  6. # the terms of the GNU Library General Public License as published by the Free
  7. # Software Foundation; either version 2 of the License, or (at your option) any
  8. # later version.
  9. #
  10. # This program is distributed in the hope that it will be useful, but WITHOUT
  11. # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  12. # FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more
  13. # details.
  14. #
  15. # You should have received a copy of the GNU Library General Public License
  16. # along with this program; if not, write to the Free Software Foundation, Inc.,
  17. # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  18. TESTDIR=../
  19. include $(TESTDIR)/Rules.mak
  20. CFLAGS+=--uclibc-ctors
  21. all: dltest2 dltest libhowdy.so run
  22. all: dlttest dlttest2 dltest2 dltest libhowdy.so run
  23. dlttest.o: dlttest.c
  24. $(CC) $(CFLAGS) -c dlttest.c -o dlttest.o
  25. dlttest2.o: dlttest.c
  26. $(CC) $(CFLAGS) -DFORCE -c dlttest.c -o dlttest2.o
  27. dltest2: dltest2.c
  28. $(CC) $(CFLAGS) dltest2.c -o dltest2 -ldl
  29. ./dltest2
  30. dltest.o: dltest.c
  31. $(CC) $(CFLAGS) -c dltest.c -o dltest.o
  32. howdy.o: howdy.c
  33. $(CC) $(CFLAGS) -fPIC -c howdy.c -o howdy.o
  34. libhowdy.so: howdy.o
  35. $(CC) $(CFLAGS) -shared -o libhowdy.so -Wl,-soname,libhowdy.so howdy.o
  36. dltest: dltest.o
  37. $(CC) $(CFLAGS) -o dltest dltest.o -ldl
  38. dlttest: dlttest.o
  39. $(CC) $(CFLAGS) -o dlttest dlttest.o -ldl -lpthread
  40. dlttest2: dlttest2.o
  41. $(CC) $(CFLAGS) -o dlttest2 dlttest2.o -ldl -lpthread
  42. run: dltest dlttest dlttest2 libhowdy.so
  43. @echo Running dltest
  44. ./dltest
  45. @echo Running dlttest
  46. ./dlttest
  47. @echo Running dlttest2
  48. ./dlttest2
  49. clean:
  50. rm -f *.o *.so dltest2 dltest core libhowdy.so