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

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

Temporarily removed (the recently added) target for 'getpw' for Windows as cannot current get it to compile.

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\expat
81 if NOT EXIST "expat" unzip expat.zip
82
83clean:
84 cd "$(COMMONHOME)"
85 cd packages\windows\crypt\crypt
86 $(MAKECLEANCMD)
87 cd "$(COMMONHOME)"
88 cd packages\gdbm\gdbm-1.8.3
89 $(MAKECLEANCMD)
90 cd "$(COMMONHOME)"
91 cd packages\windows\expat\expat
92 $(MAKECLEANCMD)
93 cd "$(COMMONHOME)"
94 cd src\lib
95 $(MAKECLEANCMD)
96 cd "$(COMMONHOME)"
97 cd src\gdbmedit\txt2db
98 $(MAKECLEANCMD)
99 cd "$(COMMONHOME)"
100 cd src\gdbmedit\db2txt
101 $(MAKECLEANCMD)
102 cd "$(COMMONHOME)"
103 cd src\gdbmedit\gdbmget
104 $(MAKECLEANCMD)
105 cd "$(COMMONHOME)"
106 cd src\gdbmedit\gdbmset
107 $(MAKECLEANCMD)
108 cd "$(COMMONHOME)"
109 cd src\gdbmedit\gdbmkeys
110 $(MAKECLEANCMD)
111 cd "$(COMMONHOME)"
112 cd src\gdbmedit\gdbmdel
113 $(MAKECLEANCMD)
114 cd "$(COMMONHOME)"
115 cd indexers
116 call winMake.bat clean
117 cd "$(COMMONHOME)"
118 cd packages\search4j
119 cd "$(COMMONHOME)"
120
121$(COMPILEDIRS): FORCE
122 cd "$(COMMONHOME)"
123 cd "$@"
124 $(MAKECMD)
125 cd "$(GSDLHOME)"
126
127$(INSTALLDIRS): FORCE
128 cd "$(COMMONHOME)"
129 cd "$@"
130 $(MAKECMD)
131 $(MAKECMD) install
132 cd "$(COMMONHOME)"
133
134$(SQLITE_DIR): FORCE
135 cd "$(COMMONHOME)"
136 cd "$@"
137 $(MAKECMD)
138 $(MAKECMD) install
139 cd "$(COMMONHOME)"
140
141$(INDEXERSDIR): FORCE
142 cd "$(COMMONHOME)"
143 cd "$@"
144 call winMake.bat all gs2
145 call winMake.bat install gs2
146 if NOT EXIST "$(GSDLHOME)\bin\windows" mkdir "$(GSDLHOME)\bin\windows"
147 if NOT EXIST "$(GSDLHOME)\bin\java" mkdir "$(GSDLHOME)\bin\java"
148 for %%i in (bin\*.exe) do \
149 copy %%i "$(GSDLHOME)\bin\windows"
150 if EXIST "lucene-gs\LuceneWrapper.jar" copy "lucene-gs\LuceneWrapper.jar" "$(GSDLHOME)\bin\java"
151 @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
152 cd "$(GSDLHOME)"
153
154FORCE:
155
Note: See TracBrowser for help on using the repository browser.