# $Id: Makefile 5225 2010-02-10 10:41:46Z luigi $
# testing framework for schedulers
# Use gmake to build this program
# make IPFW=... to override the ipfw sources

CFLAGS= -Wall -O3
CFLAGS += -DWITH_KPS
OBJS := main.o

ifeq ($(IPFW),)
  DN_SRCS=ipfw
else
  DN_SRCS=$(IPFW)
endif

VPATH=	.:$(DN_SRCS)
CFLAGS += -DIPFW -I. -I$(DN_SRCS)
OBJS += test_dn_sched.o
OBJS += dn_sched_fifo.o
OBJS += dn_sched_wf2q.o
OBJS += dn_sched_rr.o
OBJS += dn_sched_qfq.o
OBJS += dn_sched_kps.o
OBJS += dn_heap.o

LDFLAGS:=-lm -g

all: test

test: $(OBJS)
	$(CC) $(LDFLAGS) -o test $(OBJS)

$(OBJS): dn_test.h
clean:
	rm -rf test *.o *.core

ALLSRC = ipfw/*[ch] Makefile *.[ch]
tar:
	tar cvzf /tmp/qfq-test.tgz $(ALLSRC)
