#
#           INTEL CORPORATION PROPRIETARY INFORMATION
#  This software is supplied under the terms of a license agreement or
#  nondisclosure agreement with Intel Corporation and may not be copied
#  or disclosed except in accordance with the terms of that agreement.
#      Copyright (c) 1999-2000 Intel Corporation.  All Rights Reserved.
#//////////////////////////////////////////////////////////////////////////////
# To use this makefile, define IXPSDKROOT to be the base directory
# of the IXP1200 SDK, e.g, C:\IXP1200
INCLUDEPATH = 	-I../../../include \
                -I../../../include/IXPblocks \
                -I../../../../../include \
		-I../../../aces/interface_ace/microblock/ \
                -I../../../aces/interface_ace/include \
		-I../../../common/dispatch_loops/include/ \
                -I../../../common/resource_manager/include/ \
		-I../../../common/dispatch_loops/Egress_RoundRobin/ \
                -I../../../common/dispatch_loops/Egress_Fifo/     \
                -I../../../../asl/include/	\
		-I../include

COUNT2_DISPATCH		= ./
SLOWEGRESS_DISPATCH	= ../../../common/dispatch_loops/Egress_RoundRobin
FASTEGRESS_DISPATCH	= ../../../common/dispatch_loops/Egress_Fifo


INGRESS_DEFINES = -DMICROCODE -DDEBUG_INGRESS 
EGRESS_DEFINES = -DMICROCODE 

UCA = wine -- /p/ixasdk/windows/bin/uca.exe
UCLD = wine -- /p/ixasdk/windows/bin/ucld.exe

all: SlowIngressSimple FastIngressSimple SlowEgressRR FastEgressFifo cleanup


SlowIngressSimple: FORCE
	$(UCA) $(INCLUDEPATH) $(INGRESS_DEFINES) -DSLOWPORT -O -o SlowIngressSimple.list Simple.uc
	sleep 1
	$(UCLD) -c -u 0 SlowIngressSimple.list	
	sleep 1

FastIngressSimple: FORCE
	$(UCA) $(INCLUDEPATH) $(INGRESS_DEFINES) -DFASTPORT -D_FAST_INGRESS_SEQ_NUM=1 -O -o FastIngressSimple-seq1.list Simple.uc
	sleep 1
	$(UCA) $(INCLUDEPATH) $(INGRESS_DEFINES) -DFASTPORT -D_FAST_INGRESS_SEQ_NUM=2 -O -o FastIngressSimple-seq2.list Simple.uc
	sleep 1
	$(UCLD) -c -u 0 FastIngressSimple-seq1.list
	sleep 1
	$(UCLD) -c -u 0 FastIngressSimple-seq2.list
	sleep 1

SlowEgressRR: FORCE
	$(UCA) $(INCLUDEPATH) $(EGRESS_DEFINES) -DSLOWPORT -O -o SlowEgressRR.list $(SLOWEGRESS_DISPATCH)/RR_EgressDispatch.uc
	sleep 1
	$(UCLD) -c -u 0 SlowEgressRR.list
	sleep 1

FastEgressFifo: FORCE
	$(UCA) $(INCLUDEPATH) $(EGRESS_DEFINES) -DFASTPORT -O -o FastEgressFifo.list $(FASTEGRESS_DISPATCH)/Fifo_EgressDispatch.uc
	sleep 1
	$(UCLD) -c -u 0 FastEgressFifo.list
	sleep 1

FORCE:

clean: cleanup
	rm -f *.uof

cleanup:
	rm -f *.uci *.c *.ucp *.list
