Makefile.in 10.8 KB
Newer Older
Per Cederqvist's avatar
Per Cederqvist committed
1
#
David Byers's avatar
David Byers committed
2
# Generated from: Makefile.src,v 1.30 1997/09/13 15:31:45 byers Exp 
Per Cederqvist's avatar
Per Cederqvist committed
3
# Copyright (C) 1991, 1993, 1994, 1995, 1996  Lysator Academic Computer Association.
Per Cederqvist's avatar
Per Cederqvist committed
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#
# This file is part of the LysKOM server.
# 
# LysKOM is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by 
# the Free Software Foundation; either version 1, or (at your option) 
# any later version.
# 
# LysKOM is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for more details.
# 
# You should have received a copy of the GNU General Public License
# along with LysKOM; see the file COPYING.  If not, write to
# Lysator, c/o ISY, Linkoping University, S-581 83 Linkoping, SWEDEN,
# or the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, 
# MA 02139, USA.
#
# Please mail bug reports to bug-lyskom@lysator.liu.se. 
#
Per Cederqvist's avatar
Per Cederqvist committed
25
# Begin LK_STD
Per Cederqvist's avatar
Per Cederqvist committed
26
27
srcdir = @srcdir@
VPATH = @srcdir@
Per Cederqvist's avatar
Per Cederqvist committed
28
29
30
31
32
33
34
35
SHELL = /bin/sh

all: includes binaries

AWK = @AWK@
CC = @CC@
CFLAGS = @CFLAGS@
ALL_CFLAGS = @INCLUDE_CURRENT@ -I@srcdir@ -I@BUILDTOPDIR@/include \
Per Cederqvist's avatar
Per Cederqvist committed
36
	$(DEFS) $(CFLAGS)
Per Cederqvist's avatar
Per Cederqvist committed
37
38
39
40
41
42
43

DEPENDFLAG = @DEPENDFLAG@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
LEX = @LEX@
MKDIR = mkdir
Per Cederqvist's avatar
Per Cederqvist committed
44
PURIFY = @PURIFY@
Per Cederqvist's avatar
Per Cederqvist committed
45
46
47
48
49
50
51
52
53
RANLIB = @RANLIB@
RM = rm -f
SED = @SED@
SYMLINK = @LN_S@
TOUCHLIB = @RANLIB@
YACC = @YACC@

INCLUDEDIR = @BUILDTOPDIR@/include
LIBDIR = @BUILDTOPDIR@/lib
Per Cederqvist's avatar
Per Cederqvist committed
54
55
prefix = @prefix@
exec_prefix = @exec_prefix@
Per Cederqvist's avatar
Per Cederqvist committed
56
57
58
59
60
61
62
bindir = $(exec_prefix)/bin
dbdir = $(exec_prefix)/db
etcdir = $(exec_prefix)/etc
coredir = $(exec_prefix)/cores

DEFS = @DEFS@
LDFLAGS = @LDFLAGS@
Per Cederqvist's avatar
Per Cederqvist committed
63
CPPFLAGS = @CPPFLAGS@
Per Cederqvist's avatar
Per Cederqvist committed
64
65
66
67
SCRIPTDIR = @SRCTOPDIR@/scripts

.c.o:
	$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
Per Cederqvist's avatar
Per Cederqvist committed
68
69
70

FORCE:

Per Cederqvist's avatar
Per Cederqvist committed
71
# END section from LK_STD
Per Cederqvist's avatar
Per Cederqvist committed
72

73

Per Cederqvist's avatar
Per Cederqvist committed
74
LIBS = @LIBS@
75
76
BISON = @BISON@
FLEX = @FLEX@
Per Cederqvist's avatar
Per Cederqvist committed
77
KOMLIBS = $(LIBDIR)/libisc-new$(PROFILE-LIB-SUFFIX).a \
78
79
	$(LIBDIR)/libmisc$(PROFILE-LIB-SUFFIX).a \
	$(LIBDIR)/liblyskom-server$(PROFILE-LIB-SUFFIX).a \
