root/main/branches/64_bit_Greenstone/greenstone2/common-src/Makefile.in @ 24031

Revision 22079, 4.5 KB (checked in by ak19, 9 years ago)

1. Missing conditional LIBS or INCLUDES or DIR declaration for when USE_GDBM is switched on. Previously it used to always put these in the includes/libs, not it only does so on USE_GDBM.

  • Property svn:executable set to *
Line 
1###########################################################################
2#
3# Makefile -- common code between gsdl runtime and buildtime
4# A component of the Greenstone digital library software
5# from the New Zealand Digital Library Project at the
6# University of Waikato, New Zealand.
7#
8# Copyright (C) 1999  The New Zealand Digital Library Project
9#
10#
11# This program is free software; you can redistribute it and/or modify
12# it under the terms of the GNU General Public License as published by
13# the Free Software Foundation; either version 2 of the License, or
14# (at your option) any later version.
15#
16# This program is distributed in the hope that it will be useful,
17# but WITHOUT ANY WARRANTY; without even the implied warranty of
18# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19# GNU General Public License for more details.
20#
21# You should have received a copy of the GNU General Public License
22# along with this program; if not, write to the Free Software
23# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24#
25###########################################################################
26srcdir = @srcdir@
27
28PACKAGE = @PACKAGE@
29VERSION = @VERSION@
30
31@SET_MAKE@
32CC = @CC@
33CXX = @CXX@
34CFLAGS = @CFLAGS@
35CXXFLAGS = @CXXFLAGS@
36LIBS   = @LIBS@
37MDEFINES =
38
39GSDLOS = @gsdlos@
40
41COMPILE = $(CC) -c
42
43SOURCES =
44
45OBJECTS =
46
47ALLFILES = $(OBJECTS)
48
49# indexers are treated slightly differently as we don't want to do make all/install for gs2
50INDEXERSDIR = indexers
51
52# all directories should be compiled
53COMPILEDIRS = packages src/lib src/getpw
54
55# a subset of the directories get installed
56INSTALLDIRS = packages src/getpw
57
58
59USE_GDBM=@USE_GDBM@
60ifeq ($(USE_GDBM), 1)
61COMPILEDIRS += src/gdbmedit/txt2db src/gdbmedit/db2txt \
62  src/gdbmedit/gdbmget src/gdbmedit/gdbmset \
63  src/gdbmedit/gdbmkeys src/gdbmedit/gdbmdel
64INSTALLDIRS += src/gdbmedit/db2txt src/gdbmedit/txt2db \
65  src/gdbmedit/gdbmget src/gdbmedit/gdbmset \
66  src/gdbmedit/gdbmkeys src/gdbmedit/gdbmdel
67GDBM_DEFINES = -DUSE_GDBM
68else
69GDBM_DEFINES =
70endif
71
72USE_JDBM=@USE_JDBM@
73ifeq ($(USE_JDBM), 1)
74COMPILEDIRS += src/jdbmedit
75INSTALLDIRS += src/jdbmedit
76JDBM_DEFINES = -DUSE_JDBM
77else
78JDBM_DEFINES =
79endif
80
81USE_SQLITE = @USE_SQLITE@
82ifeq ($(USE_SQLITE), 1)
83SQLITE_DEFINES = -DUSE_SQLITE
84else
85SQLITE_DEFINES =
86endif
87
88MODULEDIRS = @MODULEDIRS@
89DEFS = @DEFS@ $(GDBM_DEFINES) $(JDBM_DEFINES) $(SQLITE_DEFINES)
90
91with-jni without-jni:
92    for odir in $(INDEXERSDIR); do \
93      echo making $@ in $$odir; \
94      (cd $$odir && $(MAKE) $(MDEFINES) $@) || exit 1; \
95    done
96    for odir in $(COMPILEDIRS) $(MODULEDIRS); do \
97      echo making all in $$odir; \
98      (cd $$odir && $(MAKE) $(MDEFINES) all) || exit 1; \
99    done
100
101install-with-jni:
102    for odir in $(INDEXERSDIR); do \
103      echo making $@ in $$odir; \
104      (cd $$odir && $(MAKE) $(MDEFINES) $@) || exit 1; \
105    done
106    if test -e $(INDEXERSDIR)/lucene-gs/LuceneWrapper.jar; then \
107      cp $(INDEXERSDIR)/lucene-gs/LuceneWrapper.jar ../bin/java/.; \
108    fi
109    for idir in $(INSTALLDIRS); do \
110      echo installing $$idir; \
111      (cd $$idir && $(MAKE) install) || exit 1; \
112    done
113
114install-without-jni:
115    for odir in $(INDEXERSDIR); do \
116      echo making $@ in $$odir; \
117      (cd $$odir && $(MAKE) $(MDEFINES) $@) || exit 1; \
118    done
119    if test -e $(INDEXERSDIR)/lucene-gs/LuceneWrapper.jar; then \
120      cp $(INDEXERSDIR)/lucene-gs/LuceneWrapper.jar ../bin/java/.; \
121    fi
122    for odir in $(COMPILEDIRS) $(MODULEDIRS); do \
123      echo making install in $$odir; \
124      (cd $$odir && $(MAKE) $(MDEFINES) install) || exit 1; \
125    done
126
127distclean: clean
128    rm -f Makefile config.cache config.h config.log stamp-h config.status
129    for subdir in $(COMPILEDIRS) $(INDEXERSDIR); do \
130      echo cleaning $@ in $$subdir; \
131      (cd $$subdir && $(MAKE) distclean) || exit 1; \
132    done
133
134clean:
135    for subdir in $(COMPILEDIRS) $(INDEXERSDIR); do \
136      echo cleaning $@ in $$subdir; \
137      (cd $$subdir && $(MAKE) clean) || exit 1; \
138    done
139
140
141# commented out - jrm21 Dec 2004 - can get confused by cvs timestamps
142# (and might run the wrong version of autoconf)
143#
144## For an explanation of the following Makefile rules, see node
145## `Automatic Remaking' in GNU Autoconf documentation.
146#Makefile: Makefile.in config.status
147#   CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
148#config.status: configure
149#   ./config.status --recheck
150#configure: configure.in aclocal.m4
151#   cd $(srcdir) && autoconf
152#
153#config.h: stamp-h
154#stamp-h: config.h.in config.status
155#   CONFIG_FILES= CONFIG_HEADERS=config.h ./config.status
156#config.h.in: stamp-h.in
157#stamp-h.in: configure.in aclocal.m4 acconfig.h
158#   cd $(srcdir) && autoheader
159#   $(TOUCH) $(srcdir)/stamp-h.in
160
161
162
Note: See TracBrowser for help on using the browser.