3 # NOTE: normally you should not have to modify the Makefile. All
4 # system-dependent configuration is in the "configure" script, which
5 # uses "Makefile.in" to generate a "Makefile". In the rare instance
6 # that you have to modify something here, please take note:
7 # 1. Edit Makefile.in, -not- Makefile.
8 # 2. Send e-mail to ajc@uncensored.citadel.org and let me know what you
9 # did, so any necessary changes can be put into the next release.
11 ########################################################################
18 RUN_DIR=@MAKE_RUN_DIR@
19 SPOOL_DIR=@MAKE_SPOOL_DIR@
20 ETC_DIR=@MAKE_ETC_DIR@
21 DATA_DIR=@MAKE_DATA_DIR@
22 STATICDATA_DIR=@MAKE_STATICDATA_DIR@
23 HELP_DIR=@MAKE_HELP_DIR@
24 DOC_DIR=@MAKE_DOC_DIR@
25 UTILBIN_DIR=@MAKE_UTILBIN_DIR@
26 DEPEND_FLAG=@DEPEND_FLAG@
27 all: buildinfo $(TARGETS)
33 CLIENT_TARGETS=citadel$(EXEEXT)
37 chkpwd_LIBS=@chkpwd_LIBS@
39 CFLAGS=@CFLAGS@ -I ./include/
40 CPPFLAGS=@CPPFLAGS@ -I. -I ./include/
42 DEFS=@DEFS@ -DDIFF=\"@DIFF@\" -DPATCH=\"@PATCH@\"
47 INSTALL_DATA=@INSTALL_DATA@
50 SERVER_LDFLAGS=@SERVER_LDFLAGS@
51 SERVER_LIBS=@SERVER_LIBS@
52 SETUP_LIBS=@SETUP_LIBS@
58 # End configuration section
63 SOURCES=src/client_chat.c \
64 src/client_passwords.c \
76 # for VPATH builds (invoked by configure)
82 noinst: $(NOINST_TARGETS)
83 client: $(CLIENT_TARGETS)
85 citadel$(EXEEXT): src/citadel.o \
87 src/client_passwords.o \
101 src/client_passwords.o \
113 $(LDFLAGS) -o citadel $(LIBS)
117 $(CC) $(CFLAGS) $(CPPFLAGS) $(DEFS) -c $< -o $@
119 .PHONY: install-data install-doc install-exec clean cleaner distclean
123 install: install-exec install-data install-doc install-locale
125 @echo Installation is complete.
128 install-new: install-exec-new install-data-new install-doc-new install-locale
130 @echo Installation is complete.
133 upgrade: install-exec install-doc
135 @echo Upgrade is complete.
139 @for i in citadel.rc \
140 `find $(srcdir)/help $(srcdir)/messages $(srcdir)/network -type f | grep -v .svn`; do \
141 echo $(INSTALL_DATA) $$i $(DESTDIR)$(prefix)/$$i; \
142 $(INSTALL_DATA) $$i $(DESTDIR)$(prefix)/$$i; \
146 $(srcdir)/mkinstalldirs $(DESTDIR)$(ETC_DIR)/
147 $(INSTALL_DATA) $(srcdir)/citadel.rc $(DESTDIR)$(ETC_DIR)/citadel.rc
150 @$(srcdir)/mkinstalldirs $(DESTDIR)$(prefix)/docs
153 @$(srcdir)/mkinstalldirs $(DESTDIR)$(DOC_DIR)/docs
156 @for i in $(CLIENT_TARGETS) ; do \
157 if test -f $$i; then \
158 echo $(INSTALL) $$i $(DESTDIR)$(prefix)/$$i; \
159 $(INSTALL) $$i $(DESTDIR)$(prefix)/$$i; \
163 install-exec-new: all
164 $(srcdir)/mkinstalldirs $(DESTDIR)/usr/bin;
165 @for i in $(CLIENT_TARGETS); do \
166 if test -f $$i; then \
167 echo $(INSTALL) $$i $(DESTDIR)/usr/bin/$$i; \
168 $(INSTALL) $$i $(DESTDIR)/usr/bin/$$i; \
175 rm -f $(CLIENT_TARGETS)
178 rm -rf $(CLIENT_TARGETS)
181 find . -name '*~' -o -name '.#*' | xargs rm -f
183 rm -f Makefile sysdep.h config.cache config.log config.status *.d
187 @echo Checking dependencies for $<
188 @$(CC) $(DEPEND_FLAG) $(CPPFLAGS) $< | sed -e 's!$*.o!$*.o $*/.o $@!' > $@
189 @test -s $@ || rm -f $@
191 Makefile: $(srcdir)/Makefile.in config.status
192 CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status
194 config.status: $(srcdir)/configure
195 $(SHELL) ./config.status --recheck
197 $(srcdir)/configure: $(srcdir)/configure.ac $(srcdir)/aclocal.m4
198 cd $(srcdir) && $(AUTOCONF)
200 $(srcdir)/aclocal.m4: $(srcdir)/acinclude.m4
201 cd $(srcdir) && $(ACLOCAL)
205 echo "Dependencies: $(CC) $(DEPEND_FLAG) $(CPPFLAGS) $< | sed -e 's!$*.o!$*.o $*/.o $@!' > $@"
206 echo "Complie: $(CC) $(CFLAGS) $(CPPFLAGS) $(DEFS) -c $< -o $@ "
207 echo "LDFLAGS: $(LDFLAGS)"
210 -include $(DEP_FILES)