1 | ###########################################################################
|
---|
2 | #
|
---|
3 | # win32 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-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 | COMMON_DIR = ..\..
|
---|
28 |
|
---|
29 | INDEXERS_DIR = $(COMMON_DIR)\indexers
|
---|
30 | COMMON_PACKAGES_DIR = $(COMMON_DIR)\packages
|
---|
31 |
|
---|
32 |
|
---|
33 | GSDL_VC4 = 0
|
---|
34 | LOCAL_LIBRARY = 0
|
---|
35 | DEBUG = 0
|
---|
36 | DLL = 0
|
---|
37 | DLLDEBUG = 0
|
---|
38 | USE_SQLITE = 1
|
---|
39 | USE_MSSQL = 0
|
---|
40 |
|
---|
41 | !IF $(DEBUG)
|
---|
42 | CXXFLAGS = -DEBUG -Z7 /errorReport:prompt
|
---|
43 | !ELSE
|
---|
44 | CXXFLAGS =
|
---|
45 | !ENDIF
|
---|
46 |
|
---|
47 |
|
---|
48 | !IF $(GSDL_VC4)
|
---|
49 | CXXFLAGS = $(CXXFLAGS) -GX
|
---|
50 | !ELSE
|
---|
51 | CXXFLAGS = $(CXXFLAGS) -EHsc
|
---|
52 | !ENDIF
|
---|
53 |
|
---|
54 | !IF $(DLL)
|
---|
55 | CXXFLAGS = $(CXXFLAGS) -MD
|
---|
56 | !ELSE
|
---|
57 | !IF ($(DLLDEBUG))
|
---|
58 | CXXFLAGS = $(CXXFLAGS) -MDd
|
---|
59 | !ENDIF
|
---|
60 | !ENDIF
|
---|
61 |
|
---|
62 | !IF $(USE_MSSQL)
|
---|
63 | MSSQL_OBJECTS = mssqldbclass.obj
|
---|
64 | MSSQL_SOURCES = mssqldbclass.cpp
|
---|
65 | !ELSE
|
---|
66 | MSSQL_OBJECTS =
|
---|
67 | MSSQL_SOURCES =
|
---|
68 | !ENDIF
|
---|
69 |
|
---|
70 | !IF $(USE_SQLITE)
|
---|
71 | SQLITE_INCLUDES = -I"$(COMMON_PACKAGES_DIR)\sqlite\include"
|
---|
72 | SQLITE_OBJECTS = sqlitedbclass.obj
|
---|
73 | SQLITE_SOURCES = sqlitedbclass.cpp
|
---|
74 | !ELSE
|
---|
75 | SQLITE_INCLUDES =
|
---|
76 | SQLITE_OBJECTS =
|
---|
77 | SQLITE_SOURCES =
|
---|
78 | !ENDIF
|
---|
79 |
|
---|
80 |
|
---|
81 | AR = lib
|
---|
82 | CC = cl
|
---|
83 | DEFS = -D__WIN32__ -DHAVE_CONFIG_H -DPARADOCNUM -D_LITTLE_ENDIAN -DSHORT_SUFFIX -D_CRT_SECURE_NO_DEPRECATE
|
---|
84 | INCLUDES = -I"$(COMMON_DIR)" \
|
---|
85 | -I"$(COMMON_PACKAGES_DIR)\gdbm\gdbm-1.8.3" -I"$(COMMON_PACKAGES_DIR)\gdbm\gdbm-1.8.3\windows" \
|
---|
86 | $(SQLITE_INCLUDES)
|
---|
87 |
|
---|
88 | !IF $(GSDL_VC4)
|
---|
89 | DEFS = $(DEFS) -DGSDL_NAMESPACE_BROKEN -DGSDL_USE_IOS_H -D__STL_NO_NEW_IOSTREAMS
|
---|
90 | INCLUDES = $(INCLUDES) -I"$(COMMON_PACKAGES_DIR)\windows\stlport\stlport"
|
---|
91 | !ENDIF
|
---|
92 | !IF $(LOCAL_LIBRARY)
|
---|
93 | DEFS = $(DEFS) -DGSDL_LOCAL_LIBRARY
|
---|
94 | !ENDIF
|
---|
95 |
|
---|
96 |
|
---|
97 | COMPILE = $(CC) -nologo -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
|
---|
98 |
|
---|
99 |
|
---|
100 | .SUFFIXES:
|
---|
101 | .SUFFIXES: .cpp .obj
|
---|
102 | .cpp.obj:
|
---|
103 | $(COMPILE) $<
|
---|
104 |
|
---|
105 |
|
---|
106 | SOURCES = \
|
---|
107 | cfgread.cpp \
|
---|
108 | cnfgable.cpp \
|
---|
109 | cnfgator.cpp \
|
---|
110 | dbclass.cpp \
|
---|
111 | display.cpp \
|
---|
112 | fileutil.cpp \
|
---|
113 | gdbmclass.cpp \
|
---|
114 | gsdlsitecfg.cpp \
|
---|
115 | gsdltimes.cpp \
|
---|
116 | gsdltools.cpp \
|
---|
117 | gsdlunicode.cpp \
|
---|
118 | infodbclass.cpp \
|
---|
119 | md5.cpp \
|
---|
120 | OIDtools.cpp \
|
---|
121 | phrases.cpp \
|
---|
122 | text_t.cpp \
|
---|
123 | unitool.cpp \
|
---|
124 | $(SQLITE_SOURCES) \
|
---|
125 | $(MSSQL_SOURCES)
|
---|
126 |
|
---|
127 | OBJECTS = \
|
---|
128 | cfgread.obj \
|
---|
129 | cnfgable.obj \
|
---|
130 | cnfgator.obj \
|
---|
131 | dbclass.obj \
|
---|
132 | display.obj \
|
---|
133 | fileutil.obj \
|
---|
134 | gdbmclass.obj \
|
---|
135 | gsdlsitecfg.obj \
|
---|
136 | gsdltimes.obj \
|
---|
137 | gsdltools.obj \
|
---|
138 | gsdlunicode.obj \
|
---|
139 | infodbclass.obj \
|
---|
140 | md5.obj \
|
---|
141 | OIDtools.obj \
|
---|
142 | phrases.obj \
|
---|
143 | text_t.obj \
|
---|
144 | unitool.obj \
|
---|
145 | $(SQLITE_OBJECTS) \
|
---|
146 | $(MSSQL_OBJECTS)
|
---|
147 |
|
---|
148 | LIBRARY = gsdllib.lib
|
---|
149 |
|
---|
150 |
|
---|
151 | # Default target: make gsdllib.lib
|
---|
152 | all: $(LIBRARY)
|
---|
153 |
|
---|
154 | gsdllib.lib : $(OBJECTS)
|
---|
155 | if EXIST $(LIBRARY) del $(LIBRARY)
|
---|
156 | $(AR) -nologo /out:$(LIBRARY) $(OBJECTS)
|
---|
157 |
|
---|
158 | install:
|
---|
159 |
|
---|
160 | clean:
|
---|
161 | del *.obj
|
---|
162 | del $(LIBRARY)
|
---|
163 |
|
---|
164 |
|
---|
165 | # Always recompile gsdltools in case GSDL_LOCAL_LIBRARY has changed
|
---|
166 | gsdltools.obj: FORCE
|
---|
167 |
|
---|
168 | FORCE:
|
---|