root/gsdl/trunk/gs2runtime/packages/Makefile @ 16568

Revision 16568, 2.8 KB (checked in by davidb, 12 years ago)

Extra Makefile, configure and supporting files for shared runtime code

Line 
1###########################################################################
2#
3# Makefile -- Makefile for packages included with Greenstone runtime
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_Z3950=0
29USE_YAZ=1
30
31ifeq ($(USE_Z3950), 1)
32# make sure USE_YAZ is set
33USE_YAZ=1
34D2M=d2m
35else
36D2M=
37endif
38
39ifeq ($(USE_YAZ), 1)
40# we only compile the src and client dirs for now.
41YAZ=yaz/yaz-2.1.4/src yaz/yaz-2.1.4/client
42else
43YAZ=
44endif
45
46
47USE_CORBA=0
48MICO_DIR=default
49ifeq ($(USE_CORBA), 1)
50ifeq ($(MICO_DIR), default)
51CORBA="mico/mico"
52else
53CORBA=
54endif
55else
56CORBA=
57endif
58
59# PACKAGEDIRS contains the packages that we want to make and install.  It
60# is assumed that each package will have at least four rules: all, install,
61# clean, and distclean.
62PACKAGEDIRS =   $(YAZ) $(D2M) $(CORBA)
63
64
65all:
66    for odir in $(PACKAGEDIRS); do \
67          echo making $@ in $$odir; \
68          (cd $$odir && $(MAKE) $(MDEFINES) $@) || exit 1; \
69        done
70ifeq ($(CORBA), "mico/mico")
71    cd mico/mico; $(MAKE)  $(MDEFINES) install
72    mkdir -p ../bin/linux
73    mkdir -p ../lib
74    mkdir -p ../include
75    mkdir -p ../man
76    cp -f mico/bin/* ../bin/linux
77    cp -f mico/lib/* ../lib/
78    cp -fr mico/include/* ../include
79    cp -fr mico/man ../man
80endif
81ifeq ($(USE_YAZ), 1)
82# need to do make install in include and src dirs to get the header files and
83# lib file into the right place
84    cd yaz/yaz-2.1.4/include; $(MAKE)  $(MDEFINES) install
85    cd yaz/yaz-2.1.4/src; $(MAKE)  $(MDEFINES) install
86endif
87
88install:
89    for idir in $(PACKAGEDIRS); do \
90          echo installing $$idir; \
91          (cd $$idir && $(MAKE) install) || exit 1; \
92        done
93
94clean:
95    for subdir in $(PACKAGEDIRS); do \
96          echo cleaning $@ in $$subdir; \
97          (cd $$subdir && $(MAKE) clean || exit 0) ; \
98        done
99
100distclean:
101    for subdir in $(PACKAGEDIRS); do \
102          echo cleaning $@ in $$subdir; \
103          (cd $$subdir && $(MAKE) distclean || exit 0) ; \
104        done
Note: See TracBrowser for help on using the browser.