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 | MICO_DIR = @MICO_DIR@
|
---|
38 | ifeq ($(MICO_DIR), default)
|
---|
39 | MICO_INCLUDES = -I$(PACKAGES_DIR)/mico/mico/include
|
---|
40 | MICO_PATH = $(PACKAGES_DIR)/mico/bin/
|
---|
41 | else
|
---|
42 | ifeq ($(MICO_DIR), yes)
|
---|
43 | MICO_INCLUDES =
|
---|
44 | else
|
---|
45 | MICO_INCLUDES = -I$(MICO_DIR)
|
---|
46 | endif
|
---|
47 | MICO_PATH =
|
---|
48 | endif
|
---|
49 |
|
---|
50 |
|
---|
51 | AR = ar
|
---|
52 | CC = @CC@
|
---|
53 | CFLAGS = @CFLAGS@
|
---|
54 | DEFS = @DEFS@ -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DGSDLSERVER
|
---|
55 | # Do NOT add the "recpt" directory here: the CORBA code should be independent of the receptionist!
|
---|
56 | INCLUDES = -I$(GSDL_DIR)/lib -I$(COLSERVR_DIR) -I$(PROTOCOL_DIR) -I$(INDEXERS_DIR)/mgpp/text $(MICO_INCLUDES)
|
---|
57 | INSTALL = @INSTALL@
|
---|
58 | LDFLAGS = @LDFLAGS@
|
---|
59 | LIBS = @LIBS@ @GDBM_LIBPATH@ -lgdbm -L$(PACKAGES_DIR)/expat/lib -lexpat $(ACCENTFOLD_LIBS) \
|
---|
60 | $(PACKAGES_DIR)/yaz/lib/libyaz.a $(PACKAGES_DIR)/d2m/libd2m.a -lxml2
|
---|
61 | RANLIB = @RANLIB@
|
---|
62 |
|
---|
63 |
|
---|
64 | COMPILE = $(MICO_PATH)mico-c++ -x c++ $(CFLAGS) $(DEFS) $(INCLUDES) -c
|
---|
65 |
|
---|
66 |
|
---|
67 | .SUFFIXES: .mpp .o
|
---|
68 | .mpp.o:
|
---|
69 | $(COMPILE) $<
|
---|
70 |
|
---|
71 |
|
---|
72 | SOURCES = \
|
---|
73 | corbaconv_text_t.mpp \
|
---|
74 | corbaiface.mpp \
|
---|
75 | corbaiface_skel.mpp \
|
---|
76 | corbaServer.mpp \
|
---|
77 | corbatext_t.mpp
|
---|
78 |
|
---|
79 | OBJECTS = \
|
---|
80 | corbaconv_text_t.o \
|
---|
81 | corbaiface.o \
|
---|
82 | corbaiface_skel.o \
|
---|
83 | corbaServer.o \
|
---|
84 | corbatext_t.o
|
---|
85 |
|
---|
86 | EXECUTABLE = corbaserver corbarecptldd
|
---|
87 |
|
---|
88 | all: $(EXECUTABLE)
|
---|
89 |
|
---|
90 | MSTATIC = @STATIC@
|
---|
91 | MLINK = $(MICO_PATH)mico-ld $(MSTATIC) $(LDFLAGS) $(MICO_LIB) -o $@
|
---|
92 | MLIBS = $(LIBS) -L../../lib/ -lmico$(MICO_VER) -lmicoaux$(MICO_VER)
|
---|
93 |
|
---|
94 | # .SUFFIXES: .mpp .o
|
---|
95 | # .mpp.o:
|
---|
96 | # $(MCOMPILE) $< -o $@
|
---|
97 |
|
---|
98 |
|
---|
99 | corbaserver: $(OBJECTS)
|
---|
100 | @echo -e building corbaserver
|
---|
101 | $(MLINK) $(OBJECTS) $(MLIBS)
|
---|
102 | # stripping symbols was a cunning plan, but caused difficulties when
|
---|
103 | # it came to debugging ...
|
---|
104 | # non GNU strips might not like these options - check autoconf?
|
---|
105 | # strip --strip-all --discard-all corbaserver
|
---|
106 | # strip corbaserver
|
---|
107 | # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
---|
108 |
|
---|
109 | CORBARECPT_OBJECTS = corbaproto.o corbaclient.o
|
---|
110 |
|
---|
111 | CORBARECPT_OBJS = $(COMMONOBJECTS) $(CORBARECPT_OBJECTS) $(COLSERVROBJECTS) \
|
---|
112 | ../../lib/corbaiface.o \
|
---|
113 | ../../lib/corbaiface_skel.o \
|
---|
114 | ../../lib/corbaconv_text_t.o \
|
---|
115 | ../../lib/corbatext_t.o \
|
---|
116 | ../../lib/gsdllib.a \
|
---|
117 | $(INDEXERS_DIR)/mg/src/text/libmgtext.a \
|
---|
118 | $(INDEXERS_DIR)/mg/lib/libmglib.a \
|
---|
119 | $(FASTCGI_OBJS) \
|
---|
120 | $(INDEXERS_DIR)/mgpp/text/libmgpptext.a \
|
---|
121 | $(INDEXERS_DIR)/mgpp/lib/libmgpplib.a
|
---|
122 |
|
---|
123 |
|
---|
124 | corbarecptldd: $(CORBARECPT_OBJS)
|
---|
125 | @echo -e building corbarecptldd:
|
---|
126 | $(MLINK) $(CORBARECPT_OBJS) $(MLIBS)
|
---|
127 |
|
---|
128 | else
|
---|
129 | all:
|
---|
130 | install:
|
---|
131 | clean:
|
---|
132 | distclean:
|
---|
133 | depend:
|
---|
134 | endif
|
---|