source: main/trunk/greenstone2/common-src/indexers/mg/lib/Makefile.in@ 22058

Last change on this file since 22058 was 22058, checked in by ak19, 14 years ago

Changes to makefiles to 1. incorporate USE_GDBM and USE_JDBM flags (and USE_SQLITE) in most places so that the DEFINES variable is set at all times. This is necessary to ensure that all classes that contain objects with gdbm and jdbm members are of a consistent size. Else we've had experience with Greenstone crashing with memory errors (to do with the similar ENABLE_indexer flags). 2. ENABLE_JDBM is now USE_JDBM. 3. Not everything works now. It still compiles the default way, but the disable-gdbm flag is causing trouble when compiling argdb in recpt since it uses that.

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 5.3 KB
Line 
1###########################################################################
2#
3# Makefile.in -- Makefile for the general purpose library
4# Copyright (C) 1994 Neil Sharman; (C) 1995 Tim Shimmin
5#
6# This program is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation; either version 2 of the License, or
9# (at your option) any later version.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with this program; if not, write to the Free Software
18# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19#
20# @(#)Makefile.in 1.3 16 Mar 1994
21#
22###########################################################################
23
24
25PACKAGE = @PACKAGE@
26VERSION = @VERSION@
27
28SHELL = /bin/sh
29srcdir = @srcdir@
30subdir = lib
31VPATH = @srcdir@
32
33USE_GDBM = @USE_GDBM@
34ifeq ($(USE_GDBM), 1)
35GDBM_DEFINES = -DUSE_GDBM
36else
37GDBM_DEFINES =
38endif
39
40USE_JDBM = @USE_JDBM@
41ifeq ($(USE_JDBM), 1)
42JDBM_DEFINES = -DUSE_JDBM
43else
44JDBM_DEFINES =
45endif
46
47USE_SQLITE = @USE_SQLITE@
48ifeq ($(USE_SQLITE), 1)
49SQLITE_DEFINES = -DUSE_SQLITE
50else
51SQLITE_DEFINES =
52endif
53
54AR = ar
55CC = @CC@
56CFLAGS = @CFLAGS@ @COMPAT32BITFLAGS@ -fpic
57DEFS = @DEFS@ $(GDBM_DEFINES) $(JDBM_DEFINES) $(SQLITE_DEFINES)
58RANLIB = @RANLIB@
59
60##########################################
61# Uncomment for compiling for the nzdl project
62#
63CFLAGS = @CFLAGS@ @COMPAT32BITFLAGS@ -DQUIET -fpic
64##########################################
65
66
67prefix = @prefix@
68datadir = $(prefix)/share
69localedir = $(datadir)/locale
70
71COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CFLAGS)
72
73.SUFFIXES:
74.SUFFIXES: .c .o
75.c.o:
76 $(COMPILE) $<
77
78ANSI2KNR = @ANSI2KNR@
79o = .@U@o
80
81.SUFFIXES: ._c ._o
82.c._c:
83 ./ansi2knr $< > $*.tmp && mv $*.tmp $@
84._c._o:
85 @echo $(COMPILE) $<
86 @rm -f _$*.c
87 @ln $< _$*.c && $(COMPILE) _$*.c && mv _$*.o $@ && rm _$*.c
88.c._o:
89 ./ansi2knr $< > $*.tmp && mv $*.tmp $*._c
90 @echo $(COMPILE) $*._c
91 @rm -f _$*.c
92 @ln $*._c _$*.c && $(COMPILE) _$*.c && mv _$*.o $@ && rm _$*.c
93
94
95INCLUDES = -I../../.. -I.. -I$(srcdir)
96
97HEADERS = \
98 bitio_m_random.h filestats.h local_strings.h lovinstem.h \
99 bitio_m_stdio.h getopt.h memlib.h \
100 bitio_gen.h bitio_mem.h mgheap.h messages.h \
101 bitio_m.h bitio_mems.h huffman.h timing.h \
102 bitio_m_mem.h bitio_random.h huffman_mem.h perf_hash.h \
103 bitio_m_mems.h bitio_stdio.h huffman_stdio.h sptree.h \
104 pathmax.h getpagesize.h \
105 random.h simplefrenchstem.h unitool.h longlong.h
106# regex.h rx.h
107
108
109SOURCES = \
110 bitio_random.c mgheap.c memlib.c \
111 bitio_stdio.c huffman.c messages.c \
112 bitio_gen.c filestats.c huffman_mem.c perf_hash.c \
113 bitio_mem.c getopt.c huffman_stdio.c sptree.c \
114 bitio_mems.c getopt1.c local_strings.c lovinstem.c \
115 timing.c \
116 alloca.c error.c xmalloc.c strstr.c \
117 gmalloc.c ftruncate.c strcasecmp.c random.c \
118 simplefrenchstem.c unitool.c
119# regex.c rx.c
120
121OBJECTS = @ALLOCA@ @LIBOBJS@ \
122 bitio_random$o mgheap$o memlib$o \
123 bitio_stdio$o huffman$o messages$o \
124 bitio_gen$o filestats$o huffman_mem$o perf_hash$o \
125 bitio_mem$o getopt$o huffman_stdio$o sptree$o \
126 bitio_mems$o getopt1$o local_strings$o lovinstem$o \
127 timing$o \
128 error$o xmalloc$o \
129 random$o simplefrenchstem$o \
130 unitool$o
131# gmalloc$o regex$o rx$o
132
133LIB_OBJECTS = \
134 bitio_random$o mgheap$o memlib$o \
135 bitio_stdio$o huffman$o \
136 bitio_gen$o filestats$o huffman_mem$o perf_hash$o \
137 bitio_mem$o getopt$o huffman_stdio$o sptree$o \
138 bitio_mems$o getopt1$o local_strings$o lovinstem$o \
139 timing$o \
140 error$o xmalloc$o \
141 random$o simplefrenchstem$o \
142 unitool$o
143
144
145DISTFILES = Makefile.in $(HEADERS) $(SOURCES)
146
147all : libmglib.a gsdllibmg.a
148
149libmglib.a : $(OBJECTS)
150 rm -f libmglib.a
151 $(AR) cru libmglib.a $(OBJECTS)
152 $(RANLIB) libmglib.a
153
154$(OBJECTS): ../config.h
155
156gsdllibmg.a: $(LIB_OBJECTS)
157 rm -f gsdllibmg.a
158 $(AR) cru gsdllibmg.a $(LIB_OBJECTS)
159 $(RANLIB) gsdllibmg.a
160
161
162install:
163installdirs:
164uninstall:
165execinstall:
166execuninstall:
167maninstall:
168manuninstall:
169
170dist: $(DISTFILES)
171 for file in $(DISTFILES); do \
172 ln $$file $(distdir) 2> /dev/null \
173 || cp -p $$file $(distdir); \
174 done
175
176mostlyclean:
177 rm -f *.o *_.o
178
179clean: mostlyclean
180 rm -f libmglib.a gsdllibmg.a
181
182distclean: clean
183 rm -f Makefile
184
185maintainer-clean: distclean
186 @echo "This command is intended only for maintainers to use;"
187 @echo "rebuilding the deleted files may require special tools."
188
189#Makefile: Makefile.in ../../../config.status
190# cd ../../.. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
191
192# Tell versions [3.59,3.63) of GNU make not to export all variables.
193# Otherwise a system limit (for SysV at least) may be exceeded.
194.NOEXPORT:
Note: See TracBrowser for help on using the repository browser.