Per Cederqvist's avatar
Per Cederqvist committed
80
81
	$(LIBDIR)/libregex.a \
	$(LIBDIR)/libansi$(PROFILE-LIB-SUFFIX).a
Per Cederqvist's avatar
Per Cederqvist committed
82

Per Cederqvist's avatar
Per Cederqvist committed
83
84
MALLOCLIB=`if [ "@GNUMALLOC@" = gnumalloc ];then echo $(LIBDIR)/libgmalloc$(PROFILE-LIB-SUFFIX).a;fi`

Per Cederqvist's avatar
Per Cederqvist committed
85
86
87
88
89
90
91
92
93
# Files that implements protocol A.
PROTA =  prot-a-output.o prot-a-parse-arg.o prot-a-parse.o prot-a.o \
	 prot-a-send-async.o

MUX = mux.o mux-parse.o

# Implementations of the atomic calls.

ATOMS = text.o membership.o person.o conference.o session.o admin.o \
94
	regex-match.o aux-items.o
Per Cederqvist's avatar
Per Cederqvist committed
95
96
97
98
99
100

# These files are needed by all versions of the LysKOM server.
GENOBJS = connections.o log.o $(ATOMS) \
          kom-types.o \
          send-async.o server-config.o text-garb.o \
          isc-parse.o memory.o $(PROTA) $(MUX) \
101
	  internal-connections.o rfc931.o isc-malloc.o \
102
	  conf-file.o local-to-global.o 
103

Per Cederqvist's avatar
Per Cederqvist committed
104
105
106
107

# Files for lyskomd.

DISKOBJS = ramkomd.o ram-smalloc.o simple-cache.o ram-parse.o ram-output.o \
108
109
	disk-end-of-atomic.o cache-node.o string-malloc.o version-info.o \
        aux-item-def.tab.o aux-item-def.lex.o
Per Cederqvist's avatar
Per Cederqvist committed
110

Per Cederqvist's avatar
Per Cederqvist committed
111
# Files for dbck.
Per Cederqvist's avatar
Per Cederqvist committed
112

Per Cederqvist's avatar
Per Cederqvist committed
113
GETOPT = getopt.o getopt1.o
Per Cederqvist's avatar
Per Cederqvist committed
114
115
DBCK = dbck.o dbck-cache.o ram-smalloc.o ram-parse.o server-config.o\
	kom-types.o\
Per Cederqvist's avatar
Per Cederqvist committed
116
	ram-output.o memory.o conf-file.o $(GETOPT) version-info.o
Per Cederqvist's avatar
Per Cederqvist committed
117

Per Cederqvist's avatar
Per Cederqvist committed
118
119
# Files for encrypt (a program to transform the database from unencrypted
# apasswords to encrypted).  No longer supported.
Per Cederqvist's avatar
Per Cederqvist committed
120

Per Cederqvist's avatar
Per Cederqvist committed
121
122
ENCRYPT = encrypt-passwd.o dbck-cache.o ram-smalloc.o ram-parse.o \
	server-config.o\
Per Cederqvist's avatar
Per Cederqvist committed
123
124
125
	kom-types.o\
	ram-output.o memory.o

Per Cederqvist's avatar
Per Cederqvist committed
126
C_SPECIALS = prot-a-parse-arg.c version-info.c
Per Cederqvist's avatar
Per Cederqvist committed
127

Per Cederqvist's avatar
Per Cederqvist committed
128
129
SPECIALS = call-switch.incl com.h fnc-def-init.incl \
	prot-a-parse-arg.h fncdef-no-str-limit.txt .gdbinit \
Per Cederqvist's avatar
Per Cederqvist committed
130
	version.incl \
Per Cederqvist's avatar
Per Cederqvist committed
131
	$(C_SPECIALS)
Per Cederqvist's avatar
Per Cederqvist committed
132

Per Cederqvist's avatar
Per Cederqvist committed
133
PROGRAMS = lyskomd dbck updateLysKOM
Per Cederqvist's avatar
Per Cederqvist committed
134

