home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast.iso / pcmag / vol12n13.zip / FIND.ZIP / FINSRC.ZIP / MAKELIB.MSC < prev   
Text File  |  1993-05-02  |  3KB  |  89 lines

  1. #==========================================================
  2. # Makefile for Win DLLs under Microsoft C 6.0
  3. # Copyright (c) 1993 Douglas Boling
  4. #==========================================================
  5. #----------------------------------------------------------
  6. # Target filename
  7. #----------------------------------------------------------
  8. NAME = find
  9.  
  10. #----------------------------------------------------------
  11. # Define DEBUG = 1 to add debug info to EXE
  12. #----------------------------------------------------------
  13. DEBUG = 0
  14.  
  15. #----------------------------------------------------------
  16. # Define MYWIN31 = 1 for Windows 3.1 apps
  17. #----------------------------------------------------------
  18. MYWIN31 = 1
  19.  
  20. #----------------------------------------------------------
  21. # C compiler switches
  22. #
  23. # -c    Compile, no link
  24. # -ASw     Small model, SS != DS
  25. # -Gsw     No Stack check, Compile for Windows
  26. # -Ow   Optimize. Assume no aliases
  27. # -W3   Print warnings to level 3
  28. # -G2   Enable 286 opcodes (for Win 3.1)
  29. # -Zp   Pack Structures or...
  30. # -Zpi  If Debug info needed
  31. # -Od   Disable Optimization
  32. #----------------------------------------------------------
  33. !if $(DEBUG)
  34. CSWITCH = -c -ASw -Gsw -Ow -W3 -Zpi -Od
  35. !else
  36. CSWITCH = -c -ASw -Gsw -Ow -W3 -Zp
  37. !endif
  38.  
  39. !if $(MYWIN31)
  40. CSWITCH = $(CSWITCH) -G2
  41. !endif
  42.  
  43. #----------------------------------------------------------
  44. # Link Switches
  45. #
  46. # /Align:16  Align segments on 16 byte boundries 
  47. # /CO        If debug info needed
  48. #----------------------------------------------------------
  49. !if $(DEBUG)
  50. LSWITCH = /CO /align:16
  51. !else
  52. LSWITCH = /align:16
  53. !endif
  54.  
  55. #----------------------------------------------------------
  56. # Lib files
  57. #
  58. # /nod     No defaults
  59. # sdllcew  Small model lib for Windows DLLs
  60. # libw     Windows API lib
  61. # commdlg  (not used) Windows Common Dialog Box lib
  62. # mmsystem (not used) Windows multimedia lib
  63. #----------------------------------------------------------
  64. LIBS = /nod sdllcew libw 
  65.  
  66. #----------------------------------------------------------
  67. # Resource Compiler switches
  68. # 30   Require at least Win 3.0
  69. # 31   Require at least Win 3.1
  70. #----------------------------------------------------------
  71. !if $(MYWIN31)
  72. RCSWITCH = -31
  73. !else
  74. RCSWITCH = -30
  75. !endif
  76.  
  77. #----------------------------------------------------------
  78. # Make DLL
  79. #----------------------------------------------------------
  80. $(NAME).dll : $(NAME).obj $(NAME).def $(NAME).res
  81.     link $(LSWITCH) $(NAME) libentry, $(NAME).dll, NUL, $(LIBS), $(NAME)
  82.     rc $(RCSWITCH) $(NAME).res $(NAME).dll
  83.  
  84. $(NAME).obj : $(NAME).c $(NAME).h
  85.     cl $(CSWITCH) $(NAME).c
  86.  
  87. $(NAME).res : $(NAME).rc $(NAME).h $(NAME).ico
  88.     rc -r $(NAME).rc
  89.