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 |
|
---|
27 | GSDL_DIR = ../..
|
---|
28 | INDEXERS_DIR = $(GSDL_DIR)/indexers
|
---|
29 | PACKAGES_DIR = $(GSDL_DIR)/packages
|
---|
30 | COLSERVR_DIR = $(GSDL_DIR)/src/colservr
|
---|
31 | PROTOCOL_DIR = $(GSDL_DIR)/src/protocol
|
---|
32 |
|
---|
33 |
|
---|
34 | USE_CORBA = @USE_CORBA@
|
---|
35 | ifeq ($(USE_CORBA), 1)
|
---|
36 |
|
---|
37 | # FROM LIB
|
---|
38 |
|
---|
39 | MICO_DIR = @MICO_DIR@
|
---|
40 | ifeq ($(MICO_DIR), default)
|
---|
41 | MICO_INC = -I../packages/mico/mico/include
|
---|
42 | MICO_PATH = ../bin/linux/
|
---|
43 | else
|
---|
44 | ifeq ($(MICO_DIR), yes)
|
---|
45 | MICO_INC =
|
---|
46 | else
|
---|
47 | MICO_INC = -I$(MICO_DIR)
|
---|
48 | endif
|
---|
49 | MICO_PATH =
|
---|
50 | endif
|
---|
51 | MINCLUDES = -I/usr/include/g++-2/ -I/usr/lib/gcc-lib/i386-slackware-linux/egcs-2.91.66/include/ -I/usr/include -I. -I../indexers/mg/lib $(MICO_INC) -I..
|
---|
52 |
|
---|
53 | MCFLAGS = -Wall -Wunused
|
---|
54 |
|
---|
55 | MCOMPILE = $(MICO_PATH)mico-c++ -x c++ $(MCFLAGS) $(DEFS) $(MINCLUDES) -c
|
---|
56 |
|
---|
57 |
|
---|
58 | .SUFFIXES: .mpp .o
|
---|
59 | .mpp.o:
|
---|
60 | $(MCOMPILE) $<
|
---|
61 |
|
---|
62 |
|
---|
63 | CORBAHEADERS = \
|
---|
64 | corbaconv_text_t.h corbatext_t.h
|
---|
65 | CORBASOURCES = \
|
---|
66 | corbaiface.mpp corbatext_t.mpp corbaconv_text_t.mpp corbaiface_skel.mpp
|
---|
67 | CORBAOBJECTS = \
|
---|
68 | corbaiface.o corbatext_t.o corbaconv_text_t.o corbaiface_skel.o
|
---|
69 |
|
---|
70 |
|
---|
71 | corbaiface_skel.h: corbaiface.idl
|
---|
72 | LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH PATH=$(MICO_PATH):$(PATH) idl --boa --no-poa --c++-skel --c++-suffix=mpp $?
|
---|
73 | corbaiface_skel.mpp: corbaiface.idl
|
---|
74 | LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH PATH=$(MICO_PATH):$(PATH) idl --boa --no-poa --c++-skel --c++-suffix=mpp $?
|
---|
75 | corbaiface.mpp: corbaiface.idl
|
---|
76 | LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH PATH=$(MICO_PATH):$(PATH) idl --boa --no-poa --c++-skel --c++-suffix=mpp $?
|
---|
77 |
|
---|
78 |
|
---|
79 | # FROM COLSERVR
|
---|
80 | # ===========================================================================================
|
---|
81 | # CORBA SUPPORT
|
---|
82 |
|
---|
83 | MCFLAGS = @CFLAGS@ -Wall -Wunused
|
---|
84 |
|
---|
85 | MICO_DIR = @MICO_DIR@
|
---|
86 | ifeq ($(MICO_DIR), default)
|
---|
87 | MICO_INC = -I../../packages/mico/include
|
---|
88 | MICO_PATH = ../../bin/linux/
|
---|
89 | else
|
---|
90 | ifeq ($(MICO_DIR), yes)
|
---|
91 | MICO_INC =
|
---|
92 | MICO_PATH =
|
---|
93 | else
|
---|
94 | MICO_INC = -I$(MICO_DIR)
|
---|
95 | MICO_PATH =
|
---|
96 | endif
|
---|
97 | endif
|
---|
98 | MINCLUDES = -I. -I../../lib -I../recpt -I$(INDEXERS_DIR)/mgpp/text $(MICO_INC)
|
---|
99 |
|
---|
100 | MCOMPILE = $(MICO_PATH)mico-c++ -x c++ $(MCFLAGS) $(DEFS) $(MINCLUDES) -c
|
---|
101 |
|
---|
102 | .SUFFIXES: .mpp .o
|
---|
103 | .mpp.o:
|
---|
104 | $(MCOMPILE) $<
|
---|
105 |
|
---|
106 | CORBAHEADERS = corbaServer.h
|
---|
107 | CORBASOURCES = corbaServer.mpp
|
---|
108 | CORBAOBJECTS = corbaServer.o ../../lib/corbaiface_skel.o
|
---|
109 |
|
---|
110 | # ===========================================================================================
|
---|
111 |
|
---|
112 |
|
---|
113 | # FROM RECPT
|
---|
114 |
|
---|
115 | CORBA_CFLAGS=-DUSE_CORBA
|
---|
116 |
|
---|
117 |
|
---|
118 | EXEC = corbaserver corbarecptldd
|
---|
119 |
|
---|
120 |
|
---|
121 | MICO_DIR = @MICO_DIR@
|
---|
122 | MICO_VER = @MICO_VER@
|
---|
123 | ifeq ($(MICO_DIR), yes)
|
---|
124 | MICO_INC =
|
---|
125 | MICO_LIB =
|
---|
126 | MICO_PATH =
|
---|
127 | else
|
---|
128 | ifeq ($(MICO_DIR), default)
|
---|
129 | MICO_DIR = ../../packages/mico/include
|
---|
130 | MICO_PATH = ../../bin/linux/
|
---|
131 | else
|
---|
132 | MICO_PATH =
|
---|
133 | endif
|
---|
134 | MICO_INC = -I$(MICO_DIR)
|
---|
135 | MICO_LIB = -L$(MICO_DIR)
|
---|
136 | endif
|
---|
137 | MINCLUDES = -I. -I../../lib -I../colservr -I$(INDEXERS_DIR)/mgpp/text $(MICO_INC)
|
---|
138 |
|
---|
139 | MCOMPILE = $(MICO_PATH)mico-c++ -x c++ $(MCFLAGS) $(DEFS) $(MINCLUDES) -c
|
---|
140 | MSTATIC = @STATIC@
|
---|
141 | MLINK = $(MICO_PATH)mico-ld $(MSTATIC) $(LDFLAGS) $(MICO_LIB) -o $@
|
---|
142 | MLIBS = $(LIBS) -L../../lib/ -lmico$(MICO_VER) -lmicoaux$(MICO_VER)
|
---|
143 |
|
---|
144 |
|
---|
145 | .SUFFIXES: .mpp .o
|
---|
146 | .mpp.o:
|
---|
147 | $(MCOMPILE) $< -o $@
|
---|
148 |
|
---|
149 |
|
---|
150 | corbaserver: $(RECPTLIB_OBJS)
|
---|
151 | @echo -e building corbaserver
|
---|
152 | $(MLINK) $(RECPTLIB_OBJS) $(MLIBS)
|
---|
153 | # stripping symbols was a cunning plan, but caused difficulties when
|
---|
154 | # it came to debugging ...
|
---|
155 | # non GNU strips might not like these options - check autoconf?
|
---|
156 | # strip --strip-all --discard-all corbaserver
|
---|
157 | # strip corbaserver
|
---|
158 | # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
---|
159 |
|
---|
160 | CORBARECPT_OBJECTS = corbaproto.o corbaclient.o
|
---|
161 |
|
---|
162 | CORBARECPT_OBJS = $(COMMONOBJECTS) $(CORBARECPT_OBJECTS) $(COLSERVROBJECTS) \
|
---|
163 | ../../lib/corbaiface.o \
|
---|
164 | ../../lib/corbaiface_skel.o \
|
---|
165 | ../../lib/corbaconv_text_t.o \
|
---|
166 | ../../lib/corbatext_t.o \
|
---|
167 | ../../lib/gsdllib.a \
|
---|
168 | $(INDEXERS_DIR)/mg/src/text/libmgtext.a \
|
---|
169 | $(INDEXERS_DIR)/mg/lib/libmglib.a \
|
---|
170 | $(FASTCGI_OBJS) \
|
---|
171 | $(INDEXERS_DIR)/mgpp/text/libmgpptext.a \
|
---|
172 | $(INDEXERS_DIR)/mgpp/lib/libmgpplib.a
|
---|
173 |
|
---|
174 |
|
---|
175 | corbarecptldd: $(CORBARECPT_OBJS)
|
---|
176 | @echo -e building corbarecptldd:
|
---|
177 | $(MLINK) $(CORBARECPT_OBJS) $(MLIBS)
|
---|
178 |
|
---|
179 | else
|
---|
180 | all:
|
---|
181 | install:
|
---|
182 | clean:
|
---|
183 | distclean:
|
---|
184 | depend:
|
---|
185 | endif
|
---|