Per Cederqvist's avatar
Per Cederqvist committed
135
lyskomd: $(DISKOBJS) $(GENOBJS) $(KOMLIBS)
Per Cederqvist's avatar
Per Cederqvist committed
136
137
	$(PURIFY) $(CC) $(LDFLAGS) -o lyskomd $(DISKOBJS) $(GENOBJS) \
		$(KOMLIBS) \
Per Cederqvist's avatar
Per Cederqvist committed
138
		$(MALLOCLIB) $(LIBS)
Per Cederqvist's avatar
Per Cederqvist committed
139

Per Cederqvist's avatar
Per Cederqvist committed
140
updateLysKOM: updateLysKOM.o $(KOMLIBS)
Per Cederqvist's avatar
Per Cederqvist committed
141
	$(PURIFY) $(CC) $(LDFLAGS) -o updateLysKOM updateLysKOM.o $(KOMLIBS) \
Per Cederqvist's avatar
Per Cederqvist committed
142
		$(MALLOCLIB) $(LIBS)
Per Cederqvist's avatar
Per Cederqvist committed
143

Per Cederqvist's avatar
Per Cederqvist committed
144
encrypt: $(ENCRYPT) $(KOMLIBS)
Per Cederqvist's avatar
Per Cederqvist committed
145
146
	$(CC) $(LDFLAGS) -o enrypt $(ENCRYPT) $(KOMLIBS) \
		$(MALLOCLIB) $(LIBS)
Per Cederqvist's avatar
Per Cederqvist committed
147

Per Cederqvist's avatar
Per Cederqvist committed
148
dbck: $(DBCK) $(KOMLIBS)
Per Cederqvist's avatar
Per Cederqvist committed
149
	$(PURIFY) $(CC) $(LDFLAGS) -o dbck $(DBCK) $(KOMLIBS) \
Per Cederqvist's avatar
Per Cederqvist committed
150
		$(MALLOCLIB) $(LIBS)
Per Cederqvist's avatar
Per Cederqvist committed
151
152

call-switch.incl: call-switch.awk fncdef-no-str-limit.txt
Per Cederqvist's avatar
Per Cederqvist committed
153
154
	$(AWK) -f $(srcdir)/call-switch.awk fncdef-no-str-limit.txt \
		> call-switch.incl
Per Cederqvist's avatar
Per Cederqvist committed
155
156

com.h: com-h.awk fncdef-no-str-limit.txt
Per Cederqvist's avatar
Per Cederqvist committed
157
	$(AWK) -f $(srcdir)/com-h.awk fncdef-no-str-limit.txt > com.h
Per Cederqvist's avatar
Per Cederqvist committed
158
159

fnc-def-init.incl: fnc-def-init.awk fncdef-no-str-limit.txt
Per Cederqvist's avatar
Per Cederqvist committed
160
161
	$(AWK) -f $(srcdir)/fnc-def-init.awk fncdef-no-str-limit.txt \
		> fnc-def-init.incl
Per Cederqvist's avatar
Per Cederqvist committed
162

163
aux-item-def.tab.c: aux-item-def.y
164
	$(BISON) -d -p aux_item_def_ -o aux-item-def.tab.c aux-item-def.y
165
166
167
168

aux-item-def.lex.c: aux-item-def.l
	$(FLEX) -oaux-item-def.lex.c aux-item-def.l

Per Cederqvist's avatar
Per Cederqvist committed
169
prot-a-parse-arg.c: prot-a-parse-arg-c.awk fncdef.txt prot-a-parse-arg.h
Per Cederqvist's avatar
Per Cederqvist committed
170
171
	$(AWK) -f $(srcdir)/prot-a-parse-arg-c.awk $(srcdir)/fncdef.txt \
		> prot-a-parse-arg.c
Per Cederqvist's avatar
Per Cederqvist committed
172
173

prot-a-parse-arg.h: prot-a-parse-arg-h.awk fncdef-no-str-limit.txt
Per Cederqvist's avatar
Per Cederqvist committed
174
175
	$(AWK) -f $(srcdir)/prot-a-parse-arg-h.awk \
		fncdef-no-str-limit.txt > prot-a-parse-arg.h
