source: gsdl/trunk/packages/Makefile.in@ 15815

Last change on this file since 15815 was 15815, checked in by mdewsnip, 16 years ago

(Adding new DB support) Now only compiles SQLite if it has been enabled.

  • Property svn:keywords set to Author Date Id Revision
File size: 3.3 KB
Line 
1###########################################################################
2#
3# Makefile -- Makefile for packages included with Greenstone
4#
5# A component of the Greenstone digital library software
6# from the New Zealand Digital Library Project at the
7# University of Waikato, New Zealand.
8#
9# Copyright (C) 2000 New Zealand Digital Library Project
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###########################################################################
26
27
28USE_SQLITE=@USE_SQLITE@
29USE_Z3950=@USE_Z3950@
30USE_YAZ=@USE_YAZ@
31
32ifeq ($(USE_SQLITE), 1)
33SQLITE_DIR = sqlite/sqlite-amalgamation-3.5.9
34else
35SQLITE_DIR =
36endif
37
38ifeq ($(USE_Z3950), 1)
39# make sure USE_YAZ is set
40USE_YAZ=1
41D2M=d2m
42else
43D2M=
44endif
45
46ifeq ($(USE_YAZ), 1)
47# we only compile the src and client dirs for now.
48YAZ=yaz/yaz-2.1.4/src yaz/yaz-2.1.4/client
49else
50YAZ=
51endif
52
53
54USE_CORBA=@USE_CORBA@
55MICO_DIR=@MICO_DIR@
56ifeq ($(USE_CORBA), 1)
57ifeq ($(MICO_DIR), default)
58CORBA="mico/mico"
59else
60CORBA=
61endif
62else
63CORBA=
64endif
65
66# PACKAGEDIRS contains the packages that we want to make and install. It
67# is assumed that each package will have at least four rules: all, install,
68# clean, and distclean.
69PACKAGEDIRS = wv/wv-gs rtftohtml/rtftohtml_src pdftohtml/pdftohtml_gs \
70 wget/wget-1.9 expat/ cpan/XML-Parser-2.34 \
71 $(SQLITE_DIR) $(YAZ) $(D2M) $(CORBA) \
72 xlhtml/xlhtml-0.4.9.0 isis-gdl html-tidy/tidy
73
74
75all:
76 for odir in $(PACKAGEDIRS); do \
77 echo making $@ in $$odir; \
78 (cd $$odir && $(MAKE) $(MDEFINES) $@) || exit 1; \
79 done
80ifeq ($(CORBA), "mico/mico")
81 cd mico/mico; $(MAKE) $(MDEFINES) install
82 mkdir -p ../bin/linux
83 mkdir -p ../lib
84 mkdir -p ../include
85 mkdir -p ../man
86 cp -f mico/bin/* ../bin/linux
87 cp -f mico/lib/* ../lib/
88 cp -fr mico/include/* ../include
89 cp -fr mico/man ../man
90endif
91ifeq ($(USE_YAZ), 1)
92# need to do make install in include and src dirs to get the header files and
93# lib file into the right place
94 cd yaz/yaz-2.1.4/include; $(MAKE) $(MDEFINES) install
95 cd yaz/yaz-2.1.4/src; $(MAKE) $(MDEFINES) install
96endif
97ifeq ($(USE_SQLITE), 1)
98# need to do make install in sqlite to get the header files and library into the right place
99 cd $(SQLITE_DIR) && $(MAKE) $(MDEFINES) install
100endif
101
102
103install:
104 for idir in $(PACKAGEDIRS); do \
105 echo installing $$idir; \
106 (cd $$idir && $(MAKE) install) || exit 1; \
107 done
108
109clean:
110 for subdir in $(PACKAGEDIRS); do \
111 echo cleaning $@ in $$subdir; \
112 (cd $$subdir && $(MAKE) clean || exit 0) ; \
113 done
114
115distclean:
116 for subdir in $(PACKAGEDIRS); do \
117 echo cleaning $@ in $$subdir; \
118 (cd $$subdir && $(MAKE) distclean || exit 0) ; \
119 done
Note: See TracBrowser for help on using the repository browser.