2 # Makefile.in for ircd/modules
11 CFLAGS
= @IRC_CFLAGS@
-DIRCD_PREFIX
=\"@
prefix@
\"
13 MKDEP
= @MKDEP@
-DIRCD_PREFIX
=\"@
prefix@
\"
15 INSTALL_PROGRAM
= @INSTALL_PROGRAM@
16 INSTALL_DATA
= @INSTALL_DATA@
17 INSTALL_SUID
= @INSTALL_PROGRAM@
-o root
-m
4755
24 SSL_INCLUDES
= @SSL_INCLUDES@
26 IRCDLIBS
= @LIBS@
$(SSL_LIBS
)
29 moduledir
= @moduledir@
30 # Change this later! -- adrian
31 automoduledir
= @moduledir@
/autoload
33 INCLUDES
= -I..
/include -I..
/libseven
-I..
/adns
$(SSL_INCLUDES
)
34 CPPFLAGS
= ${INCLUDES} @CPPFLAGS@
120 ALL_SRCS
= $(CORE_SRCS
) \
123 SH_OBJS
= ${SRCS
:.c
=.so
}
124 SH_CORE_OBJS
= ${CORE_SRCS
:.c
=.so
}
126 HPUX_OBJS
= ${SH_OBJS
:.so
=.sl
}
127 HPUX_CORE_OBJS
= ${SH_CORE_OBJS
:.so
=.sl
}
129 S_OBJS
= ${ALL_SRCS
:.c
=.o
}
137 shared_modules
: $(SH_CORE_OBJS
) $(SH_OBJS
)
139 hpux_modules
: $(HPUX_CORE_OBJS
) $(HPUX_OBJS
)
141 hpux_shared
: $(SH_CORE_OBJS
) $(SH_OBJS
)
144 static_modules.c
: static_modules.c.SH
145 /bin
/sh .
/static_modules.c.SH
$(S_OBJS
)
147 libmodules.a
: $(S_OBJS
) static_modules.o
149 $(AR
) cqv
$@
$(S_OBJS
) static_modules.o
154 @echo
"ircd: setting up modular directory structure"
155 -@if
test ! -d
$(DESTDIR
)$(moduledir
); then \
156 mkdir
-p
$(DESTDIR
)$(moduledir
); \
158 -@if
test -d
$(DESTDIR
)$(moduledir
)-old
; then \
159 rm -rf
$(DESTDIR
)$(moduledir
)-old
; \
161 -@if
test -d
$(DESTDIR
)$(moduledir
); then \
162 echo
"ircd: backing up modules"; \
163 mv
$(DESTDIR
)$(moduledir
) $(DESTDIR
)$(moduledir
)-old
; \
166 @mkdir
-p
-m
755 $(DESTDIR
)$(moduledir
)
167 @mkdir
-p
-m
755 $(DESTDIR
)$(automoduledir
)
169 install: install_@MOD_TARGET@
171 install_libmodules.a
: libmodules.a
174 install_shared_modules
: install-mkdirs
175 @echo
"ircd: installing modules"
176 @for file in
$(SH_CORE_OBJS
); do \
177 $(INSTALL_DATA
) $$file $(DESTDIR
)$(moduledir
); \
179 @for file in
$(SH_OBJS
); do \
180 $(INSTALL_DATA
) $$file $(DESTDIR
)$(automoduledir
); \
183 install_hpux_shared
: install-mkdirs
184 @echo
"ircd: installing modules"
185 @for file in
$(HPUX_CORE_OBJS
); do \
186 $(INSTALL_DATA
) $$file $(DESTDIR
)$(moduledir
); \
188 @for file in
$(HPUX_OBJS
); do \
189 $(INSTALL_DATA
) $$file $(DESTDIR
)$(automoduledir
); \
192 .SUFFIXES
: .sl .so .o
195 ${CC} ${CPPFLAGS} ${CFLAGS} -DMODNAME
=`basename $< .c`_mheader
-c
$< -o
$@
198 ${CC} ${PICFLAGS} ${CPPFLAGS} ${CFLAGS} $< -o
$@
203 .PHONY
: depend
clean distclean
206 ${MKDEP} ${CPPFLAGS} ${ALL_SRCS} > .depend
207 @
$(SED
) -e
'${SEDOBJ}' < .depend
> .depend.tmp-1
208 @
$(SED
) -e
's/^m_\(die\|kick\|kill\|message\|mode\|nick\|part\|quit\|server\|sjoin\|squit\)/core\/m_\1/' .depend.tmp-1
> .depend.tmp
209 @
$(MV
) -f .depend.tmp .depend
210 @
$(RM
) -f .depend.tmp-1
213 ${RM} -f
*.so
*.sl
*~
*.o
*.a
214 ${RM} -f core
/*.so core
/*.sl core
/*~ core
/*.o
217 lint
-aacgprxhH
${CPPFLAGS} -DIRCD_PREFIX
=\"@
prefix@
\" $(ALL_SRCS
) >..
/lint.out