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

Revision 17502, 3.4 KB (checked in by oranfry, 12 years ago)

made windows common-src/packages makefile cascade to search4j

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 = 0
33USE_MSSQL = 0
34
35MDEFINES = /f win32.mak
36
37INDEXERSDIR = indexers
38
39COMPILEDIRS = packages\windows\gdbm\gdbm packages\windows\crypt\crypt \
40          packages\windows\expat\expat packages\search4j 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)" BINDIR="$(GSDLHOME)\bin\windows"
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
63!IF $(USE_MSSQL)
64MAKECMD = $(MAKECMD) USE_MSSQL=1
65!ENDIF
66
67MAKECLEANCMD = $(MAKE) $(MDEFINES) clean
68
69all: win32.mak $(INDEXERSDIR) $(PACKAGEDIRS) $(COMPILEDIRS) $(INSTALLDIRS)
70
71install: win32.mak $(INDEXERSDIR) $(INSTALLDIRS)
72
73clean:
74    cd "$(COMMONHOME)"
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    cd packages\search4j
97    cd "$(COMMONHOME)"
98
99$(COMPILEDIRS): FORCE
100    cd "$(COMMONHOME)"
101    cd "$@"
102    $(MAKECMD)
103    cd "$(GSDLHOME)"
104
105$(INSTALLDIRS): FORCE
106    cd "$(COMMONHOME)"
107    cd "$@"
108    $(MAKECMD)
109    $(MAKECMD) install
110    cd "$(COMMONHOME)"
111
112$(SQLITE_DIR): FORCE
113    cd "$(COMMONHOME)"
114    cd "$@"
115    $(MAKECMD)
116    $(MAKECMD) install
117    cd "$(COMMONHOME)"
118
119$(INDEXERSDIR): FORCE
120    cd "$(COMMONHOME)"
121    cd "$@"
122    call winMake.bat all gs2
123    call winMake.bat install gs2
124    if NOT EXIST "$(GSDLHOME)\bin\windows" mkdir "$(GSDLHOME)\bin\windows"
125    if NOT EXIST "$(GSDLHOME)\bin\java" mkdir "$(GSDLHOME)\bin\java"
126    for %%i in (bin\*.exe) do \
127      copy %%i "$(GSDLHOME)\bin\windows"
128    if EXIST "lucene-gs\LuceneWrapper.jar" copy "lucene-gs\LuceneWrapper.jar" "$(GSDLHOME)\bin\java"
129    @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
130    cd "$(GSDLHOME)"
131
132FORCE:
133
Note: See TracBrowser for help on using the browser.