home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / perl502b.zip / ext / DPI / Sample / Make.os21 < prev    next >
Text File  |  1994-02-09  |  3KB  |  77 lines

  1. #---------------------------------------------------------------------
  2. #
  3. # Makefile for dpisample  - including the DPI 2.0 API
  4. # Tailored for OS/2 2.1 with C-Set++ Compiler
  5. #
  6. # $Id$
  7. #
  8. # $Log$
  9. #
  10. #---------------------------------------------------------------------
  11.  
  12. CC            = icc     # name of compiler
  13. O             = obj     # file extension for object files
  14. E             = .exe    # file extension for executeable files
  15. C_FLAG        = -c+     # compile only flag
  16. O_FLAG        = -Fe     # output filename flag (for executable)
  17. INCLUDES      = -I. $(SYS_INCLUDES)
  18. CFLAGS        = $(INCLUDES) $(SYS_CFLAGS) $D
  19.  
  20. # C-Set++ Compiler flags and their meaning (only those used here)
  21. # -Sa    ANSI C Conformance
  22. # -Q-    Display logo (default)
  23. # -Q+    Do not display logo
  24. # -Kb-   Suppress basic diagnostic messages (default)
  25. # -Kb+   Produce basic diagnostic messages 
  26. # -J-    Set unspecified char variables to signed char
  27. # -J+    Set unspecified char variables to unsigned char (default)
  28. # -Sr-   Use new Style Rules for type conversion (default)
  29. # -Sr+   Use old Style Rules for type conversion (not ANSI conformant)
  30. # -T-    Do not generate debugger information (default)
  31. # -T+    Generate debugger information 
  32. # -W1    Produce error messages, no warnings
  33.  
  34. SYS_CFLAGS    = -Sa -W1 -Q+ -Kb+ -J- -DCONST
  35. SYS_LFLAGS    = -Sa -Q+ -B/stack:16000/CO   # no linker logo, 16K stack
  36.  
  37. # TCP/IP 2.0 for OS/2 needs these socket libraries
  38. # We assume they are included in the LIB search order
  39. # Depending on your code, you may not need them.
  40. SOCK_LIBS     =  so32dll.lib tcp32dll.lib
  41.  
  42. # TCP/IP 2.0 for OS/2 needs following extra compile flag(s) for sockets
  43. # -DOS2          - will cause BSD_SELECT methods and OS/2 soclose(..)
  44. #                  and psoc_errno() and all other OS/2 specific socket
  45. #                  related differences from standard BSD 4.3 sockets
  46. # -DOS2_SELECT   - will cause OS2_SELECT methods instead of BSD_SELCT
  47. SOCK_FLAGS    = -DOS2_SELECT -DOS2
  48.  
  49. INCLUDES       = -I. $(SYS_INCLUDES)
  50. CFLAGS         = $(INCLUDES) $(SYS_CFLAGS) $D
  51.  
  52. DPISAMPLE_OBJS = dpi_sample.$O 
  53. DPIAPI_OBJS    = snmp_mDPI.$O snmp_lDPI.$O snmp_qDPI.$O
  54.  
  55. .c.obj:                 
  56.     $(CC) $(CFLAGS) $(C_FLAG) $*.c
  57.  
  58. all: dpisample$E
  59.  
  60. dpisample$(E): $(DPISAMPLE_OBJS) $(DPIAPI_OBJS)
  61.     $(CC) $(SYS_LFLAGS) $(O_FLAG) $@ $(DPISAMPLE_OBJS) \
  62.               $(DPIAPI_OBJS) $(SOCK_LIBS)
  63.  
  64. dpi_sample.$O: dpi_sample.c snmp_dpi.h
  65.     $(CC) $(CFLAGS) $(C_FLAG) $*.c
  66.  
  67. snmp_lDPI.$O: snmp_lDPI.c  snmp_dpi.h   snmp_lDPI.h
  68.     $(CC) -DDPI_DEBUG $(CFLAGS) $(C_FLAG) $(SOCK_FLAGS) $*.c
  69.  
  70. snmp_mDPI.$O: snmp_mDPI.c  snmp_dpi.h   snmp_lDPI.h dpi_version.h
  71.     $(CC) -DDPI_DEBUG $(CFLAGS) $(C_FLAG) $*.c
  72.  
  73. snmp_qDPI.$O: snmp_qDPI.c  snmp_dpi.h   snmp_lDPI.h
  74.     $(CC) -DDPI_DEBUG $(CFLAGS) $(C_FLAG) $*.c
  75.  
  76. # end of Make.dpi20api
  77.