home *** CD-ROM | disk | FTP | other *** search
/ The Hacker's Encyclopedia 1998 / hackers_encyclopedia.iso / hacking / unix / portmap.sha / Makefile < prev    next >
Encoding:
Makefile  |  2003-06-11  |  2.9 KB  |  101 lines

  1. # @(#) Makefile 1.2 92/07/06 19:53:28
  2.  
  3. ####################################
  4. ### Beginning of configurable stuff.
  5.  
  6. # By default, logfile entries are written to the same file as used for
  7. # sendmail transaction logs. Change the definition of the following macro
  8. # if you disagree. See `man 3 syslog' for examples. Some syslog versions
  9. # do not provide this flexibility.
  10. #
  11. FACILITY=LOG_MAIL
  12.  
  13. # To disable host access control, comment out the following macro definition.
  14. # Note: host access control requires the strtok() and strchr() routines.
  15. # Host access control can also be turned off by providing no access control
  16. # tables. The local system, since it runs the portmap daemon, is always
  17. # treated as an authorized host.
  18.  
  19. HOSTS_ACCESS= -DHOSTS_ACCESS
  20.  
  21. # Comment out if your RPC library does not allocate privileged ports for
  22. # requests from processes with root privilege, or the new portmap will
  23. # always reject requests to register/unregister services on privileged
  24. # ports. You can find out by running "rpcinfo -p"; if the mountd and NIS
  25. # daemons use a port >= 1024 you should probably disable the next line.
  26.  
  27. CHECK_PORT = -DCHECK_PORT
  28.  
  29. # Uncomment the following macro if your system does not have u_long.
  30. #
  31. # ULONG    =-Du_long="unsigned long"
  32.  
  33. # Later versions of the tcp wrapper (log_tcp package) come with a
  34. # libwrap.a object library. WRAP_DIR should specify the directory with
  35. # that library.
  36.  
  37. WRAP_DIR= ../log_tcp
  38.  
  39. # Auxiliary object files that may be missing from your C library.
  40. #
  41. AUX    = daemon.o strerror.o
  42.  
  43. # Uncomment the following macro definitions if you are running SYSV.4.
  44. #
  45. # CC    = /usr/ucb/cc
  46. # LIBS    = -lrpcsoc
  47. # SYS    = -DSYSV40
  48.  
  49. # Auxiliary libraries that you may have to specify
  50. #
  51. # LIBS    = -lrpc
  52.  
  53. ### End of configurable stuff.
  54. ##############################
  55.  
  56. SHELL    = /bin/sh
  57.  
  58. COPT    = -Dconst= -Dperror=xperror $(HOSTS_ACCESS) $(CHECK_PORT) \
  59.     $(SYS) -DFACILITY=$(FACILITY) $(ULONG)
  60. CFLAGS    = $(COPT) -O
  61. OBJECTS    = portmap.o pmap_check.o from_local.o $(AUX)
  62.  
  63. all:    portmap pmap_dump pmap_set
  64.  
  65. portmap: $(OBJECTS) $(WRAP_DIR)/libwrap.a
  66.     $(CC) $(CFLAGS) -o $@ $(OBJECTS) $(WRAP_DIR)/libwrap.a $(LIBS)
  67.  
  68. pmap_dump: pmap_dump.c
  69.     $(CC) $(CFLAGS) -o $@ $? $(LIBS)
  70.  
  71. pmap_set: pmap_set.c
  72.     $(CC) $(CFLAGS) -o $@ $? $(LIBS)
  73.  
  74. from_local: from_local.c
  75.     cc $(CFLAGS) -DTEST -o $@ from_local.c
  76.  
  77. lint:    
  78.     lint $(COPT) $(OBJECTS:%.o=%.c)
  79.  
  80. clean:
  81.     rm -f *.o portmap pmap_dump pmap_set from_local core
  82.  
  83. shar:
  84.     @shar README Makefile portmap.c daemon.c strerror.c diffs_wrt_bsd \
  85.     pmap_dump.c pmap_set.c from_local.c pmap_check.c pmap_check.h BLURB
  86.  
  87. diffs_wrt_bsd: portmap.c.bsd portmap.c daemon.c.bsd daemon.c
  88.     -(diff -c portmap.c.bsd portmap.c; diff -c daemon.c.bsd daemon.c) >$@
  89.  
  90. deps:
  91.     @$(CC) -M $(CFLAGS) *.c | grep -v /usr/include |sed 's/\.\///'
  92.  
  93. daemon.o: daemon.c
  94. from_local.o: from_local.c
  95. pmap_check.o: pmap_check.c pmap_check.h Makefile
  96. pmap_dump.o: pmap_dump.c
  97. pmap_set.o: pmap_set.c
  98. portmap.o: portmap.c
  99. portmap.o: pmap_check.h
  100. strerror.o: strerror.c
  101.