1 | ###########################################################################
|
---|
2 | #
|
---|
3 | # Makefile -- lib
|
---|
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 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 |
|
---|
28 | AR = ar
|
---|
29 | CC = @CC@
|
---|
30 | CPP = @CXX@
|
---|
31 | #CCFLAGS = @CFLAGS@ -Wall -Wunused -pedantic -W -Woverloaded-virtual
|
---|
32 | CCFLAGS = @CFLAGS@
|
---|
33 | MCFLAGS = @CFLAGS@ -Wall -Wunused
|
---|
34 | DEFS = @DEFS@
|
---|
35 | INCLUDES = -I../packages/mg/lib -I..
|
---|
36 | MICO_DIR = @MICO_DIR@
|
---|
37 | ifeq ($(MICO_DIR), default)
|
---|
38 | MICO_INC = -I../packages/mico/include
|
---|
39 | else
|
---|
40 | ifeq ($(MICO_DIR), yes)
|
---|
41 | MICO_INC =
|
---|
42 | else
|
---|
43 | MICO_INC = -I$(MICO_DIR)
|
---|
44 | endif
|
---|
45 | endif
|
---|
46 | MINCLUDES = -I. -I../packages/mg/lib $(MICO_INC) -I..
|
---|
47 | RANLIB = @RANLIB@
|
---|
48 | USE_CORBA = @USE_CORBA@
|
---|
49 |
|
---|
50 | COMPILE = $(CC) -c $(CCFLAGS) $(DEFS) $(INCLUDES)
|
---|
51 | CPPCOMPILE = $(CPP) -c $(CCFLAGS) $(DEFS) $(INCLUDES)
|
---|
52 |
|
---|
53 | ifneq ($(USE_CORBA), 0)
|
---|
54 | MCOMPILE = mico-c++ -x c++ $(MCFLAGS) $(DEFS) $(MINCLUDES) -c
|
---|
55 | else
|
---|
56 | MCOMPILE = $(COMPILE)
|
---|
57 | endif
|
---|
58 |
|
---|
59 | .SUFFIXES:
|
---|
60 | .SUFFIXES: .c .o
|
---|
61 | .c.o:
|
---|
62 | $(COMPILE) $<
|
---|
63 |
|
---|
64 | .SUFFIXES: .cpp .o
|
---|
65 | .cpp.o:
|
---|
66 | $(CPPCOMPILE) $<
|
---|
67 |
|
---|
68 | .SUFFIXES: .mpp .o
|
---|
69 | .mpp.o:
|
---|
70 | $(MCOMPILE) $<
|
---|
71 |
|
---|
72 |
|
---|
73 | ifneq ($(USE_CORBA), 0)
|
---|
74 | CORBAHEADERS = \
|
---|
75 | corbaconv_text_t.h corbatext_t.h
|
---|
76 | CORBASOURCES = \
|
---|
77 | corbaiface.mpp corbatext_t.mpp corbaconv_text_t.mpp
|
---|
78 | CORBAOBJECTS = \
|
---|
79 | corbaiface.o corbatext_t.o corbaconv_text_t.o
|
---|
80 | else
|
---|
81 | CORBAHEADERS =
|
---|
82 | CORBASOURCE =
|
---|
83 | CORBAOBJECTS =
|
---|
84 | endif
|
---|
85 |
|
---|
86 | HEADERS = \
|
---|
87 | cfgread.h fileutil.h gsdlunicode.h gsdltools.h text_t.h \
|
---|
88 | display.h gsdlconf.h gsdltimes.h cnfgable.h cnfgator.h \
|
---|
89 | $(CORBAHEADERS)
|
---|
90 |
|
---|
91 |
|
---|
92 | SOURCES = \
|
---|
93 | cfgread.cpp fileutil.cpp text_t.cpp cnfgable.cpp \
|
---|
94 | display.cpp gsdlunicode.cpp gsdltimes.cpp gsdltools.cpp \
|
---|
95 | cnfgator.cpp $(CORBASOURCES)
|
---|
96 |
|
---|
97 | OBJECTS = \
|
---|
98 | cfgread.o fileutil.o text_t.o cnfgable.o \
|
---|
99 | display.o gsdlunicode.o gsdltimes.o gsdltools.o \
|
---|
100 | cnfgator.o $(CORBAOBJECTS)
|
---|
101 |
|
---|
102 |
|
---|
103 | all: gsdllib.a
|
---|
104 |
|
---|
105 | corbaiface.mpp: corbaiface.idl
|
---|
106 | idl --c++-suffix=mpp $?
|
---|
107 |
|
---|
108 | GSDLLIBOBJECTS = $(OBJECTS)
|
---|
109 |
|
---|
110 | gsdllib.a: $(GSDLLIBOBJECTS)
|
---|
111 | rm -f gsdllib.a
|
---|
112 | $(AR) cru gsdllib.a $(GSDLLIBOBJECTS)
|
---|
113 | $(RANLIB) gsdllib.a
|
---|
114 |
|
---|
115 | clean:
|
---|
116 | rm -f $(OBJECTS) gsdllib.a
|
---|
117 |
|
---|
118 | distclean: clean
|
---|
119 | rm -f Makefile
|
---|
120 | install:
|
---|
121 |
|
---|
122 | depend:
|
---|
123 | makedepend -Y -- $(DEFS) $(INCLUDES) $(CCFLAGS) -- $(SOURCES)
|
---|
124 |
|
---|
125 |
|
---|
126 |
|
---|
127 |
|
---|