[1076] | 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 | #
|
---|
[15527] | 8 | # Copyright (C) 1999-2008 The New Zealand Digital Library Project
|
---|
[1076] | 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 |
|
---|
[16577] | 27 | GSDL_DIR = ..\..\..
|
---|
| 28 | INDEXERS_DIR = $(GSDL_DIR)\common-src\indexers
|
---|
| 29 | PACKAGES_DIR = $(GSDL_DIR)\common-src\packages
|
---|
[15526] | 30 |
|
---|
| 31 |
|
---|
[11256] | 32 | GSDL_VC4 = 0
|
---|
[2338] | 33 | LOCAL_LIBRARY = 0
|
---|
[7060] | 34 | DLL = 0
|
---|
| 35 | DLLDEBUG = 0
|
---|
[18076] | 36 | USE_SQLITE = 1
|
---|
[17476] | 37 | USE_MSSQL = 0
|
---|
[1076] | 38 |
|
---|
[7060] | 39 |
|
---|
[11256] | 40 | !IF $(GSDL_VC4)
|
---|
[3055] | 41 | CPPFLAGS = -GX
|
---|
[11256] | 42 | !ELSE
|
---|
| 43 | CPPFLAGS = -EHsc
|
---|
| 44 | !ENDIF
|
---|
| 45 |
|
---|
[7060] | 46 | !IF $(DLL)
|
---|
| 47 | CPPFLAGS = $(CPPFLAGS) -MD
|
---|
| 48 | !ELSE
|
---|
| 49 | !IF ($(DLLDEBUG))
|
---|
| 50 | CPPFLAGS = $(CPPFLAGS) -MDd
|
---|
| 51 | !ENDIF
|
---|
| 52 | !ENDIF
|
---|
[1076] | 53 |
|
---|
[17476] | 54 | !IF $(USE_MSSQL)
|
---|
| 55 | MSSQL_OBJECTS = mssqldbclass.obj
|
---|
| 56 | MSSQL_SOURCES = mssqldbclass.cpp
|
---|
| 57 | !ELSE
|
---|
| 58 | MSSQL_OBJECTS =
|
---|
| 59 | MSSQL_SOURCES =
|
---|
| 60 | !ENDIF
|
---|
| 61 |
|
---|
[15785] | 62 | !IF $(USE_SQLITE)
|
---|
[15851] | 63 | SQLITE_INCLUDES = -I"$(PACKAGES_DIR)\sqlite\include"
|
---|
[15785] | 64 | SQLITE_OBJECTS = sqlitedbclass.obj
|
---|
| 65 | SQLITE_SOURCES = sqlitedbclass.cpp
|
---|
| 66 | !ELSE
|
---|
| 67 | SQLITE_INCLUDES =
|
---|
| 68 | SQLITE_OBJECTS =
|
---|
| 69 | SQLITE_SOURCES =
|
---|
| 70 | !ENDIF
|
---|
[15514] | 71 |
|
---|
[15785] | 72 |
|
---|
[15514] | 73 | AR = lib
|
---|
| 74 | CC = cl
|
---|
[15785] | 75 | DEFS = -D__WIN32__ -DHAVE_CONFIG_H -DPARADOCNUM -D_LITTLE_ENDIAN -DSHORT_SUFFIX -D_CRT_SECURE_NO_DEPRECATE
|
---|
| 76 | INCLUDES = -I"$(GSDL_DIR)" -I"$(INDEXERS_DIR)\mg\lib" -I"$(PACKAGES_DIR)\windows\gdbm\gdbm" $(SQLITE_INCLUDES)
|
---|
[15526] | 77 |
|
---|
[11257] | 78 | !IF $(GSDL_VC4)
|
---|
[2338] | 79 | DEFS = $(DEFS) -DGSDL_NAMESPACE_BROKEN -DGSDL_USE_IOS_H -D__STL_NO_NEW_IOSTREAMS
|
---|
[15789] | 80 | INCLUDES = $(INCLUDES) -I"$(PACKAGES_DIR)\windows\stlport\stlport"
|
---|
[2338] | 81 | !ENDIF
|
---|
| 82 | !IF $(LOCAL_LIBRARY)
|
---|
| 83 | DEFS = $(DEFS) -DGSDL_LOCAL_LIBRARY
|
---|
| 84 | !ENDIF
|
---|
| 85 |
|
---|
[15514] | 86 |
|
---|
[11253] | 87 | COMPILE = $(CC) -nologo -c $(CPPFLAGS) $(DEFS) $(INCLUDES)
|
---|
[1076] | 88 |
|
---|
[15514] | 89 |
|
---|
[1076] | 90 | .SUFFIXES:
|
---|
| 91 | .SUFFIXES: .cpp .obj
|
---|
| 92 | .cpp.obj:
|
---|
| 93 | $(COMPILE) $<
|
---|
| 94 |
|
---|
| 95 |
|
---|
[15418] | 96 | SOURCES = \
|
---|
[15514] | 97 | cfgread.cpp \
|
---|
| 98 | cnfgable.cpp \
|
---|
| 99 | cnfgator.cpp \
|
---|
| 100 | dbclass.cpp \
|
---|
| 101 | display.cpp \
|
---|
| 102 | fileutil.cpp \
|
---|
| 103 | gdbmclass.cpp \
|
---|
| 104 | gsdlsitecfg.cpp \
|
---|
| 105 | gsdltimes.cpp \
|
---|
| 106 | gsdltools.cpp \
|
---|
| 107 | gsdlunicode.cpp \
|
---|
| 108 | infodbclass.cpp \
|
---|
| 109 | md5.cpp \
|
---|
| 110 | OIDtools.cpp \
|
---|
| 111 | phrases.cpp \
|
---|
[15785] | 112 | text_t.cpp \
|
---|
[17476] | 113 | $(SQLITE_SOURCES) \
|
---|
| 114 | $(MSSQL_SOURCES)
|
---|
[1076] | 115 |
|
---|
[15418] | 116 | OBJECTS = \
|
---|
[15514] | 117 | cfgread.obj \
|
---|
| 118 | cnfgable.obj \
|
---|
| 119 | cnfgator.obj \
|
---|
| 120 | dbclass.obj \
|
---|
| 121 | display.obj \
|
---|
| 122 | fileutil.obj \
|
---|
| 123 | gdbmclass.obj \
|
---|
| 124 | gsdlsitecfg.obj \
|
---|
| 125 | gsdltimes.obj \
|
---|
| 126 | gsdltools.obj \
|
---|
| 127 | gsdlunicode.obj \
|
---|
| 128 | infodbclass.obj \
|
---|
| 129 | md5.obj \
|
---|
| 130 | OIDtools.obj \
|
---|
| 131 | phrases.obj \
|
---|
[15785] | 132 | text_t.obj \
|
---|
[17476] | 133 | $(SQLITE_OBJECTS) \
|
---|
| 134 | $(MSSQL_OBJECTS)
|
---|
[1076] | 135 |
|
---|
[15526] | 136 | LIBRARY = gsdllib.lib
|
---|
[15429] | 137 |
|
---|
[1076] | 138 |
|
---|
[15580] | 139 | # Default target: make gsdllib.lib
|
---|
| 140 | all: $(LIBRARY)
|
---|
| 141 |
|
---|
[1076] | 142 | gsdllib.lib : $(OBJECTS)
|
---|
[15580] | 143 | if EXIST $(LIBRARY) del $(LIBRARY)
|
---|
| 144 | $(AR) -nologo /out:$(LIBRARY) $(OBJECTS)
|
---|
[1076] | 145 |
|
---|
[15580] | 146 | install:
|
---|
[2338] | 147 |
|
---|
[1076] | 148 | clean:
|
---|
| 149 | del *.obj
|
---|
[15580] | 150 | del $(LIBRARY)
|
---|
[1076] | 151 |
|
---|
[2338] | 152 |
|
---|
[15526] | 153 | # Always recompile gsdltools in case GSDL_LOCAL_LIBRARY has changed
|
---|
| 154 | gsdltools.obj: FORCE
|
---|
| 155 |
|
---|
| 156 | FORCE:
|
---|