home *** CD-ROM | disk | FTP | other *** search
- #.SUFFIXES: .obj .c .asm
-
- # To build the ring 0 version (no paging): make -DRING=0
- !if !$d(RING)
- RING = 3
- IMAGE = cwsdpmi.exe
- !else
- IMAGE = cwsdpr$(RING).exe
- !endif
-
- AFLAGS = /mx /t /drun_ring=$(RING) /dI31PROT
- CFLAGS = -ms -G- -O -Z -a -1 -f- -d -w5 -g12 -Drun_ring=$(RING) -DI31PROT
-
- CC=tcc
- ASM=tasm
-
- .c.obj:
- $(CC) $(CFLAGS) -c $*.c
-
- .c.s:
- $(CC) $(CFLAGS) -S $*.c
-
- .asm.obj:
- $(ASM) $(AFLAGS) $*;
-
- OBJ1 =\
- start.obj\
- control.obj\
- dalloc.obj\
- doutils.obj\
- dpmisim.obj\
- exphdlr.obj\
- mswitch.obj\
- paging.obj
- OBJ2 =\
- tables.obj\
- utils.obj\
- unload.obj\
- valloc.obj\
- xms.obj\
- vcpi.obj
-
- all : $(IMAGE)
-
- $(IMAGE) : $(RING).rng $(OBJ1) $(OBJ2) ehdrfix.exe cwsparam.exe
- echo $(OBJ1)+ > cws.lnk
- echo $(OBJ2),$*.exe,$*.map >> cws.lnk
- tlink /3 /s /c /m @cws.lnk
- del cws.lnk
- ./ehdrfix $*.exe
- ./cwsparam -v $*.exe
-
- ehdrfix.exe : ehdrfix.c
- $(CC) $(CFLAGS) -e$*.exe ehdrfix.c
- del ehdrfix.obj
-
- cwsparam.exe : cwsparm.c control.h gotypes.h
- $(CC) $(CFLAGS) -e$*.exe cwsparm.c
- del cwsparm.obj
-
- $(RING).rng : makefile
- del *.rng
- del *.obj
- echo $(RING) > $(RING).rng
-
- clean :
- del *.obj
- del *.map
- del *.exe
- del *.rng
-
- # DEPENDENCIES
-
- 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
-
- dalloc.obj : gotypes.h valloc.h dalloc.h control.h
-
- doutils.obj : segdefs.inc gdt.inc
-
- dpmisim.obj : segdefs.inc tss.inc gdt.inc
-
- exphdlr.obj : gotypes.h gdt.h idt.h tss.h utils.h paging.h vcpi.h dpmisim.h dalloc.h valloc.h control.h
-
- mswitch.obj : segdefs.inc tss.inc gdt.inc vcpi.inc
-
- paging.obj : gotypes.h paging.h tss.h idt.h gdt.h valloc.h dalloc.h utils.h vcpi.h exphdlr.h control.h
-
- tables.obj : segdefs.inc tss.inc gdt.inc
-
- utils.obj : gotypes.h tss.h gdt.h utils.h mswitch.h exphdlr.h
-
- unload.obj : segdefs.inc
-
- valloc.obj : gotypes.h valloc.h xms.h vcpi.h paging.h control.h mswitch.h
-
- xms.obj : segdefs.inc
-
- vcpi.obj : segdefs.inc vcpi.inc
-