home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / TELECOM / palias10.lzh / BNU / PALIAS / Makefile.unix < prev    next >
Makefile  |  1993-06-07  |  1KB  |  67 lines

  1. #!/bin/make -f
  2. # pathalias -- by steve bellovin, as told to peter honeyman
  3.  
  4. ### begin configuration section
  5. ###
  6. # if you can't or don't intend to use dbm files,
  7. # don't bother with DBM or makedb
  8. DBM = -ldbm
  9. # or if you roll your own ...
  10. # DBM = dbm.o
  11. ###
  12. # where is getopt (if not in the c library)?
  13. # GETOPT = getopt.o
  14. ###
  15. # internet domain name resolver library
  16. # enable RESOLVER in config.h
  17. RESOLVER = -lresolv
  18. ### end of configuration section 
  19.  
  20.  
  21. CC = cc
  22. CFLAGS = -O
  23. LDFLAGS = -s $(GETOPT) $(DBM) $(RESOLVER)
  24. YFLAGS = -d
  25.  
  26. OBJ = addlink.o addnode.o domain.o local.o main.o mapit.o mapaux.o mem.o parse.o printit.o
  27. HDRS = def.h config.h
  28. CSRC = addlink.c addnode.c domain.c local.c main.c mapit.c mapaux.c mem.c printit.c
  29. LSRC = $(CSRC) parse.c
  30. SRC = $(CSRC) parse.y makedb.c
  31.  
  32. pathalias: $(OBJ)
  33.     $(CC) $(OBJ) $(LDFLAGS) -o pathalias
  34.  
  35. all: pathalias makedb
  36.  
  37. $(OBJ):    $(HDRS)
  38.  
  39. parse.c: parse.y $(HDRS)
  40.     $(YACC) $(YFLAGS) parse.y
  41.     mv y.tab.c parse.c
  42.  
  43. makedb: makedb.o
  44.     $(CC) makedb.o $(LDFLAGS) $(DBM) -o makedb
  45.  
  46. makedb.o: config.h
  47.  
  48. clean:
  49.     rm -f *.o y.tab.? parse.c
  50.  
  51. clobber: clean
  52.     rm -f pathalias makedb
  53.  
  54. tags: $(SRC) $(HDRS)
  55.     ctags -w $(HDRS) $(SRC)
  56.  
  57. bundle:
  58.     @bundle README CHANGES pathalias.1 Makefile ${HDRS} ${SRC}
  59.  
  60. lint:    $(LSRC)
  61.     lint $(CFLAGS) $(LSRC)
  62.     lint makedb.c
  63.  
  64. install:
  65.     @echo "install pathalias, makedb, and pathalias.8"
  66.     @echo "according to local conventions"
  67.