This repo is obsolete, please see git://git.code.sf.net/p/dummynet/code@master
[ipfw.git] / test / Makefile
1 #
2 # $Id: Makefile 5626 2010-03-04 21:55:22Z luigi $
3 #
4 # Makefile for building userland tests
5 # this is written in a form compatible with gmake
6
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
13 SCHED_SRCS += main.c
14
15 SCHED_OBJS=$(SCHED_SRCS:.c=.o)
16
17 HEAP_SRCS = dn_heap.c test_dn_heap.c
18 HEAP_OBJS=$(HEAP_SRCS:.c=.o)
19
20 VPATH=  .:../dummynet2
21
22 #CFLAGS = -I../dummynet2/include -I. -Wall -Werror -O3 -DIPFW
23 CFLAGS = -I. -I../dummynet2/include/netinet/ipfw -DIPFW
24 CFLAGS +=  -Wall -Werror
25 CFLAGS += -g -O3
26 TARGETS= test_sched # no test_heap by default
27
28 all: $(TARGETS)
29
30 test_heap : $(HEAP_OBJS)
31         $(CC) -o $@ $(HEAP_OBJS)
32
33 test_sched : $(SCHED_OBJS)
34         $(CC) -o $@ $(SCHED_OBJS)
35
36 $(SCHED_OBJS): dn_test.h
37 main.o: mylist.h
38
39 clean:
40         - rm *.o $(TARGETS) *.core
41
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
46
47 tgz:
48         -rm -rf $(TMPDIR)
49         mkdir -p $(TMPDIR)
50         -cp -p $(ALLSRCS) $(TMPDIR)
51         -(cd ..; cp -p $(ALLSRCS) $(TMPDIR))
52         ls -la  $(TMPDIR)
53         (cd $(TMPBASE); tar cvzf /tmp/test.tgz test)