root/gsdl/trunk/runtime-src/src/corba/Makefile.in @ 18026

Revision 18026, 4.1 KB (checked in by mdewsnip, 12 years ago)

Fixing Makefile to work with source code splitting -- why am I doing this???

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