54203aae40804583af5a31f97ddbb0ee3ae0a283
[citadel] / textclient / Makefile.in
1 # Makefile for Citadel
2 #
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.
10 #
11 ########################################################################
12
13 prefix=@prefix@
14 srcdir=@srcdir@
15 VPATH=$(srcdir)
16
17 TARGETS=@TARGETS@
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)
28
29 .SUFFIXES: .o .d .c
30
31 EXEEXT=@EXEEXT@
32
33 CLIENT_TARGETS=citadel$(EXEEXT)
34
35 ACLOCAL=@ACLOCAL@
36 AUTOCONF=@AUTOCONF@
37 chkpwd_LIBS=@chkpwd_LIBS@
38 CC=@CC@
39 CFLAGS=@CFLAGS@ -I ./include/
40 CPPFLAGS=@CPPFLAGS@ -I. -I ./include/
41 DATABASE=@DATABASE@
42 DEFS=@DEFS@ -DDIFF=\"@DIFF@\" -DPATCH=\"@PATCH@\"
43 LDFLAGS=@LDFLAGS@
44 LIBS=@LIBS@
45 LIBOBJS=@LIBOBJS@
46 INSTALL=@INSTALL@
47 INSTALL_DATA=@INSTALL_DATA@
48 RESOLV=@RESOLV@
49 SHELL=/bin/sh
50 SERVER_LDFLAGS=@SERVER_LDFLAGS@
51 SERVER_LIBS=@SERVER_LIBS@
52 SETUP_LIBS=@SETUP_LIBS@
53 YACC=@YACC@
54 DIFF=@DIFF@
55 PATCH=@PATCH@
56 LOCALEDIR=@LOCALEDIR@
57
58 # End configuration section
59
60 .SILENT:
61
62
63 SOURCES=src/client_chat.c \
64         src/client_passwords.c \
65         src/commands.c \
66         src/messages.c \
67         src/rooms.c \
68         src/routines.c \
69         src/routines2.c \
70         src/tuiconfig.c \
71         src/citadel.c \
72         src/citadel_ipc.c \
73         src/ipc_c_tcp.c \
74         src/screen.c
75
76 # for VPATH builds (invoked by configure)
77 mkdir-init:
78         mkdir -p textclient
79         mkdir locale
80
81
82 noinst: $(NOINST_TARGETS)
83 client: $(CLIENT_TARGETS)
84
85 citadel$(EXEEXT): src/citadel.o  \
86         src/client_chat.o \
87         src/client_passwords.o \
88         src/commands.o \
89         src/md5.o \
90         src/messages.o \
91         src/rooms.o \
92         src/routines.o \
93         src/routines2.o \
94         src/tuiconfig.o \
95         src/screen.o \
96         src/citadel_ipc.o \
97         src/ipc_c_tcp.o \
98         $(LIBOBJS)
99         $(CC) citadel.o \
100         src/client_chat.o \
101         src/client_passwords.o \
102         src/commands.o \
103         src/md5.o \
104         src/messages.o \
105         src/rooms.o \
106         src/routines.o \
107         src/routines2.o \
108         src/tuiconfig.o \
109         src/screen.o \
110         src/citadel_ipc.o \
111         src/ipc_c_tcp.o \
112         $(LIBOBJS) \
113         $(LDFLAGS) -o citadel $(LIBS)
114
115 %.o: %.c ${HEADERS}
116         echo "CC $<"
117         $(CC) $(CFLAGS) $(CPPFLAGS) $(DEFS) -c $< -o $@
118
119 .PHONY: install-data install-doc install-exec clean cleaner distclean
120
121 install-locale:
122
123 install: install-exec install-data install-doc install-locale
124         @echo 
125         @echo Installation is complete.
126         @echo 
127
128 install-new: install-exec-new install-data-new install-doc-new install-locale
129         @echo 
130         @echo Installation is complete.
131         @echo 
132
133 upgrade: install-exec install-doc
134         @echo
135         @echo Upgrade is complete.
136         @echo
137
138 install-data:
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; \
143         done
144
145 install-data-new:
146         $(srcdir)/mkinstalldirs $(DESTDIR)$(ETC_DIR)/
147         $(INSTALL_DATA) $(srcdir)/citadel.rc $(DESTDIR)$(ETC_DIR)/citadel.rc
148
149 install-doc:
150         @$(srcdir)/mkinstalldirs $(DESTDIR)$(prefix)/docs
151
152 install-doc-new:
153         @$(srcdir)/mkinstalldirs $(DESTDIR)$(DOC_DIR)/docs
154
155 install-exec: all
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; \
160                 fi \
161         done
162
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; \
169                 fi \
170         done
171
172 clean:
173         rm -fr locale/*
174         rm -f *.o 
175         rm -f $(CLIENT_TARGETS) 
176
177 cleaner: clean
178         rm -rf $(CLIENT_TARGETS)
179
180 distclean: cleaner
181         find . -name '*~' -o -name '.#*' | xargs rm -f
182         rm -f po/Makefile 
183         rm -f Makefile sysdep.h config.cache config.log config.status *.d 
184
185
186 .c.d:
187         @echo Checking dependencies for $<
188         @$(CC) $(DEPEND_FLAG) $(CPPFLAGS) $< | sed -e 's!$*.o!$*.o $*/.o $@!' > $@
189         @test -s $@ || rm -f $@
190
191 Makefile: $(srcdir)/Makefile.in config.status
192         CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status
193
194 config.status: $(srcdir)/configure
195         $(SHELL) ./config.status --recheck
196
197 $(srcdir)/configure: $(srcdir)/configure.ac $(srcdir)/aclocal.m4
198         cd $(srcdir) && $(AUTOCONF)
199
200 $(srcdir)/aclocal.m4: $(srcdir)/acinclude.m4
201         cd $(srcdir) && $(ACLOCAL)
202
203 buildinfo:
204         echo
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)"
208         echo
209
210 -include $(DEP_FILES)