[38699] | 1 | # Compiler flags:
|
---|
| 2 | # -q no banner
|
---|
| 3 | # -wx max warnings
|
---|
| 4 | # -0 generate 8086 code
|
---|
| 5 | # -ms force small model (default)
|
---|
| 6 | # -s remove runtime stack checks (required)
|
---|
| 7 | # -os optimize for size
|
---|
| 8 | # -zu assume that SS != DS (required)
|
---|
| 9 | # -ecc default to __cdecl calling convention (bad idea)
|
---|
| 10 | #
|
---|
[38700] | 11 | !ifdef __UNIX__
|
---|
[42127] | 12 | Q=\"
|
---|
[38700] | 13 | !else
|
---|
[42127] | 14 | Q="
|
---|
[38700] | 15 | !endif
|
---|
[60580] | 16 |
|
---|
| 17 | CPU = 386
|
---|
| 18 |
|
---|
[42127] | 19 | CFLAGS = -q -0 -wx -zu -s -oas -d1+ -ms
|
---|
[42332] | 20 | CFLAGS32 = -q -wx -zu -s -oas -d1+ -ms -nt=BIOS32 -nd=BIOS32
|
---|
[71426] | 21 | # -oat seems to prevent ENTER/LEAVE generation
|
---|
| 22 | #CFLAGS32 = -q -wx -zu -s -oat -d1+ -ms -nt=BIOS32 -nd=BIOS32
|
---|
[42127] | 23 |
|
---|
| 24 | DEFS = -DVBOX -DVBOX_LANBOOT_SEG=0xE200 -DVBOX_VERSION_STRING=$(Q)0.9$(Q) &
|
---|
[67115] | 25 | -DVBOX_WITH_SCSI -DVBOX_BIOS_CPU=80386
|
---|
[38699] | 26 |
|
---|
| 27 | AFLAGS = -q -0 -wx
|
---|
| 28 |
|
---|
[60580] | 29 | INCLS = -I$(Q)../../../../../include$(Q) -I$(Q) ../../BiosCommonCode$(Q)
|
---|
[38699] | 30 |
|
---|
[60580] | 31 | OBJS = bios.obj post.obj ata.obj floppy.obj floppyt.obj eltorito.obj &
|
---|
| 32 | boot.obj keyboard.obj disk.obj serial.obj system.obj invop.obj &
|
---|
| 33 | timepci.obj logo.obj ps2mouse.obj parallel.obj scsi.obj &
|
---|
| 34 | apm.obj apm_pm.obj pcibios.obj pciutil.obj vds.obj &
|
---|
| 35 | print.obj pcibio32.obj pci32.obj orgs.obj
|
---|
| 36 |
|
---|
| 37 | !if $(CPU) > 286
|
---|
| 38 | OBJS += ahci.obj
|
---|
| 39 | DEFS += -DVBOX_WITH_AHCI
|
---|
| 40 | !endif
|
---|
| 41 |
|
---|
[38699] | 42 | .c.obj : .autodepend
|
---|
[42258] | 43 | wcc -fo=.obj $(CFLAGS) $(DEFS) $(INCLS) $<
|
---|
[38699] | 44 |
|
---|
| 45 | .asm.obj : .autodepend
|
---|
[60580] | 46 | wasm -fo=.obj $(AFLAGS) $(DEFS) $(INCLS) $<
|
---|
[38699] | 47 |
|
---|
| 48 | vbxbios.rom : vbxbios.bin
|
---|
| 49 | biossums $< $@
|
---|
| 50 |
|
---|
| 51 | vbxbios.bin : $(OBJS) $(__MAKEFILES__)
|
---|
[38705] | 52 | wlink name $@ system dos debug all option quiet &
|
---|
| 53 | option nofarcalls, map, verbose, statics, symfile &
|
---|
[38699] | 54 | output raw offset=0xF0000 order &
|
---|
| 55 | clname DATA segaddr=0xF000 segment _DATA &
|
---|
| 56 | clname CODE &
|
---|
[71426] | 57 | segment _TEXT segaddr=0xF000 offset=0x1C00 &
|
---|
[42127] | 58 | segment BIOS32 segaddr=0xF000 offset=0xDB00 &
|
---|
[38699] | 59 | segment BIOSSEG segaddr=0xF000 offset=0xE000 &
|
---|
| 60 | file { $(OBJS) } &
|
---|
| 61 | library clibs.lib &
|
---|
| 62 | disable 1014, 1023, 2120
|
---|
| 63 |
|
---|
[39346] | 64 | logo.obj : logo.c .autodepend
|
---|
[38700] | 65 | wcc -fo=.obj $(INCLS) $(CFLAGS) $(DEFS) -DVBOX_PC_BIOS $<
|
---|
[38699] | 66 |
|
---|
[42127] | 67 | pci32.obj : pci32.c .autodepend
|
---|
| 68 | wcc386 -fo=.obj $(INCLS) $(DEFS) $(CFLAGS32) $<
|
---|
| 69 |
|
---|
[38699] | 70 | clean : .symbolic
|
---|
| 71 | @rm -f *.obj *.err
|
---|
[38899] | 72 | @rm -f vbxbios.bin vbxbios.rom vbxbios.map vbxbios.sym
|
---|