CC= bcc32

# -P            force C++ compile
# -Ot           optimize for speed
# -Oc           optimize common subexpressions locally
# -Og           optimize common subexpressions globally
# -Oa           assume no pointers are aliased (may be unsafe)
# -O            reorganize loops and switches
# -Z            suppress redundant register loads
# -Ob           eliminate dead code (requires -Oe option)
# -Oe           enable global register allocation and variable live range analysis
# -Oi           inline some intrinsic functions (strXXX memXXX alloca fabs rotl rotr)
# -Om           move invariant code out of loops
# -Op           propagate what was assigned to a variable to assignments out of it
# -Ov           create induction variables and expression strength reduction (mostly for loops)
# -WX           generate DPMI 32-bit executable
# -5            optimize for Pentium processor
# -w-pro       #turns off warnings about calls to functions w/o prototypes
# -v            include debug symbols in object files and executable
# -vi          #allow inline functions
# -TD__DPMI32__ tell the assembler to define symbol "__DPMI32__" as 0
# -x-           disable exception handling
#
#CFLAGS= -Otcgabeimpv -O -Z -WX -5 -v -x-
CFLAGS= -Otcgabeimpv -O -Z -WX -5 -v -x- -vi

all: pcidump.exe pcihelp.exe pcifind.exe pcitest.exe

.c.exe:
    $(CC) $(CFLAGS) $*.c pci32.obj

pcidump.exe: pcidump.c pci32.obj pci.h

pcihelp.exe: pcihelp.c pci32.obj pci.h

pcifind.exe: pcifind.c pci32.obj pci.h

pcitest.exe: pcitest.c pci32.obj pci.h

pci32.obj: ..\pci\pci32.asm
    tasm32 /r /D__CDECL__ /m2 /ml ..\pci\pci32.asm
