2 # $Id: Makefile 5626 2010-03-04 21:55:22Z luigi $
4 # Makefile for building userland tests
5 # this is written in a form compatible with gmake
7 SCHED_SRCS = test_dn_sched.c
8 SCHED_SRCS += dn_sched_fifo.c
9 SCHED_SRCS += dn_sched_wf2q.c
10 SCHED_SRCS += dn_sched_qfq.c
11 SCHED_SRCS += dn_sched_rr.c
12 SCHED_SRCS += dn_heap.c
15 SCHED_OBJS=$(SCHED_SRCS:.c=.o)
17 HEAP_SRCS = dn_heap.c test_dn_heap.c
18 HEAP_OBJS=$(HEAP_SRCS:.c=.o)
22 #CFLAGS = -I../dummynet2/include -I. -Wall -Werror -O3 -DIPFW
23 CFLAGS = -I. -I../dummynet2/include/netinet/ipfw -DIPFW
24 CFLAGS += -Wall -Werror
26 TARGETS= test_sched # no test_heap by default
30 test_heap : $(HEAP_OBJS)
31 $(CC) -o $@ $(HEAP_OBJS)
33 test_sched : $(SCHED_OBJS)
34 $(CC) -o $@ $(SCHED_OBJS)
36 $(SCHED_OBJS): dn_test.h
40 - rm *.o $(TARGETS) *.core
42 ALLSRCS = $(SCHED_SRCS) dn_test.h mylist.h \
43 dn_sched.h dn_heap.h ip_dn_private.h Makefile
44 TMPBASE = /tmp/testXYZ
45 TMPDIR = $(TMPBASE)/test
50 -cp -p $(ALLSRCS) $(TMPDIR)
51 -(cd ..; cp -p $(ALLSRCS) $(TMPDIR))
53 (cd $(TMPBASE); tar cvzf /tmp/test.tgz test)