source: gsdl/trunk/common-src/win32.mak@ 17476

Last change on this file since 17476 was 17476, checked in by mdewsnip, 16 years ago

Support for using MSSQL for infodb databases, many thanks to Jeffrey Ke from DL Consulting Ltd. (http://www.dlconsulting.com). Please note that MSSQL only runs on Windows, and requires some setup before use. Documentation will be added to the Greenstone Wiki explaining this.

File size: 3.3 KB
RevLine 
[16575]1###########################################################################
2#
3# win32 makefile -- common code between gsdl runtime and buildtime
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
[16576]27GSDLHOME = $(GSDLHOME)
[16575]28COMMONHOME = $(MAKEDIR)
29GSDL_VC4 = 0
30DLL = 0
31DLLDEBUG = 0
32USE_SQLITE = 0
[17476]33USE_MSSQL = 0
[16575]34
35MDEFINES = /f win32.mak
36
37INDEXERSDIR = indexers
38
39COMPILEDIRS = packages\windows\gdbm\gdbm packages\windows\crypt\crypt \
40 packages\windows\expat\expat src\lib
41
42INSTALLDIRS = src\gdbmedit\db2txt src\gdbmedit\txt2db
43
44PACKAGEDIRS =
45
46SQLITE_DIR = packages\sqlite\sqlite-amalgamation-3.5.9
47
48MAKECMD = $(MAKE) $(MDEFINES) GSDLHOME="$(GSDLHOME)"
49
50!IF $(GSDL_VC4)
51MAKECMD = $(MAKECMD) GSDL_VC4=1
52!ENDIF
53!IF $(DLL)
54MAKECMD = $(MAKECMD) DLL=1
55!ENDIF
56!IF $(DLLDEBUG)
57MAKECMD = $(MAKECMD) DLLDEBUG=1
58!ENDIF
59!IF $(USE_SQLITE)
60MAKECMD = $(MAKECMD) USE_SQLITE=1
61PACKAGEDIRS = $(PACKAGEDIRS) $(SQLITE_DIR)
62!ENDIF
[17476]63!IF $(USE_MSSQL)
64MAKECMD = $(MAKECMD) USE_MSSQL=1
65!ENDIF
[16575]66
67MAKECLEANCMD = $(MAKE) $(MDEFINES) clean
68
[16903]69all: win32.mak $(INDEXERSDIR) $(PACKAGEDIRS) $(COMPILEDIRS) $(INSTALLDIRS)
[16575]70
71install: win32.mak $(INDEXERSDIR) $(INSTALLDIRS)
72
73clean:
[16577]74 cd "$(COMMONHOME)"
[16575]75 cd packages\windows\crypt\crypt
76 $(MAKECLEANCMD)
77 cd "$(COMMONHOME)"
78 cd packages\windows\gdbm\gdbm
79 $(MAKECLEANCMD)
80 cd "$(COMMONHOME)"
81 cd packages\windows\expat\expat
82 $(MAKECLEANCMD)
83 cd "$(COMMONHOME)"
84 cd src\lib
85 $(MAKECLEANCMD)
86 cd "$(COMMONHOME)"
87 cd src\gdbmedit\txt2db
88 $(MAKECLEANCMD)
89 cd "$(COMMONHOME)"
90 cd src\gdbmedit\db2txt
91 $(MAKECLEANCMD)
92 cd "$(COMMONHOME)"
93 cd indexers
94 call winMake.bat clean
95 cd "$(COMMONHOME)"
96
97$(COMPILEDIRS): FORCE
[16577]98 cd "$(COMMONHOME)"
[16575]99 cd "$@"
100 $(MAKECMD)
101 cd "$(GSDLHOME)"
102
103$(INSTALLDIRS): FORCE
[16577]104 cd "$(COMMONHOME)"
[16575]105 cd "$@"
106 $(MAKECMD)
107 $(MAKECMD) install
108 cd "$(COMMONHOME)"
109
110$(SQLITE_DIR): FORCE
[16577]111 cd "$(COMMONHOME)"
[16575]112 cd "$@"
113 $(MAKECMD)
114 $(MAKECMD) install
115 cd "$(COMMONHOME)"
116
117$(INDEXERSDIR): FORCE
[16577]118 cd "$(COMMONHOME)"
[16575]119 cd "$@"
120 call winMake.bat all gs2
121 call winMake.bat install gs2
122 if NOT EXIST "$(GSDLHOME)\bin\windows" mkdir "$(GSDLHOME)\bin\windows"
123 if NOT EXIST "$(GSDLHOME)\bin\java" mkdir "$(GSDLHOME)\bin\java"
124 for %%i in (bin\*.exe) do \
125 copy %%i "$(GSDLHOME)\bin\windows"
[16577]126 if EXIST "lucene-gs\LuceneWrapper.jar" copy "lucene-gs\LuceneWrapper.jar" "$(GSDLHOME)\bin\java"
[16891]127 @if NOT EXIST "lucene-gs\LuceneWrapper.jar" echo Warning: Failed to find lucene-gs\LuceneWrapper.jar. Greenstone will not be able to use Lucene for indexing
[16575]128 cd "$(GSDLHOME)"
129
130FORCE:
131
Note: See TracBrowser for help on using the repository browser.