Per Cederqvist's avatar
Per Cederqvist committed
176
177
178

fncdef-no-str-limit.txt: fncdef.txt
	(echo \# Do not edit this file! It is generated from fncdef.txt.;\
Per Cederqvist's avatar
Per Cederqvist committed
179
180
	  cat $(srcdir)/fncdef.txt) \
	| sed 's/([^)]*)//g' > fncdef-no-str-limit.txt
Per Cederqvist's avatar
Per Cederqvist committed
181

Per Cederqvist's avatar
Per Cederqvist committed
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
version.incl: @SRCTOPDIR@/versions
	echo '/* Do not edit -- automaticaly generated file */'     > $@.tmp
	sed -n 's/SERVER-COMPAT-VERSION: //p' @SRCTOPDIR@/versions  >>$@.tmp
	echo '/* Do not edit -- automaticaly generated file */'     >>$@.tmp
	mv $@.tmp $@

version-info.c: @SRCTOPDIR@/versions
	echo '/* Do not edit -- automaticaly generated file */'    > $@.tmp
	echo '#include <limits.h>'                                 >>$@.tmp
	echo '#include <sys/types.h>'                              >>$@.tmp
	echo '#include "misc-types.h"'                             >>$@.tmp
	echo '#include "s-string.h"'                               >>$@.tmp
	echo '#include "kom-types.h"'                              >>$@.tmp
	echo '#include "version-info.h"'                           >>$@.tmp
	echo 'Version_info_internal kom_version_info = {'          >>$@.tmp
	sed -n 's/PROTOCOL-A-LEVEL: \(.*\)/    \1,/p' \
		@SRCTOPDIR@/versions                               >>$@.tmp
	sed -n 's/SERVER-SOFTWARE: \(.*\)/    "\1",/p' \
		@SRCTOPDIR@/versions                               >>$@.tmp
	sed -n 's/SERVER-VERSION: \(.*\)/    "\1"/p' \
		@SRCTOPDIR@/versions                               >>$@.tmp
	echo '};'                                                  >>$@.tmp
	echo '/* Do not edit -- automaticaly generated file */'    >>$@.tmp
	mv $@.tmp $@

Per Cederqvist's avatar
Per Cederqvist committed
207
208
209
.gdbinit: Makefile
	$(RM) -f .gdbinit
	echo handle 13 nostop noprint 			>.gdbinit
Per Cederqvist's avatar
Per Cederqvist committed
210
211
	echo dir @SRCTOPDIR@/src/libraries/libcommon	>>.gdbinit
	echo dir @SRCTOPDIR@/src/libraries/libansi	>>.gdbinit
Per Cederqvist's avatar
Per Cederqvist committed
212
	echo dir @SRCTOPDIR@/src/libraries/libisc-new	>>.gdbinit
Per Cederqvist's avatar
Per Cederqvist committed
213
	echo dir @SRCTOPDIR@/src/libraries/libmisc	>>.gdbinit
Per Cederqvist's avatar
Per Cederqvist committed
214
	echo dir @SRCTOPDIR@/src/libraries/gnumalloc	>>.gdbinit
Per Cederqvist's avatar
Per Cederqvist committed
215

Per Cederqvist's avatar
Per Cederqvist committed
216
217
tags:
	$(RM) TAGS
218
	etags $(INCLUDEDIR)/*.h $(srcdir)/*.h \
Per Cederqvist's avatar
Per Cederqvist committed
219
220
		@SRCTOPDIR@/src/libraries/libisc-new/src/*.h \
		@SRCTOPDIR@/src/libraries/lib*/*.h \
221
		$(srcdir)/*.c \
Per Cederqvist's avatar
Per Cederqvist committed
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
		@SRCTOPDIR@/src/libraries/libisc-new/src/*.c \
		@SRCTOPDIR@/src/libraries/lib*/*.c

server-config.o: Makefile
	$(CC) -c $(CPPFLAGS) -DDEFAULT_PREFIX='"$(prefix)"' $(ALL_CFLAGS) \
		$(srcdir)/server-config.c

