#/******************************************************************************
#*                                                                             *
#*              Copyright (C),  Philips Semiconductors SLH                     *
#*                                                                             *
#*  All rights are reserved. Reproduction in whole or in part is prohibited    *
#*           without the written consent of the copyright owner.               *
#*                                                                             *
#*  Philips reserves the right to make changes without notice at any time.     *
#* Philips makes no warranty, expressed, implied or statutory, including but   *
#* not limited to any implied warranty of merchantibility or fitness for any   *
#*   particular purpose, or that the use will not infringe any third party     *
#* patent, copyright or trademark. Philips must not be liable for any loss or  *
#*                      damage arising from its use.                           *
#*                                                                             *
#*******************************************************************************
#*                                                                             *
#*       Project: 336 355/105 - Control SW Library for HTRC110 and HITAG2      *
#*                                                                             *
#*       File: MAKEFILE                                                        *
#*       Author:  St. de Zeeuw                                                 *
#*                                                                             *
#*******************************************************************************
#*      DATE      *          CHANGES DONE                         *    BY      *
#*******************************************************************************
#*                *                                               *            *
#*  Dec 04,1997   * Start implementation                          *   de Zeeuw *
#*  Dec 10,1997   * Version 1.0, tested Version                   *   de Zeeuw *
#*                *                                               *            *
#*******************************************************************************/

# This makefile builds the  test application
#
# File  : MAKEFILE
#
# Author: St. de Zeeuw    
#
# Date  : 08/12/97
#
# For use with Microsoft NMAKE Utility V1.30 or newer
#
# Used programming tools:
# C51 V5.01, L51 V3.11, A51 V4.6, OH51 V2.0 (from Keil)
# SFOMF (DOS) V3.2.4 (from Ashling)

#
# Program: PCF7991AT/PCF7936AS library
# type: "nmake clean" before compilation, if header files have been
#                     modified (not included in dependencies)
# type: "nmake lib"   to compile library
# type: "nmake test"  to compile the test program
# type: "nmake clean" after compilation; library resides as .\control.lib

ECHO    = @ECHO.

AFLAGS = DEBUG
CFLAGS = oj($*.obj) print($*.lst) SMALL ROM(LARGE)  DEBUG optimize(speed) OE CD
LFLAGS = ramsize(256) ixref


CC=C:\DEVELOP\C51V5\BIN\c51.exe
ASM=C:\DEVELOP\C51V5\BIN\a51.exe
LINK=C:\DEVELOP\C51V5\BIN\l51.exe
LIB=C:\DEVELOP\C51V5\BIN\lib51.exe

SC51LIB = @SET C51LIB=C:\DEVELOP\C51V5\LIB
SC51INC = @SET C51INC=C:\DEVELOP\C51V5\INC


lib: control.lib
test: test.abs

control.lib:  rc_ast.obj rc_base.obj rc_fset.obj rc_get_c.obj rc_get_s.obj  \
      rc_pread.obj rc_wset.obj callback.obj ht2_a.obj ht2_c.obj \
      co_base.obj co_getv.obj co_pers.obj
	del control.lib
	$(LIB) create control.lib
	$(LIB) add rc_ast.obj    to control.lib
	$(LIB) add rc_base.obj   to control.lib
	$(LIB) add rc_fset.obj   to control.lib
	$(LIB) add rc_get_c.obj  to control.lib
	$(LIB) add rc_get_s.obj  to control.lib
	$(LIB) add rc_pread.obj  to control.lib
	$(LIB) add rc_wset.obj   to control.lib
	$(LIB) add callback.obj  to control.lib
	$(LIB) add ht2_a.obj     to control.lib
	$(LIB) add ht2_c.obj     to control.lib
	$(LIB) add co_base.obj   to control.lib
	$(LIB) add co_getv.obj   to control.lib
	$(LIB) add co_pers.obj   to control.lib

test.abs:   test.obj control.lib
   $(SC51LIB)
   -1 $(LINK) test.obj,control.lib to $*.abs $(LFLAGS)


clean:
	del *.m51
	del *.obj
	del *.lst
	del *.cso


.c.obj:
   $(SC51INC)
   $(CC) $*.c $(CFLAGS)

ht2_a.obj: ht2_a.a51
   $(ASM) $*.a51 $(AFLAGS)
   $(ECHO)

co_base.obj: co_base.c htrc120.h
  $(SC51INC)
	-1 $(CC)  $*.c $(CFLAGS)
   $(ECHO)

co_getv.obj: co_getv.c htrc120.h
  $(SC51INC)
	-1 $(CC)  $*.c $(CFLAGS)
   $(ECHO)

co_pers.obj: co_pers.c htrc120.h
  $(SC51INC)
	-1 $(CC)  $*.c $(CFLAGS)
   $(ECHO)

ht2_c.obj: ht2_c.c hitag2.h 
  $(SC51INC)
	-1 $(CC)  $*.c $(CFLAGS)
   $(ECHO)

test.obj : test.c       htrc120.h htrc110.h hitag2.h
   $(SC51INC)
   -1 $(CC) $*.c $(CFLAGS)
   $(ECHO)









