source: gsdl/trunk/src/corba/Makefile.in@ 15907

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

Moving "lib" directory into "src", to keep all the source code together. Not tested yet.

File size: 3.9 KB
Line 
1###########################################################################
2#
3# Makefile -- src/corba
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-2008 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###########################################################################
26
27GSDL_DIR = ../..
28INDEXERS_DIR = $(GSDL_DIR)/indexers
29PACKAGES_DIR = $(GSDL_DIR)/packages
30COLSERVR_DIR = $(GSDL_DIR)/src/colservr
31PROTOCOL_DIR = $(GSDL_DIR)/src/protocol
32RECPT_DIR = $(GSDL_DIR)/src/recpt
33
34
35ENABLE_ACCENTFOLD = @ENABLE_ACCENTFOLD@
36ifeq ($(ENABLE_ACCENTFOLD), 1)
37ACCENTFOLD_LIBS = $(INDEXERS_DIR)/packages/unac/libunac.a
38else
39ACCENTFOLD_LIBS =
40endif
41
42USE_SQLITE = @USE_SQLITE@
43ifeq ($(USE_SQLITE), 1)
44SQLITE_LIBS = $(PACKAGES_DIR)/sqlite/lib/libsqlite3.a -ldl -lpthread
45else
46SQLITE_LIBS =
47endif
48
49MICO_DIR = @MICO_DIR@
50MICO_VER = @MICO_VER@
51ifeq ($(MICO_DIR), default)
52MICO_INCLUDES = -I$(PACKAGES_DIR)/mico/mico/include
53MICO_PATH = $(PACKAGES_DIR)/mico/bin/
54else
55ifeq ($(MICO_DIR), yes)
56MICO_INCLUDES =
57else
58MICO_INCLUDES = -I$(MICO_DIR)
59endif
60MICO_PATH =
61endif
62
63USE_CORBA = @USE_CORBA@
64ifeq ($(USE_CORBA), 1)
65AR = ar
66CC = @CC@
67CFLAGS = @CFLAGS@
68DEFS = @DEFS@ -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DGSDLSERVER
69INCLUDES = -I$(GSDL_DIR)/src/lib -I$(COLSERVR_DIR) -I$(PROTOCOL_DIR) -I$(RECPT_DIR) -I$(INDEXERS_DIR)/mgpp/text \
70 $(MICO_INCLUDES)
71INSTALL = @INSTALL@
72LDFLAGS = @LDFLAGS@
73LIBS = @LIBS@ @GDBM_LIBPATH@ -lgdbm -L$(PACKAGES_DIR)/expat/lib -lexpat $(ACCENTFOLD_LIBS) \
74 $(SQLITE_LIBS) -L$(PACKAGES_DIR)/mico/lib -lmico$(MICO_VER)
75RANLIB = @RANLIB@
76
77
78COMPILE = $(MICO_PATH)mico-c++ -x c++ $(CFLAGS) $(DEFS) $(INCLUDES) -c
79LINK = $(MICO_PATH)mico-ld $(LDFLAGS) -o $@
80
81
82.SUFFIXES: .mpp .o
83.mpp.o:
84 $(COMPILE) $<
85
86
87SOURCES = \
88 corbaconv_text_t.mpp \
89 corbaiface.mpp \
90 corbaiface_skel.mpp \
91 corbaproto.mpp \
92 corbatext_t.mpp
93
94OBJECTS = \
95 corbaconv_text_t.o \
96 corbaiface.o \
97 corbaiface_skel.o \
98 corbaproto.o \
99 corbatext_t.o
100
101CORBASERVER_OBJECTS = \
102 corbaServer.o
103
104CORBARECPT_OBJECTS = \
105 corbaclient.o
106
107GSDL_LIBS = \
108 $(RECPT_DIR)/gsdlrecpt.a \
109 $(PROTOCOL_DIR)/gsdlprotocol.a \
110 $(COLSERVR_DIR)/gsdlcolservr.a \
111 $(INDEXERS_DIR)/mg/src/text/libmgtext.a \
112 $(INDEXERS_DIR)/mg/lib/libmglib.a \
113 $(INDEXERS_DIR)/mgpp/text/libmgpptext.a \
114 $(INDEXERS_DIR)/mgpp/lib/libmgpplib.a \
115 $(GSDL_DIR)/src/lib/gsdllib.a
116
117CORBASERVER_EXECUTABLE_OBJECTS = \
118 $(OBJECTS) \
119 $(CORBASERVER_OBJECTS) \
120 $(GSDL_LIBS)
121
122CORBARECPT_EXECUTABLE_OBJECTS = \
123 $(OBJECTS) \
124 $(CORBARECPT_OBJECTS) \
125 $(GSDL_LIBS)
126
127EXECUTABLES = corbaserver corbarecptldd
128
129
130# Default target: make both corbaserver and corbarecptldd
131all: $(EXECUTABLES)
132
133corbaserver: $(CORBASERVER_EXECUTABLE_OBJECTS)
134 $(LINK) $(CORBASERVER_EXECUTABLE_OBJECTS) $(LIBS)
135
136corbarecptldd: $(CORBARECPT_EXECUTABLE_OBJECTS)
137 $(LINK) $(CORBARECPT_EXECUTABLE_OBJECTS) $(LIBS)
138
139install:
140
141clean:
142 rm -f $(OBJECTS) $(CORBASERVER_OBJECTS) $(CORBARECPT_OBJECTS) $(EXECUTABLES)
143
144distclean:
145 rm -f $(OBJECTS) $(CORBASERVER_OBJECTS) $(CORBARECPT_OBJECTS) $(EXECUTABLES) Makefile
146
147depend:
148 makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) -- $(SOURCES)
149
150else
151all:
152install:
153clean:
154distclean:
155depend:
156endif
Note: See TracBrowser for help on using the repository browser.