#*******************************************************************************
#*******************************************************************************
#**                                                                           **
#**                    COPYRIGHT 1998 INTEL CORPORATION                       **
#**                                                                           **
#**                INTEL CORPORATION PROPRIETARY INFORMATION                  **
#**                                                                           **
#**      This software is supplied under the terms of a license agreement     **
#**      or non-disclosure agreement with Intel Corporation and may not be    **
#**      copied or disclosed except in accordance with the terms of that      **
#**      agreement.                                                           **
#**                                                                           **
#**      This Source Code is provided "as is" without any warranty of any     **
#**      kind, express, implied, statutory or otherwise, and Intel            **
#**      specifically disclaims any implied warranties for any particular     **
#**      purpose.                                                             **
#**                                                                           **
#*******************************************************************************
#******* 10 ****** 20 ****** 30 ****** 40 ****** 50 ****** 60 ****** 70 ********
#*******************************************************************************
#
#*******************************************************************************/       
#
#/******************************************************************************
#
#       Module description: Makefile for IPMItool code.
#
#*******************************************************************************/


#/*----------------------------------------------------------
#* Copyright (c) 2002 by National Semiconductor Corporation
#* All rights reserved.
#*-----------------------------------------------------------
#* File Contents:
#*     Makefile modifications - added new files, version incremented
#* Project:  PC87431x
#*---------------------------------------------------------*/

CC   = cl.exe
LINK = link.exe
AS   = c:\masm32\bin\ml.exe

CFLAGS  = /W3 /c /G3 /AL /Fl
ASFLASG = /c /Cx /Sa /W3
LFLAGS = /stack:8000

DEFINES = /DREVISION=\"3.0\"

COMMON_C = isa.c pci.c common.c 
COMMON_OBJ = isa.obj pcia.obj pci.obj common.obj 
MAIN_OBJ = ipmitool.obj



COMMON_H = common.h 

PROGRAMS_C =       \
    ipmitool.c  

PROGRAMS =           \
    kiratool.exe 

#*******************************************************************************

!ifdef DBG
LFLAGS = /STACK:5000 
MAIN_OBJ = ipmitest.obj
PROGRAMS_C =       \
    ipmitest.c  
PROGRAMS =           \
    ipmitest.exe 

!endif


all:    $(PROGRAMS)

dbg:
    $(MAKE)  DBG=1   

#*******************************************************************************
#                           SOURCE and OBJECT FILE DEPENDENCIES
#*******************************************************************************

$(COMMON_C) : $(COMMON_H)
$(PROGRAMS_C) : $(COMMON_H)

.c.obj: 
    $(CC) $(DEFINES) $(CFLAGS) $*.c
.asm.obj:
    $(AS) $(ASFLASG) $*.asm

#*******************************************************************************
#                          EXE & COM FILE DEPENDENCIES
#*******************************************************************************

$(PROGRAMS) : $(MAIN_OBJ) $(COMMON_OBJ)
    $(LINK) $(LFLAGS) $(MAIN_OBJ) $(COMMON_OBJ), $*.exe,,,,

#*******************************************************************************
#                               CLEANUP COMMANDS
#*******************************************************************************

clean:
    del *.obj
    del *.map
    del *.bak

reallyclean:
    del *.obj
    del *.map
    del *.bak
    del *.exe
    del *.com
    del *.cod
    del *.zip

#*******************************************************************************
#                                 ZIP COMMANDS
#*******************************************************************************

srczip:
    pkzip -ex -jr ipmisrc.zip *.c *.h Makefile *.bat *.txt *.pdf

exezip: all
    pkzip -ex -jr ipmiexe.zip *.exe *.com *.txt

zip:    all
    pkzip -ex -jr ipmitool.zip *.c *.h Makefile *.bat *.exe *.com *.txt *.pdf

exe:    exezip
    zip2exe ipmiexe.zip
