Makefile 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. # Makefile for GNU binary-file utilities
  2. # select a set of CFLAGS and PROGS, below, depending on the system type
  3. GNUCC = gcc -O
  4. # for BSD systems
  5. CFLAGS = -g
  6. # Don't add robotussin; it won't compile on BSD or GNU systems.
  7. # objdump also won't compile on most systems (trouble with N_DATADDR).
  8. PROGS = gprof ld size nm strip ar ranlib
  9. # for USG systems using COFF_ENCAPSULATE
  10. # also, you will want to make the target libc.a (but it takes a long time)
  11. # Note that you should leave a copy of `ar' in this directory
  12. # after you install it, since `ranlib' will try to run it from here.
  13. #CFLAGS = -g -DUSG -DCOFF_ENCAPSULATE -DPORTAR -DNON_NATIVE -Dnounderscore
  14. #PROGS = ld size nm strip ar robotussin objdump ranlib
  15. #LIBS = -lPW
  16. all: $(PROGS)
  17. ld: ld.o
  18. # LIBS is used here since ld needs to use alloca.
  19. # Alternatively, compile it with GNU C--then the compiler handles alloca.
  20. $(CC) -o ld ld.o $(LIBS)
  21. size: size.o
  22. $(CC) -o size size.o
  23. nm: nm.o
  24. $(CC) -o nm nm.o
  25. strip: strip.o
  26. $(CC) -o strip strip.o
  27. ar: ar.o
  28. $(CC) -o ar ar.o
  29. gprof: gprof.o
  30. $(GNUCC) -o gprof gprof.o
  31. gprof.o: gprof.c gmon.h
  32. $(GNUCC) -c $(CFLAGS) gprof.c
  33. ranlib: ranlib.o
  34. $(CC) -o ranlib ranlib.o
  35. ranlib.o: ranlib.c
  36. $(CC) -c -g -DAR_PROG=\"`pwd`/ar\" ranlib.c
  37. # Robotussin is NOT part of `all'.
  38. robotussin: robotussin.o
  39. $(CC) -o robotussin robotussin.o
  40. libc.a: robotussin libconvert
  41. libconvert
  42. rm -rf tmp
  43. clean:
  44. -rm -f *.o core
  45. -rm -f gprof ar nm size strip ld robotussin objdump ranlib
  46. dist:
  47. -rm -rf binutils
  48. mkdir binutils
  49. -ln * binutils
  50. (cd binutils; rm -f GNUmakefile *~ "#*" log* binutils.tar*; make clean)
  51. tar cof binutils.tar binutils
  52. compress < binutils.tar > binutils.tar.Z
  53. rm -rf binutils