Fix ircd/test/Makefile for BSD.
[ircu2.10.12-pk.git] / ircd / test / Makefile.in
1 top_srcdir = @top_srcdir@
2 srcdir = @srcdir@
3 VPATH = @srcdir@
4 CPPFLAGS = -I${top_srcdir}/include -I../..
5 CFLAGS   = -g -Wall
6 CC = @CC@
7
8 TESTPROGS = \
9         ircd_chattr_t \
10         ircd_string_t \
11         ircd_in_addr_t
12
13 DEP_SRC = \
14         ircd_chattr_t.c \
15         ircd_in_addr_t.c \
16         ircd_string_t.c \
17         test_stub.c
18
19 all: ${TESTPROGS}
20
21 build: ${TESTPROGS}
22
23 depend: ${DEP_SRC}
24         @cd ${srcdir} && \
25         if [ -f Makefile.in.bak ]; then \
26           echo "make depend: First remove ircd/Makefile.in.bak"; \
27         else \
28           mv Makefile.in Makefile.in.bak && \
29           grep -A1 -B10000 '^# DO NOT DELETE THIS LINE' Makefile.in.bak > Makefile.in && \
30           ${CC} ${CFLAGS} -MM ${CPPFLAGS} ${DEP_SRC} >> Makefile.in; \
31         fi
32
33 install:
34
35 IRCD_CHATTR_T_OBJS = ircd_chattr_t.o test_stub.o ../ircd_string.o
36 ircd_chattr_t: $(IRCD_CHATTR_T_OBJS)
37         ${CC} -o $@ $(IRCD_CHATTR_T_OBJS)
38
39 IRCD_STRING_T_OBJS = ircd_string_t.o test_stub.o ../ircd_string.o
40 ircd_string_t: $(IRCD_STRING_T_OBJS)
41         ${CC} -o $@ $(IRCD_STRING_T_OBJS)
42
43 IRCD_IN_ADDR_T_OBJS = ircd_in_addr_t.o test_stub.o ../ircd_alloc.o ../ircd_string.o ../match.o ../numnicks.o
44 ircd_in_addr_t: $(IRCD_IN_ADDR_T_OBJS)
45         ${CC} -o $@ $(IRCD_IN_ADDR_T_OBJS)
46
47 .c.o:
48         ${CC} ${CFLAGS} ${CPPFLAGS} -c $< -o $@
49
50 .PHONY: distclean clean
51
52 distclean: clean
53         rm -f Makefile
54
55 clean:
56         rm -f core *.o ${TESTPROGS}
57
58 # DO NOT DELETE THIS LINE (or the blank line after it) -- make depend depends on them.
59
60 ircd_chattr_t.o: ircd_chattr_t.c ../../include/ircd_chattr.h
61 ircd_in_addr_t.o: ircd_in_addr_t.c ../../include/ircd_log.h \
62   ../../include/ircd_string.h ../../include/ircd_chattr.h \
63   ../../include/numnicks.h ../../include/client.h \
64   ../../include/ircd_defs.h ../../include/dbuf.h ../../include/msgq.h \
65   ../../include/ircd_events.h ../../config.h ../../include/ircd_handler.h \
66   ../../include/res.h ../../include/capab.h
67 ircd_string_t.o: ircd_string_t.c ../../include/ircd_string.h \
68   ../../include/ircd_chattr.h
69 test_stub.o: test_stub.c ../../include/client.h ../../include/ircd_defs.h \
70   ../../include/dbuf.h ../../include/msgq.h ../../include/ircd_events.h \
71   ../../config.h ../../include/ircd_handler.h ../../include/res.h \
72   ../../include/capab.h ../../include/ircd_log.h ../../include/s_debug.h