2 # Makefile.in for ircd/src
4 # $Id: Makefile.in 3360 2007-04-03 09:37:03Z nenolod $
8 INSTALL_BIN = @INSTALL_PROGRAM@
9 INSTALL_DATA = @INSTALL_DATA@
10 INSTALL_SUID = @INSTALL_PROGRAM@ -o root -m 4755
15 CFLAGS = @IRC_CFLAGS@ -DIRCD_PREFIX=\"@prefix@\"
17 MKDEP = @MKDEP@ -DIRCD_PREFIX=\"@prefix@\"
22 exec_prefix = @exec_prefix@
25 libexecdir = @libexecdir@
34 SSL_INCLUDES = @SSL_INCLUDES@
36 IRCDLIBS = @MODULES_LIBS@ -L../libratbox/src/.libs -lratbox @LIBS@ $(SSL_LIBS)
38 INCLUDES = -I../include -I../libratbox/include $(SSL_INCLUDES)
39 CPPFLAGS = ${INCLUDES} @CPPFLAGS@
43 y.tab.o: y.tab.c ircd_parser.y
44 ${CC} ${CPPFLAGS} ${PICFLAGS} ${CFLAGS} -I. -c y.tab.c
46 # Note GNU bison uses <file>.tab.c not y.tab.c
47 y.tab.c: ircd_parser.y
48 ${YACC} -d ircd_parser.y
50 lex.yy.o: lex.yy.c ircd_lexer.l
51 ${CC} ${CPPFLAGS} ${PICFLAGS} ${CFLAGS} -I. -c lex.yy.c
53 lex.yy.c: ircd_lexer.l
109 ircd: $(OBJS) y.tab.o lex.yy.o version.o
110 ${CC} ${CFLAGS} ${LDFLAGS} -o $@ ${OBJS} lex.yy.o y.tab.o version.o ${IRCDLIBS} ${LEXLIB}
111 mv version.c version.c.last
114 -@if test ! -d $(DESTDIR)$(prefix); then \
115 echo "ircd: setting up ircd directory structure"; \
116 mkdir $(DESTDIR)$(prefix); \
118 -@if test ! -d $(DESTDIR)$(exec_prefix); then \
119 mkdir $(DESTDIR)$(exec_prefix); \
121 -@if test ! -d $(DESTDIR)$(bindir); then \
122 mkdir $(DESTDIR)$(bindir); \
124 -@if test ! -d $(DESTDIR)$(libdir); then \
125 mkdir $(DESTDIR)$(libdir); \
128 install: install-mkdirs build
129 -@if test -f $(DESTDIR)$(bindir)/ircd; then \
130 echo "ircd: backing up ircd"; \
132 @echo "ircd: installing ircd ($(PROGS))"
133 @for i in $(PROGS); do \
134 if test -f $(DESTDIR)$(bindir)/$$i; then \
135 $(MV) $(DESTDIR)$(bindir)/$$i $(DESTDIR)$(bindir)/$$i.old; \
137 $(INSTALL_BIN) $$i $(DESTDIR)$(bindir); \
140 version.c: version.c.SH
141 /bin/sh ./version.c.SH
144 # this is really the default rule for c files
146 ${CC} ${CPPFLAGS} ${CFLAGS} -c $<
148 ${CC} ${CPPFLAGS} ${CFLAGS} -c $<
150 .PHONY: depend clean distclean
152 ${MKDEP} ${CPPFLAGS} ${SRCS} > .depend
155 ${RM} -f *.o *.exe *~ y.tab.* lex.yy.c ircd.core core ircd
158 lint -aacgprxhH $(CPPFLAGS) -DIRCD_PREFIX=\"@prefix@\" $(SRCS) >>../lint.out
161 ${RM} -f Makefile version.c.last