home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l440 / 2.ddi / CHAP5 / MAKEFILE < prev    next >
Encoding:
Text File  |  1990-09-26  |  1.9 KB  |  71 lines

  1. # NMAKE makefile for generic TSR
  2. # example: C:\UNDOC>nmake tsrfile.exe
  3.  
  4. # can be overriden from environment with NMAKE /E
  5. # example:
  6. #   C:\UNDOC>set swap=1
  7. #   C:\UNDOC>nmake /e tsrfile.exe
  8. #
  9. #   C:\UNDOC>set no_disk=1
  10. #   C:\UNDOC>nmake /e tsrmem.exe
  11. SWAP = 0
  12. NO_DISK = 0
  13.  
  14. !IF $(SWAP)
  15. DOSSWAP = -DDOS_SWAP
  16. DOSSWAP_O = dosswap.obj
  17. !ENDIF
  18.  
  19. !IF $(NO_DISK)
  20. USES_DISK = 
  21. !ELSE
  22. USES_DISK = -DUSES_DISK
  23. !ENDIF
  24.  
  25. # defines the key components of the generic TSR:
  26. #   TSREXAMP.C - main
  27. #   INDOS.C - InDOS, critical error flag
  28. #   PSP.C - Set PSP, Get PSP
  29. #   EXTERR.C - Extended error save and restore
  30. #   TSRUTIL.ASM - Miscellaneous routines
  31. #   STACK.ASM - Stack save and restore 
  32. #   DOSSWAP.C - Optional use of DOS Swappable Data Area (SDA)
  33. UNDOC_OBJS = indos.obj psp.obj exterr.obj
  34.  
  35. TSR_OBJS = tsrexamp.obj $(UNDOC_OBJS) $(DOSSWAP_O) \
  36.     tsrutil.obj stack.obj
  37.  
  38. # command to turn a .C file into an .OBJ file
  39. .c.obj:
  40.     cl -AS -Ox -Zp -c -W3 -DTSR $(USES_DISK) $(DOSSWAP) $*.c
  41.  
  42. # command to turn an .ASM file into an .OBJ file
  43. .asm.obj:
  44.     masm -ml $*.asm;
  45.  
  46. # special handling for MULTUTIL.ASM
  47. multutil.obj:  tsrutil.asm
  48.     masm -ml -DMULTI tsrutil,multutil;
  49.  
  50. multstk.obj:  stack.asm
  51.     masm -ml -DMULTI stack,multstk;
  52.  
  53. # make the file-browser sample TSR
  54. tsrfile.exe:  $(TSR_OBJS) file.obj 
  55.     link /far/noi $(TSR_OBJS) file,tsrfile.exe;
  56.  
  57. # make the MCB-walker sample TSR
  58. tsrmem.exe:  $(TSR_OBJS) mem.obj put.obj
  59.     link /far/noi $(TSR_OBJS) mem put,tsrmem.exe;
  60.  
  61. # make the INT 2Eh command-interpreter sample TSR
  62. INT2E_OBJS = test2e.obj send2e.obj have2e.obj do2e.obj
  63. INT2E = test2e send2e have2e do2e
  64.  
  65. tsr2e.exe: $(TSR_OBJS) $(INT2E_OBJS) put.obj
  66.     link /far/noi $(TSR_OBJS) $(INT2E) put,tsr2e;
  67.  
  68. # make the non-pop-up PRINT add-on
  69. multi.exe: multi.obj $(UNDOC_OBJS) multutil.obj multstk.obj
  70.     link /far/noi multi $(UNDOC_OBJS) multutil multstk,multi;
  71.