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

Revision 19276, 4.1 KB (checked in by ak19, 10 years ago)

Updated common-src level makefile to compile the getpw program that Dr Bainbridge has updated

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