updateLysKOM.o: Makefile
	$(CC) -c $(CPPFLAGS) -DDEFAULT_PREFIX='"$(prefix)"' $(ALL_CFLAGS) \
		$(srcdir)/updateLysKOM.c

INSTALL-HDRS = com.h
HDRS-DIR =$(INCLUDEDIR)


Per Cederqvist's avatar
Per Cederqvist committed
237
.PHONY: includes
Per Cederqvist's avatar
Per Cederqvist committed
238
includes: $(INSTALL-HDRS) FORCE
Per Cederqvist's avatar
Per Cederqvist committed
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
	test -d $(HDRS-DIR) || $(MKDIR) $(HDRS-DIR)
	for i in $(INSTALL-HDRS) ; \
	do if ( cmp $$i $(HDRS-DIR)/$$i 2>/dev/null ) ; then\
             true; else\
		$(RM) $(HDRS-DIR)/$$i;\
		if $(INSTALL_DATA) $$i $(HDRS-DIR)/$$i;\
		then true ; else exit 1; fi; fi;\
	done
	@for i in DuMmY $(SUBDIRS); do \
		if test -f $$i/Makefile ; then \
			echo making includes in directory $$i; \
			if (cd ./$$i; $(MAKE) includes); \
			then true; else exit 1; fi ; \
		else true; fi; \
	done

.PHONY: libraries
Per Cederqvist's avatar
Per Cederqvist committed
256
libraries:  FORCE
Per Cederqvist's avatar
Per Cederqvist committed
257
258
259
260
261
262
263
264
265
	@for i in DuMmY $(SUBDIRS); do \
		if test -f $$i/Makefile ; then \
			echo making libraries in directory $$i; \
			if (cd ./$$i; $(MAKE) libraries); \
			then true; else exit 1; fi ; \
		else true; fi; \
	done

.PHONY: binaries
Per Cederqvist's avatar
Per Cederqvist committed
266
binaries: $(PROGRAMS) FORCE
Per Cederqvist's avatar
Per Cederqvist committed
267
268
269
270
271
272
273
274
275
	@for i in DuMmY $(SUBDIRS); do \
		if test -f $$i/Makefile ; then \
			echo making binaries in directory $$i; \
			if (cd ./$$i; $(MAKE) binaries); \
			then true; else exit 1; fi ; \
		else true; fi; \
	done

.PHONY: install
Per Cederqvist's avatar
Per Cederqvist committed
276
install: $(PROGRAMS) FORCE
Per Cederqvist's avatar
Per Cederqvist committed
277
278
279
280
281
282
283
284
285
286
287
288
289
290
	for i in $(PROGRAMS); do \
	    $(INSTALL_PROGRAM) $$i $(bindir)/$$i; \
	done
	@for i in DuMmY $(SUBDIRS); do \
		if test -f $$i/Makefile ; then \
			echo making install in directory $$i; \
			if (cd ./$$i; $(MAKE) install); \
			then true; else exit 1; fi ; \
		else true; fi; \
	done

dependencies:
	touch dependencies

Per Cederqvist's avatar
Per Cederqvist committed
291
292
include dependencies

