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

Last change on this file since 18443 was 18443, checked in by davidb, 15 years ago

Additional GDBM operations to better support incremental building

File size: 4.0 KB
Line 
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
27GSDLHOME = $(GSDLHOME)
28COMMONHOME = $(MAKEDIR)
29GSDL_VC4 = 0
30DLL = 0
31DLLDEBUG = 0
32USE_SQLITE = 1
33USE_MSSQL = 0
34
35MDEFINES = /f win32.mak
36
37INDEXERSDIR = indexers
38
39COMPILEDIRS = packages\windows\crypt\crypt packages\gdbm\gdbm-1.8.3 \
40 packages\windows\expat\expat packages\search4j src\lib
41
42INSTALLDIRS = src\gdbmedit\db2txt src\gdbmedit\txt2db \
43 src\gdbmedit\gdbmset src\gdbmedit\gdbmget \
44 src\gdbmedit\gdbmkeys src\gdbmedit\gdbmdel
45
46PACKAGEDIRS =
47
48SQLITE_DIR = packages\sqlite\sqlite-amalgamation-3.5.9
49
50MAKECMD = $(MAKE) $(MDEFINES) GSDLHOME="$(GSDLHOME)" BINDIR="$(GSDLHOME)\bin\windows"
51
52!IF $(GSDL_VC4)
53MAKECMD = $(MAKECMD) GSDL_VC4=1
54!ENDIF
55!IF $(DLL)
56MAKECMD = $(MAKECMD) DLL=1
57!ENDIF
58!IF $(DLLDEBUG)
59MAKECMD = $(MAKECMD) DLLDEBUG=1
60!ENDIF
61!IF $(USE_SQLITE)
62MAKECMD = $(MAKECMD) USE_SQLITE=1
63PACKAGEDIRS = $(PACKAGEDIRS) $(SQLITE_DIR)
64!ENDIF
65!IF $(USE_MSSQL)
66MAKECMD = $(MAKECMD) USE_MSSQL=1
67!ENDIF
68
69MAKECLEANCMD = $(MAKE) $(MDEFINES) GSDLHOME="$(GSDLHOME)" clean
70
71all: win32.mak unzip $(INDEXERSDIR) $(PACKAGEDIRS) $(COMPILEDIRS) $(INSTALLDIRS)
72
73install: win32.mak $(INDEXERSDIR) $(INSTALLDIRS)
74
75unzip:
76 cd "$(COMMONHOME)"
77 cd packages\windows\crypt
78 if NOT EXIST "crypt" unzip crypt.zip
79 cd "$(COMMONHOME)"
80 cd packages\windows\gdbm
81 if NOT EXIST "gdbm" unzip gdbm.zip
82 cd "$(COMMONHOME)"
83 cd packages\windows\expat
84 if NOT EXIST "expat" unzip expat.zip
85
86clean:
87 cd "$(COMMONHOME)"
88 cd packages\windows\crypt\crypt
89 $(MAKECLEANCMD)
90 cd "$(COMMONHOME)"
91 cd packages\gdbm\gdbm-1.8.3
92 $(MAKECLEANCMD)
93 cd "$(COMMONHOME)"
94 cd packages\windows\expat\expat
95 $(MAKECLEANCMD)
96 cd "$(COMMONHOME)"
97 cd src\lib
98 $(MAKECLEANCMD)
99 cd "$(COMMONHOME)"
100 cd src\gdbmedit\txt2db
101 $(MAKECLEANCMD)
102 cd "$(COMMONHOME)"
103 cd src\gdbmedit\db2txt
104 $(MAKECLEANCMD)
105 cd "$(COMMONHOME)"
106 cd src\gdbmedit\gdbmget
107 $(MAKECLEANCMD)
108 cd "$(COMMONHOME)"
109 cd src\gdbmedit\gdbmset
110 $(MAKECLEANCMD)
111 cd "$(COMMONHOME)"
112 cd src\gdbmedit\gdbmkeys
113 $(MAKECLEANCMD)
114 cd "$(COMMONHOME)"
115 cd src\gdbmedit\gdbmdel
116 $(MAKECLEANCMD)
117 cd "$(COMMONHOME)"
118 cd indexers
119 call winMake.bat clean
120 cd "$(COMMONHOME)"
121 cd packages\search4j
122 cd "$(COMMONHOME)"
123
124$(COMPILEDIRS): FORCE
125 cd "$(COMMONHOME)"
126 cd "$@"
127 $(MAKECMD)
128 cd "$(GSDLHOME)"
129
130$(INSTALLDIRS): FORCE
131 cd "$(COMMONHOME)"
132 cd "$@"
133 $(MAKECMD)
134 $(MAKECMD) install
135 cd "$(COMMONHOME)"
136
137$(SQLITE_DIR): FORCE
138 cd "$(COMMONHOME)"
139 cd "$@"
140 $(MAKECMD)
141 $(MAKECMD) install
142 cd "$(COMMONHOME)"
143
144$(INDEXERSDIR): FORCE
145 cd "$(COMMONHOME)"
146 cd "$@"
147 call winMake.bat all gs2
148 call winMake.bat install gs2
149 if NOT EXIST "$(GSDLHOME)\bin\windows" mkdir "$(GSDLHOME)\bin\windows"
150 if NOT EXIST "$(GSDLHOME)\bin\java" mkdir "$(GSDLHOME)\bin\java"
151 for %%i in (bin\*.exe) do \
152 copy %%i "$(GSDLHOME)\bin\windows"
153 if EXIST "lucene-gs\LuceneWrapper.jar" copy "lucene-gs\LuceneWrapper.jar" "$(GSDLHOME)\bin\java"
154 @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
155 cd "$(GSDLHOME)"
156
157FORCE:
158
Note: See TracBrowser for help on using the repository browser.