home *** CD-ROM | disk | FTP | other *** search
/ PC Extra Super CD 1998 January / PCPLUS131.iso / DJGPP / V2MISC / CSDPMI3S.ZIP / SRC / CWSDPMI / MAKEFILE < prev    next >
Encoding:
Text File  |  1996-08-18  |  2.0 KB  |  99 lines

  1. #.SUFFIXES: .obj .c .asm
  2.  
  3. # To build the ring 0 version (no paging): make -DRING=0
  4. !if !$d(RING)
  5. RING = 3
  6. IMAGE = cwsdpmi.exe
  7. !else
  8. IMAGE = cwsdpr$(RING).exe
  9. !endif
  10.  
  11. AFLAGS = /mx /t /drun_ring=$(RING) /dI31PROT
  12. CFLAGS = -ms -G- -O -Z -a -1 -f- -d -w5 -g12 -Drun_ring=$(RING) -DI31PROT
  13.  
  14. CC=tcc
  15. ASM=tasm
  16.  
  17. .c.obj:
  18.     $(CC) $(CFLAGS) -c $*.c
  19.  
  20. .c.s:
  21.     $(CC) $(CFLAGS) -S $*.c
  22.  
  23. .asm.obj:
  24.     $(ASM) $(AFLAGS) $*;
  25.  
  26. OBJ1 =\
  27.     start.obj\
  28.     control.obj\
  29.     dalloc.obj\
  30.     doutils.obj\
  31.     dpmisim.obj\
  32.     exphdlr.obj\
  33.     mswitch.obj\
  34.     paging.obj
  35. OBJ2 =\
  36.     tables.obj\
  37.     utils.obj\
  38.     unload.obj\
  39.     valloc.obj\
  40.     xms.obj\
  41.     vcpi.obj
  42.  
  43. all : $(IMAGE)
  44.  
  45. $(IMAGE) : $(RING).rng $(OBJ1) $(OBJ2) ehdrfix.exe cwsparam.exe
  46.     echo $(OBJ1)+ > cws.lnk
  47.     echo $(OBJ2),$*.exe,$*.map >> cws.lnk
  48.     tlink /3 /s /c /m @cws.lnk
  49.     del cws.lnk
  50.     ./ehdrfix $*.exe
  51.     ./cwsparam -v $*.exe
  52.  
  53. ehdrfix.exe : ehdrfix.c
  54.     $(CC) $(CFLAGS) -e$*.exe ehdrfix.c
  55.     del ehdrfix.obj
  56.  
  57. cwsparam.exe : cwsparm.c control.h gotypes.h
  58.     $(CC) $(CFLAGS) -e$*.exe cwsparm.c
  59.     del cwsparm.obj
  60.  
  61. $(RING).rng : makefile
  62.     del *.rng
  63.     del *.obj
  64.     echo $(RING) > $(RING).rng
  65.  
  66. clean :
  67.     del *.obj
  68.     del *.map
  69.     del *.exe
  70.     del *.rng
  71.  
  72. # DEPENDENCIES
  73.  
  74. control.obj : gotypes.h gdt.h idt.h tss.h valloc.h utils.h vcpi.h paging.h exphdlr.h dalloc.h mswitch.h xms.h control.h
  75.  
  76. dalloc.obj : gotypes.h valloc.h dalloc.h control.h
  77.  
  78. doutils.obj : segdefs.inc gdt.inc 
  79.  
  80. dpmisim.obj : segdefs.inc tss.inc gdt.inc 
  81.  
  82. exphdlr.obj : gotypes.h gdt.h idt.h tss.h utils.h paging.h vcpi.h dpmisim.h dalloc.h valloc.h control.h 
  83.  
  84. mswitch.obj : segdefs.inc tss.inc gdt.inc vcpi.inc
  85.  
  86. paging.obj : gotypes.h paging.h tss.h idt.h gdt.h valloc.h dalloc.h utils.h vcpi.h exphdlr.h control.h
  87.  
  88. tables.obj : segdefs.inc tss.inc gdt.inc 
  89.  
  90. utils.obj : gotypes.h tss.h gdt.h utils.h mswitch.h exphdlr.h
  91.  
  92. unload.obj : segdefs.inc
  93.  
  94. valloc.obj : gotypes.h valloc.h xms.h vcpi.h paging.h control.h mswitch.h
  95.  
  96. xms.obj : segdefs.inc
  97.  
  98. vcpi.obj : segdefs.inc vcpi.inc
  99.