Per Cederqvist's avatar
Per Cederqvist committed
293
.PHONY: depend
Per Cederqvist's avatar
Per Cederqvist committed
294
depend: $(SPECIALS) FORCE
Per Cederqvist's avatar
Per Cederqvist committed
295
296
297
298
299
300
301
302
303
304
305
	$(CC) $(DEPENDFLAG) $(ALL_CFLAGS) $(srcdir)/*.c $(C_SPECIALS) \
		>dependencies
	@for i in DuMmY $(SUBDIRS); do \
		if test -f $$i/Makefile ; then \
			echo making depend in directory $$i; \
			if (cd ./$$i; $(MAKE) depend); \
			then true; else exit 1; fi ; \
		else true; fi; \
	done

# Output from LK_CLEAN
Per Cederqvist's avatar
Per Cederqvist committed
306
GENERIC-MOSTLYCLEAN = *.o lib*.a core Makefile.in2 *.tmp $(SCRIPTS) $(PROGRAMS)
Per Cederqvist's avatar
Per Cederqvist committed
307
GENERIC-PURE = Makefile.in configure
Per Cederqvist's avatar
Per Cederqvist committed
308
GENERIC-DISTCLEAN = *~ .\#* TAGS dependencies Makefile config.log config.cache
Per Cederqvist's avatar
Per Cederqvist committed
309
.PHONY: mostlyclean
Per Cederqvist's avatar
Per Cederqvist committed
310
mostlyclean: domostlyclean FORCE
Per Cederqvist's avatar
Per Cederqvist committed
311
312
313
314
315
316
317
318
319
	@for i in DuMmY $(SUBDIRS); do \
		if test -f $$i/Makefile ; then \
			echo making mostlyclean in directory $$i; \
			if (cd ./$$i; $(MAKE) mostlyclean); \
			then true; else exit 1; fi ; \
		else true; fi; \
	done

.PHONY: clean
Per Cederqvist's avatar
Per Cederqvist committed
320
clean: doclean FORCE
Per Cederqvist's avatar
Per Cederqvist committed
321
322
323
324
325
326
327
328
329
	@for i in DuMmY $(SUBDIRS); do \
		if test -f $$i/Makefile ; then \
			echo making clean in directory $$i; \
			if (cd ./$$i; $(MAKE) clean); \
			then true; else exit 1; fi ; \
		else true; fi; \
	done

.PHONY: distclean
Per Cederqvist's avatar
Per Cederqvist committed
330
distclean: dodistclean FORCE
Per Cederqvist's avatar
Per Cederqvist committed
331
332
333
334
335
336
337
338
339
	@for i in DuMmY $(SUBDIRS); do \
		if test -f $$i/Makefile ; then \
			echo making distclean in directory $$i; \
			if (cd ./$$i; $(MAKE) distclean); \
			then true; else exit 1; fi ; \
		else true; fi; \
	done

.PHONY: realclean
Per Cederqvist's avatar
Per Cederqvist committed
340
realclean: dorealclean FORCE
Per Cederqvist's avatar
Per Cederqvist committed
341
342
343
344
345
346
347
348
349
	@for i in DuMmY $(SUBDIRS); do \
		if test -f $$i/Makefile ; then \
			echo making realclean in directory $$i; \
			if (cd ./$$i; $(MAKE) realclean); \
			then true; else exit 1; fi ; \
		else true; fi; \
	done

.PHONY: pure
Per Cederqvist's avatar
Per Cederqvist committed
350
pure: dopure FORCE
Per Cederqvist's avatar
Per Cederqvist committed
351
352
353
354
355
356
357
	@for i in DuMmY $(SUBDIRS); do \
		if test -f $$i/Makefile ; then \
			echo making pure in directory $$i; \
			if (cd ./$$i; $(MAKE) pure); \
			then true; else exit 1; fi ; \
		else true; fi; \
	done
Per Cederqvist's avatar
Per Cederqvist committed
358

Per Cederqvist's avatar
Per Cederqvist committed
359
dopure: dorealclean
Per Cederqvist's avatar
Per Cederqvist committed
360
361
362
363
	$(RM) $(GENERIC-PURE)

dorealclean: dodistclean

Per Cederqvist's avatar
Per Cederqvist committed
364
365
dodistclean: doclean
	$(RM) $(GENERIC-DISTCLEAN)
Per Cederqvist's avatar
Per Cederqvist committed
366

Per Cederqvist's avatar
Per Cederqvist committed
367
doclean: domostlyclean
Per Cederqvist's avatar
Per Cederqvist committed
368

Per Cederqvist's avatar
Per Cederqvist committed
369
370
domostlyclean:
	$(RM) $(GENERIC-MOSTLYCLEAN)
Per Cederqvist's avatar
Per Cederqvist committed
371
372
	$(RM) $(SPECIALS)
	$(RM) com.h
Per Cederqvist's avatar
Per Cederqvist committed
373

Per Cederqvist's avatar
Per Cederqvist committed
374
# End output from LK_CLEAN
Per Cederqvist's avatar
Per Cederqvist committed
375