changelog
[monky] / tests / Makefile
1 #   --------------------------------------------------------------------
2 #   Philip Kovacs (kovacsp3@comcast.net) 2005
3 #   Make programs for testing libtcp-portmon and hash stuff up in ../src
4 #   Sorry no autoconf/automake for this stuff as of now.
5 #
6 #   $Id$
7 #   --------------------------------------------------------------------
8    
9 #CFLAGS = -g -Wall
10 CFLAGS = -g -Wall -DHASH_DEBUG
11 CC = gcc
12
13 all:                    test-hash test-portmon
14
15 test-hash:              test-hash.o hash.o
16                         $(CC) $(CFLAGS) -o $@ test-hash.o hash.o
17
18 test-portmon:           test-portmon.o libtcp-portmon.o hash.o
19                         $(CC) $(CFLAGS) -o $@ test-portmon.o libtcp-portmon.o hash.o -lm
20
21 test-hash.o:            test-hash.c hash.h
22 test-portmon.o:         test-portmon.c libtcp-portmon.h hash.h
23
24 hash.h:                 ../src/hash.h
25                         cp ../src/hash.h .
26
27 hash.c:                 ../src/hash.c
28                         cp ../src/hash.c .
29
30 libtcp-portmon.h:       ../src/libtcp-portmon.h
31                         cp ../src/libtcp-portmon.h .
32
33 libtcp-portmon.c:       ../src/libtcp-portmon.c
34                         cp ../src/libtcp-portmon.c .
35                 
36 libtcp-portmon.o:       libtcp-portmon.c libtcp-portmon.h
37 hash.o:                 hash.c hash.h
38
39 .c.o:           
40                         ${CC} ${CFLAGS} -c $<
41
42 clean:          
43                         /bin/rm -f *.o test-portmon test-hash hash.? libtcp-portmon.?