source: main/trunk/greenstone2/common-src/src/lib/win32.mak@ 21325

Last change on this file since 21325 was 21325, checked in by ak19, 14 years ago

Changes to makefiles, configure files, and source code to work with the new configure flags that allow indexers to be individually compiled up by setting each indexer to be enabled or disabled (enable-mg, enable-mgpp, enable-lucene).

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 3.4 KB
Line 
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
27COMMON_DIR = ..\..
28
29INDEXERS_DIR = $(COMMON_DIR)\indexers
30COMMON_PACKAGES_DIR = $(COMMON_DIR)\packages
31
32
33GSDL_VC4 = 0
34LOCAL_LIBRARY = 0
35DEBUG = 0
36DLL = 0
37DLLDEBUG = 0
38USE_SQLITE = 1
39USE_MSSQL = 0
40
41!IF $(DEBUG)
42CXXFLAGS = -DEBUG -Z7 /errorReport:prompt
43!ELSE
44CXXFLAGS =
45!ENDIF
46
47
48!IF $(GSDL_VC4)
49CXXFLAGS = $(CXXFLAGS) -GX
50!ELSE
51CXXFLAGS = $(CXXFLAGS) -EHsc
52!ENDIF
53
54!IF $(DLL)
55CXXFLAGS = $(CXXFLAGS) -MD
56!ELSE
57!IF ($(DLLDEBUG))
58CXXFLAGS = $(CXXFLAGS) -MDd
59!ENDIF
60!ENDIF
61
62!IF $(USE_MSSQL)
63MSSQL_OBJECTS = mssqldbclass.obj
64MSSQL_SOURCES = mssqldbclass.cpp
65!ELSE
66MSSQL_OBJECTS =
67MSSQL_SOURCES =
68!ENDIF
69
70!IF "$(USE_SQLITE)" == "0"
71SQLITE_INCLUDES =
72SQLITE_OBJECTS =
73SQLITE_SOURCES =
74!ELSE
75SQLITE_INCLUDES = -I"$(COMMON_PACKAGES_DIR)\sqlite\include"
76SQLITE_OBJECTS = sqlitedbclass.obj
77SQLITE_SOURCES = sqlitedbclass.cpp
78!ENDIF
79
80
81AR = lib
82CC = cl
83DEFS = -D__WIN32__ -DHAVE_CONFIG_H -DPARADOCNUM -D_LITTLE_ENDIAN -DSHORT_SUFFIX -D_CRT_SECURE_NO_DEPRECATE
84INCLUDES = -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)
89DEFS = $(DEFS) -DGSDL_NAMESPACE_BROKEN -DGSDL_USE_IOS_H -D__STL_NO_NEW_IOSTREAMS
90INCLUDES = $(INCLUDES) -I"$(COMMON_PACKAGES_DIR)\windows\stlport\stlport"
91!ENDIF
92!IF $(LOCAL_LIBRARY)
93DEFS = $(DEFS) -DGSDL_LOCAL_LIBRARY
94!ENDIF
95
96
97COMPILE = $(CC) -nologo -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
98
99
100.SUFFIXES:
101.SUFFIXES: .cpp .obj
102.cpp.obj:
103 $(COMPILE) $<
104
105
106SOURCES = \
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
127OBJECTS = \
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
148LIBRARY = gsdllib.lib
149
150
151# Default target: make gsdllib.lib
152all: $(LIBRARY)
153
154gsdllib.lib : $(OBJECTS)
155 if EXIST $(LIBRARY) del $(LIBRARY)
156 $(AR) -nologo /out:$(LIBRARY) $(OBJECTS)
157
158install:
159
160clean:
161 del *.obj
162 del $(LIBRARY)
163
164
165# Always recompile gsdltools in case GSDL_LOCAL_LIBRARY has changed
166gsdltools.obj: FORCE
167
168FORCE:
Note: See TracBrowser for help on using the repository browser.