root/gsdl/trunk/common-src/win32.mak @ 19527

Revision 19527, 4.2 KB (checked in by ak19, 10 years ago)

Dr Bainbridge updated the Windows makefiles to 1. Take the DEBUG flag so that we can recompile all of GS2 in the Vis C++ 2005 Express Edition command prompt and then use its Debugger on the C code. 2. Now GS2 make clean command cleans up all object and lib files that its make generates.

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