# $Id: makefile,v 1.2 2002/04/26 23:09:34 smilcke Exp $

#===================================================================
# Makefile for LXAPI32 driver PCI
#===================================================================
DEVTYPE=PCI
TARGET   = pci

#EVERYTHING_AS_CPP=1
32BIT=1

!Message ************************
!Message Building $(TARGET)
!Message ************************

!include ..\makes\paths.mak
!ifndef DRV_BASE
!error No DRV paths defined.
!endif

CINCLUDES = $(%WATCOM)\H;..\include;
AINCLUDES = $(%DDK)\H

CDEFINES = -D__KERNEL__ -DMODULE -dTARGET_OS2

#===================================================================
#
#   List of source files
#
#===================================================================
OBJ1    = pci.obj
OBJ2    = pci-pc.obj
OBJ3    = pci-i386.obj
OBJ4    = pci-nc.obj
OBJ5    = pci-irq.obj
OBJ6    = pciquirk.obj
OBJ7    = pcisetup.obj
OBJ8    =
OBJ9    =
OBJLAST =
OBJS    = $(OBJ0) $(OBJ1) $(OBJ2) $(OBJ3) $(OBJ4) $(OBJ5) $(OBJ6) $(OBJ7) $(OBJ8) $(OBJ9) $(OBJLAST)

!include $(DRV_MAKES)\envchk.mak
!include $(DRV_MAKES)\common.mak
!include $(LX_MAINMAKE)

LNKFILE  = $(DRV_OBJ)\$(TARGET).lrf


#===================================================================
#
#   Specific dependencies
#
#===================================================================
all: $(DRV_LIB)\$(TARGET).lib


$(LNKFILE): makefile
    @%create $(LNKFILE)
    @for %f in ($(OBJS)) do @%append $(LNKFILE) -+$(DRV_OBJ)\%f

$(DRV_LIB)\$(TARGET).lib: $(LNKFILE) $(OBJS)
    @echo ------------------- $^&.lib
    $(LIB) $(DRV_LIB)\$(TARGET).lib @$(LNKFILE)

clean: .SYMBOLIC
       @if exist $(DRV_OBJ)\*.obj del $(DRV_OBJ)\*.obj
       @if exist $(DRV_OBJ)\*.lrf del $(DRV_OBJ)\*.lrf
       @if exist $(DRV_OBJ)\*.lst del $(DRV_OBJ)\*.lst
       @if exist $(DRV_SRC)\*.err del $(DRV_SRC)\*.err
       @if exist $(DRV_LIB)\$(TARGET).lib del $(DRV_LIB)\$(TARGET).lib
