/contrib/one-true-awk/makefile

https://bitbucket.org/freebsd/freebsd-head/ · Makefile · 86 lines · 47 code · 16 blank · 23 comment · 0 complexity · 6b33553083e46a86738a626dd3c558ea MD5 · raw file

  1. # /****************************************************************
  2. # Copyright (C) Lucent Technologies 1997
  3. # All Rights Reserved
  4. #
  5. # Permission to use, copy, modify, and distribute this software and
  6. # its documentation for any purpose and without fee is hereby
  7. # granted, provided that the above copyright notice appear in all
  8. # copies and that both that the copyright notice and this
  9. # permission notice and warranty disclaimer appear in supporting
  10. # documentation, and that the name Lucent Technologies or any of
  11. # its entities not be used in advertising or publicity pertaining
  12. # to distribution of the software without specific, written prior
  13. # permission.
  14. #
  15. # LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  16. # INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
  17. # IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
  18. # SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  19. # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
  20. # IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  21. # ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
  22. # THIS SOFTWARE.
  23. # ****************************************************************/
  24. CFLAGS = -g
  25. CFLAGS = -O2
  26. CFLAGS =
  27. CC = gcc -Wall -g
  28. CC = cc
  29. CC = gcc -Wall -g -Wwrite-strings
  30. CC = gcc -fprofile-arcs -ftest-coverage # then gcov f1.c; cat f1.c.gcov
  31. CC = gcc -O4 -Wall -pedantic -fno-strict-aliasing
  32. YACC = bison -y
  33. YACC = yacc
  34. YFLAGS = -d
  35. OFILES = b.o main.o parse.o proctab.o tran.o lib.o run.o lex.o
  36. SOURCE = awk.h ytab.c ytab.h proto.h awkgram.y lex.c b.c main.c \
  37. maketab.c parse.c lib.c run.c tran.c proctab.c
  38. LISTING = awk.h proto.h awkgram.y lex.c b.c main.c maketab.c parse.c \
  39. lib.c run.c tran.c
  40. SHIP = README FIXES $(SOURCE) ytab[ch].bak makefile \
  41. awk.1
  42. a.out: ytab.o $(OFILES)
  43. $(CC) $(CFLAGS) ytab.o $(OFILES) $(ALLOC) -lm
  44. $(OFILES): awk.h ytab.h proto.h
  45. ytab.o: awk.h proto.h awkgram.y
  46. $(YACC) $(YFLAGS) awkgram.y
  47. mv y.tab.c ytab.c
  48. mv y.tab.h ytab.h
  49. $(CC) $(CFLAGS) -c ytab.c
  50. proctab.c: maketab
  51. ./maketab >proctab.c
  52. maketab: ytab.h maketab.c
  53. $(CC) $(CFLAGS) maketab.c -o maketab
  54. bundle:
  55. @cp ytab.h ytabh.bak
  56. @cp ytab.c ytabc.bak
  57. @bundle $(SHIP)
  58. tar:
  59. @cp ytab.h ytabh.bak
  60. @cp ytab.c ytabc.bak
  61. @bundle $(SHIP) >awk.shar
  62. @tar cf awk.tar $(SHIP)
  63. gzip awk.tar
  64. ls -l awk.tar.gz
  65. @zip awk.zip $(SHIP)
  66. ls -l awk.zip
  67. names:
  68. @echo $(LISTING)
  69. clean:
  70. rm -f a.out *.o *.obj maketab maketab.exe *.bb *.bbg *.da *.gcov *.gcno *.gcda # proctab.c