source: gsdl/trunk/lib/win32.mak@ 15826

Last change on this file since 15826 was 15826, checked in by mdewsnip, 16 years ago

(Adding new DB support) Fixed SQLite include path.

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