ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid-7.2/modules/Makefile.in
Revision: 897
Committed: Sat Nov 3 17:13:32 2007 UTC (16 years, 5 months ago) by db
File size: 4169 byte(s)
Log Message:
- Major cleanup of build system (Stu should review this)
  Basically move shared stuff like help messages modules to datadir
  Try to keep to the original layout under prefix if --datadir
  --sysconfdir --localstatedir are not given
- Make the example files have reasonable defaults, this bites me
  all the time anyway.


File Contents

# Content
1 #
2 # Makefile.in for ircd/modules
3 #
4 # $Id$
5 #
6 CC = @CC@
7 AR = @AR@
8 RM = @RM@
9 SED = @SED@
10 SEDOBJ = @SEDOBJ@
11 STDOUT = @STDOUT@
12 CFLAGS = @IRC_CFLAGS@
13 PICFLAGS = @PICFLAGS@
14 MKDEP = @MKDEP@
15 INSTALL = @INSTALL@
16 INSTALL_DATA = @INSTALL_DATA@
17 MV = @MV@
18 LD = @LD@
19
20 SSL_LIBS = @SSL_LIBS@
21 SSL_INCLUDES = @SSL_INCLUDES@
22 IRCDLIBS = @LIBS@ $(SSL_LIBS)
23 MODULEDIR = @MODULEDIR@
24 AUTOMODULEDIR = @AUTOMODULEDIR@
25
26 prefix = $(DESTDIR)@prefix@
27 datarootdir = $(DESTDIR)@datarootdir@
28 moduledir = $(MODULEDIR)
29 automoduledir = $(AUTOMODULEDIR)
30
31 INCLUDES = -I../include -I../lib/pcre $(SSL_INCLUDES)
32 CPPFLAGS = ${INCLUDES} @CPPFLAGS@
33
34 CORE_SRCS = \
35 core/m_die.c \
36 core/m_join.c \
37 core/m_kick.c \
38 core/m_kill.c \
39 core/m_message.c \
40 core/m_mode.c \
41 core/m_nick.c \
42 core/m_part.c \
43 core/m_quit.c \
44 core/m_server.c \
45 core/m_sjoin.c \
46 core/m_squit.c
47
48 SSL_SRCS = \
49 m_challenge.c \
50 m_cryptlink.c
51
52 SRCS = \
53 m_accept.c \
54 m_admin.c \
55 m_away.c \
56 m_cap.c \
57 m_capab.c \
58 m_close.c \
59 @SSL_SRCS_ENABLE@ \
60 m_connect.c \
61 m_encap.c \
62 m_eob.c \
63 m_etrace.c \
64 m_hash.c \
65 m_help.c \
66 m_gline.c \
67 m_info.c \
68 m_invite.c \
69 m_ison.c \
70 m_kline.c \
71 m_knock.c \
72 m_links.c \
73 m_list.c \
74 m_locops.c \
75 m_lusers.c \
76 m_map.c \
77 m_motd.c \
78 m_names.c \
79 m_omotd.c \
80 m_oper.c \
81 m_operwall.c \
82 m_pass.c \
83 m_ping.c \
84 m_pong.c \
85 m_post.c \
86 m_rehash.c \
87 m_restart.c \
88 m_resv.c \
89 m_rkline.c \
90 m_rxline.c \
91 m_set.c \
92 m_stats.c \
93 m_svinfo.c \
94 m_tburst.c \
95 m_testmask.c \
96 m_testline.c \
97 m_time.c \
98 m_topic.c \
99 m_trace.c \
100 m_user.c \
101 m_userhost.c \
102 m_users.c \
103 m_version.c \
104 m_wallops.c \
105 m_watch.c \
106 m_who.c \
107 m_whois.c \
108 m_whowas.c \
109 m_xline.c
110
111 ALL_SRCS = $(CORE_SRCS) $(SRCS) @SSL_SRCS_ENABLE@
112
113 SH_OBJS = ${SRCS:.c=.so}
114 SH_CORE_OBJS = ${CORE_SRCS:.c=.so}
115
116 HPUX_OBJS = ${SH_OBJS:.so=.sl}
117 HPUX_CORE_OBJS = ${SH_CORE_OBJS:.so=.sl}
118
119 S_OBJS = ${ALL_SRCS:.c=.o}
120
121 default: build
122 build: all
123 all: .depend @MOD_TARGET@
124
125 shared_modules: $(SH_CORE_OBJS) $(SH_OBJS)
126
127 hpux_shared: $(SH_CORE_OBJS) $(SH_OBJS) $(HPUX_CORE_OBJS) $(HPUX_OBJS)
128
129 libmodules.a: $(S_OBJS)
130 $(RM) -f $@
131 $(AR) csrv $@ $(S_OBJS)
132
133 install-mkdirs:
134
135 -@if test -d $(moduledir)-old; then \
136 echo "${RM} -rf $(moduledir)-old"; \
137 ${RM} -rf $(moduledir)-old; \
138 fi
139 -@if test -d $(moduledir); then \
140 echo "${MV} $(moduledir) $(moduledir)-old"; \
141 ${MV} $(moduledir) $(moduledir)-old; \
142 fi
143
144 mkdir -p $(moduledir) $(automoduledir)
145
146 install: install_@MOD_TARGET@
147
148 install_libmodules.a: libmodules.a
149 # Ye olde noop here.
150
151 install_shared_modules: install-mkdirs
152 @echo "Installing core modules into $(moduledir) .."
153 @for file in $(SH_CORE_OBJS); do \
154 $(INSTALL_DATA) $$file $(moduledir); \
155 done
156 @echo "Installing modules into $(automoduledir) .."
157 @for file in $(SH_OBJS); do \
158 $(INSTALL_DATA) $$file $(automoduledir); \
159 done
160
161 install_hpux_shared: install-mkdirs
162 @echo "Installing core modules into $(moduledir) .."
163 @for file in $(HPUX_CORE_OBJS); do \
164 $(INSTALL_DATA) $$file $(moduledir); \
165 done
166 @echo "Installing modules into $(automoduledir) .."
167 @for file in $(HPUX_OBJS); do \
168 $(INSTALL_DATA) $$file $(automoduledir); \
169 done
170
171 .SUFFIXES: .sl .so .o
172
173 .c.o:
174 ${CC} ${CPPFLAGS} ${CFLAGS} -c $< -o $@
175
176 .c.so:
177 ${CC} ${PICFLAGS} ${CPPFLAGS} ${CFLAGS} $< -o $@
178
179 .so.sl:
180 $(LD) -b $< -o $@
181
182 .depend:
183 ${MKDEP} ${CPPFLAGS} ${ALL_SRCS} ${STDOUT}
184 ${SED} -e '${SEDOBJ}' < .depend > .depend.tmp-1
185 ${SED} -e 's/^m_\(server\|squit\|die\|join\|kick\|kill\|message\|mode\|nick\|part\|quit\|sjoin\)/core\/m_\1/' .depend.tmp-1 > .depend.tmp
186 @${SED} -e '/^# Autogenerated - do not delete/,$$d' <Makefile >Makefile.depend
187 @echo '# Autogenerated - do not delete' >>Makefile.depend
188 @echo 'include .depend' >> Makefile.depend
189 @${MV} Makefile.depend Makefile
190 ${MV} -f .depend.tmp .depend
191 ${RM} -f .depend.tmp-1
192
193 clean:
194 ${RM} -f *.so *.sl *~ *.o *.a so_locations
195 ${RM} -f core/*.so core/*.sl core/*~ core/*.o
196
197 distclean: clean
198 ${RM} -f Makefile .depend
199
200 .PHONY: clean distclean install install_hpux_shared hpux_shared install_shared_modules shared_modules install_libmodules.a install-mkdirs build

Properties

Name Value
svn:eol-style native
svn:keywords Id Revision