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

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

Updating windows makefiles to mirror the same changes that Dr Bainbridge recently committed for Linux.

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