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

Last change on this file since 21405 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
RevLine 
[1076]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#
[15527]8# Copyright (C) 1999-2008 The New Zealand Digital Library Project
[1076]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
[19875]27COMMON_DIR = ..\..
[15526]28
[18079]29INDEXERS_DIR = $(COMMON_DIR)\indexers
30COMMON_PACKAGES_DIR = $(COMMON_DIR)\packages
[15526]31
[18079]32
[11256]33GSDL_VC4 = 0
[2338]34LOCAL_LIBRARY = 0
[19523]35DEBUG = 0
[7060]36DLL = 0
37DLLDEBUG = 0
[18076]38USE_SQLITE = 1
[17476]39USE_MSSQL = 0
[1076]40
[19523]41!IF $(DEBUG)
42CXXFLAGS = -DEBUG -Z7 /errorReport:prompt
43!ELSE
44CXXFLAGS =
45!ENDIF
[7060]46
[19523]47
[11256]48!IF $(GSDL_VC4)
[19523]49CXXFLAGS = $(CXXFLAGS) -GX
[11256]50!ELSE
[19523]51CXXFLAGS = $(CXXFLAGS) -EHsc
[11256]52!ENDIF
53
[7060]54!IF $(DLL)
[19523]55CXXFLAGS = $(CXXFLAGS) -MD
[7060]56!ELSE
57!IF ($(DLLDEBUG))
[19523]58CXXFLAGS = $(CXXFLAGS) -MDd
[7060]59!ENDIF
60!ENDIF
[1076]61
[17476]62!IF $(USE_MSSQL)
63MSSQL_OBJECTS = mssqldbclass.obj
64MSSQL_SOURCES = mssqldbclass.cpp
65!ELSE
66MSSQL_OBJECTS =
67MSSQL_SOURCES =
68!ENDIF
69
[21325]70!IF "$(USE_SQLITE)" == "0"
71SQLITE_INCLUDES =
72SQLITE_OBJECTS =
73SQLITE_SOURCES =
74!ELSE
[18079]75SQLITE_INCLUDES = -I"$(COMMON_PACKAGES_DIR)\sqlite\include"
[15785]76SQLITE_OBJECTS = sqlitedbclass.obj
77SQLITE_SOURCES = sqlitedbclass.cpp
78!ENDIF
[15514]79
[15785]80
[15514]81AR = lib
82CC = cl
[15785]83DEFS = -D__WIN32__ -DHAVE_CONFIG_H -DPARADOCNUM -D_LITTLE_ENDIAN -DSHORT_SUFFIX -D_CRT_SECURE_NO_DEPRECATE
[21325]84INCLUDES = -I"$(COMMON_DIR)" \
[18079]85 -I"$(COMMON_PACKAGES_DIR)\gdbm\gdbm-1.8.3" -I"$(COMMON_PACKAGES_DIR)\gdbm\gdbm-1.8.3\windows" \
86 $(SQLITE_INCLUDES)
[15526]87
[11257]88!IF $(GSDL_VC4)
[2338]89DEFS = $(DEFS) -DGSDL_NAMESPACE_BROKEN -DGSDL_USE_IOS_H -D__STL_NO_NEW_IOSTREAMS
[18079]90INCLUDES = $(INCLUDES) -I"$(COMMON_PACKAGES_DIR)\windows\stlport\stlport"
[2338]91!ENDIF
92!IF $(LOCAL_LIBRARY)
93DEFS = $(DEFS) -DGSDL_LOCAL_LIBRARY
94!ENDIF
95
[15514]96
[19523]97COMPILE = $(CC) -nologo -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
[1076]98
[15514]99
[1076]100.SUFFIXES:
101.SUFFIXES: .cpp .obj
102.cpp.obj:
103 $(COMPILE) $<
104
105
[15418]106SOURCES = \
[15514]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 \
[15785]122 text_t.cpp \
[21325]123 unitool.cpp \
[17476]124 $(SQLITE_SOURCES) \
125 $(MSSQL_SOURCES)
[1076]126
[15418]127OBJECTS = \
[15514]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 \
[15785]143 text_t.obj \
[21325]144 unitool.obj \
[17476]145 $(SQLITE_OBJECTS) \
146 $(MSSQL_OBJECTS)
[1076]147
[15526]148LIBRARY = gsdllib.lib
[15429]149
[1076]150
[15580]151# Default target: make gsdllib.lib
152all: $(LIBRARY)
153
[1076]154gsdllib.lib : $(OBJECTS)
[15580]155 if EXIST $(LIBRARY) del $(LIBRARY)
156 $(AR) -nologo /out:$(LIBRARY) $(OBJECTS)
[1076]157
[15580]158install:
[2338]159
[1076]160clean:
161 del *.obj
[15580]162 del $(LIBRARY)
[1076]163
[2338]164
[15526]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.