root/gsdl/trunk/common-src/src/lib/win32.mak @ 18079

Revision 18079, 3.4 KB (checked in by mdewsnip, 12 years ago)

Fixes to win32.mak for the new GDBM library.

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1###########################################################################
2#
3# win32 makefile -- lib
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-2008  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
27GSDL_DIR = ..\..\..
28COMMON_DIR = $(GSDLHOME)\common-src
29
30INDEXERS_DIR = $(COMMON_DIR)\indexers
31COMMON_PACKAGES_DIR = $(COMMON_DIR)\packages
32
33
34GSDL_VC4 = 0
35LOCAL_LIBRARY = 0
36DLL = 0
37DLLDEBUG = 0
38USE_SQLITE = 1
39USE_MSSQL = 0
40
41
42!IF $(GSDL_VC4)
43CPPFLAGS = -GX
44!ELSE
45CPPFLAGS = -EHsc
46!ENDIF
47
48!IF $(DLL)
49CPPFLAGS = $(CPPFLAGS) -MD
50!ELSE
51!IF ($(DLLDEBUG))
52CPPFLAGS = $(CPPFLAGS) -MDd
53!ENDIF
54!ENDIF
55
56!IF $(USE_MSSQL)
57MSSQL_OBJECTS = mssqldbclass.obj
58MSSQL_SOURCES = mssqldbclass.cpp
59!ELSE
60MSSQL_OBJECTS =
61MSSQL_SOURCES =
62!ENDIF
63
64!IF $(USE_SQLITE)
65SQLITE_INCLUDES = -I"$(COMMON_PACKAGES_DIR)\sqlite\include"
66SQLITE_OBJECTS = sqlitedbclass.obj
67SQLITE_SOURCES = sqlitedbclass.cpp
68!ELSE
69SQLITE_INCLUDES =
70SQLITE_OBJECTS =
71SQLITE_SOURCES =
72!ENDIF
73
74
75AR = lib
76CC = cl
77DEFS = -D__WIN32__ -DHAVE_CONFIG_H -DPARADOCNUM -D_LITTLE_ENDIAN -DSHORT_SUFFIX -D_CRT_SECURE_NO_DEPRECATE
78INCLUDES = -I"$(GSDL_DIR)" -I"$(INDEXERS_DIR)\mg\lib" \
79    -I"$(COMMON_PACKAGES_DIR)\gdbm\gdbm-1.8.3" -I"$(COMMON_PACKAGES_DIR)\gdbm\gdbm-1.8.3\windows" \
80    $(SQLITE_INCLUDES)
81
82!IF $(GSDL_VC4)
83DEFS = $(DEFS) -DGSDL_NAMESPACE_BROKEN -DGSDL_USE_IOS_H -D__STL_NO_NEW_IOSTREAMS
84INCLUDES = $(INCLUDES) -I"$(COMMON_PACKAGES_DIR)\windows\stlport\stlport"
85!ENDIF
86!IF $(LOCAL_LIBRARY)
87DEFS = $(DEFS) -DGSDL_LOCAL_LIBRARY
88!ENDIF
89
90
91COMPILE = $(CC) -nologo -c $(CPPFLAGS) $(DEFS) $(INCLUDES)
92
93
94.SUFFIXES:
95.SUFFIXES: .cpp .obj
96.cpp.obj:
97    $(COMPILE) $<
98
99
100SOURCES = \
101    cfgread.cpp \
102    cnfgable.cpp \
103    cnfgator.cpp \
104    dbclass.cpp \
105    display.cpp \
106    fileutil.cpp \
107    gdbmclass.cpp \
108    gsdlsitecfg.cpp \
109    gsdltimes.cpp \
110    gsdltools.cpp \
111    gsdlunicode.cpp \
112    infodbclass.cpp \
113    md5.cpp \
114    OIDtools.cpp \
115    phrases.cpp \
116    text_t.cpp \
117    $(SQLITE_SOURCES) \
118    $(MSSQL_SOURCES)
119
120OBJECTS = \
121    cfgread.obj \
122    cnfgable.obj \
123    cnfgator.obj \
124    dbclass.obj \
125    display.obj \
126    fileutil.obj \
127    gdbmclass.obj \
128    gsdlsitecfg.obj \
129    gsdltimes.obj \
130    gsdltools.obj \
131    gsdlunicode.obj \
132    infodbclass.obj \
133    md5.obj \
134    OIDtools.obj \
135    phrases.obj \
136    text_t.obj \
137    $(SQLITE_OBJECTS) \
138        $(MSSQL_OBJECTS)
139
140LIBRARY = gsdllib.lib   
141
142
143# Default target: make gsdllib.lib
144all: $(LIBRARY)
145
146gsdllib.lib : $(OBJECTS)
147    if EXIST $(LIBRARY) del $(LIBRARY)
148    $(AR) -nologo /out:$(LIBRARY) $(OBJECTS)
149
150install:
151
152clean:
153    del *.obj
154    del $(LIBRARY)
155
156
157# Always recompile gsdltools in case GSDL_LOCAL_LIBRARY has changed
158gsdltools.obj: FORCE
159
160FORCE:
Note: See TracBrowser for help on using the browser.