home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / perl502b.zip / ext / DPI / DPID20 / Makefile next >
Makefile  |  1995-10-11  |  4KB  |  92 lines

  1. #/*********************************************************************/
  2. #/*                                                                   */
  3. #/* DPI-SMUX     - DPI 2.0 to SMUX converter                          */
  4. #/*                                                                   */
  5. #/* Sep 26, 1995 - Version 0.02                                       */
  6. #/*                                                                   */
  7. #/* Copyright    - (C) International Business Machines Corp. 1994     */
  8. #/*                                                                   */
  9. #/*   Permission to use, copy, modify, and distribute this software   */
  10. #/*   and its documentation for any lawful purpose and without fee is */
  11. #/*   hereby granted, provided that this notice be retained unaltered,*/
  12. #/*   and that the names of IBM and all other contributors shall not  */
  13. #/*   be used in advertising or publicity pertaining to distribution  */
  14. #/*   of the software without specific written prior permission.      */
  15. #/*   No contributor makes any representations about the suitability  */
  16. #/*   of this software for any purpose.  It is provided "as is"       */
  17. #/*   without express or implied warranty.                            */
  18. #/*                                                                   */
  19. #/*   IBM AND ALL OTHER CONTRIBUTORS DISCLAIM ALL WARRANTIES WITH     */
  20. #/*   REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF    */
  21. #/*   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, TITLE,    */
  22. #/*   AND NON-INFRINGEMENT.                                           */
  23. #/*                                                                   */
  24. #/*   IN NO EVENT SHALL IBM OR ANY OTHER CONTRIBUTOR BE LIABLE FOR    */
  25. #/*   ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES, WHETHER IN      */
  26. #/*   CONTRACT, TORT, OR OTHER FORM OF ACTION, ARISING OUT OF OR IN   */
  27. #/*   CONNECTION WITH, THE USE OR PERFORMANCE OF THIS SOFTWARE.       */
  28. #/*                                                                   */
  29. #/*********************************************************************/
  30.  
  31. # This is a Makefile to create the DPI daemon.
  32. # This daemon is a sample program that demonstrates
  33. # what is required to implement the IBM SNMP DPI in
  34. # an SNMP agent.  It can be used to permit existing DPI (version 2)
  35. # clients to be used with the ISODE SNMP agent. Not All DPI functionality
  36. # is supported though.
  37. #
  38. # The structure of the program is loosely based on the
  39. # "unixd.c" sample that is provided with the ISODE SNMP
  40. # agent source.
  41.  
  42. # Below, specify the real path names for the two indicated
  43. # libraries that are generated after doing the ISODE port.
  44. ISODE_LIBS= -lsnmp -lisode -lbsd 
  45. DPI20LIB  = -ldpi20
  46. DPILIB    = libdpi20.a
  47. DPI_OBJS  = snmp_mDPI.o snmp_lDPI.o snmp_qDPI.o
  48.  
  49. # The following has to be modified so that the C compiler
  50. # can find the ISODE include files.  The -DAIX is an AIX 3.1
  51. # artifact, but shouldn't cause trouble in other environments.
  52. CFLAGS= -O -D_BSD -D_BSD_INCLUDES -DIBM_LIBSMUX -DSETSID -I. -I../dpi20api
  53.  
  54. # The object files we need...  The first two are the source
  55. # to the daemon, the last is the SNMP DPI API library.
  56. # Nothing should have to be modified here.
  57. OBJS=dpid2.o register2.o
  58.  
  59. S=/usr/lpp/snmpd
  60.  
  61. all: dpid2
  62.  
  63. #dpid2:    dpid.defs $(OBJS)
  64. dpid2:    $(OBJS) $(DPI20LIB) 
  65.     cc -o $@ $(OBJS) $(ISODE_LIBS) -L. $(DPI20LIB)
  66.  
  67. dpisample: dpi_sample.o $(DPI20LIB)
  68.     cc -o $@ dpi_sample.o -L. $(DPI20LIB)
  69.  
  70. # defs to be appended to /etc/mib.defs
  71. dpid2.defs:    dpid2.my
  72.     /usr/sbin/mosy -s -o dpid2.defs $(S)/smi.my dpid2.my
  73.  
  74. $(DPI20LIB): $(DPI_OBJS)
  75.     ar cq $(DPILIB) $(DPI_OBJS); ranlib $(DPILIB)
  76.  
  77. dpi_sample.o: ../dpi20api/dpi_sample.c ../dpi20api/snmp_dpi.h
  78.     cc $(CFLAGS) -c ../dpi20api/dpi_sample.c
  79.  
  80. snmp_mDPI.o: ../dpi20api/snmp_mDPI.c ../dpi20api/snmp_dpi.h
  81.     cc $(CFLAGS) -c ../dpi20api/snmp_mDPI.c
  82.  
  83. snmp_lDPI.o: ../dpi20api/snmp_lDPI.c ../dpi20api/snmp_dpi.h ../dpi20api/snmp_lDPI.h
  84.     cc $(CFLAGS) -c ../dpi20api/snmp_lDPI.c
  85.  
  86. snmp_qDPI.o: ../dpi20api/snmp_qDPI.c ../dpi20api/snmp_dpi.h
  87.     cc $(CFLAGS) -c ../dpi20api/snmp_qDPI.c
  88.  
  89.  
  90. clean:
  91.     rm -rf *.o dpid2 *.defs dpisample libdpi20.a dpid2.log
  92.