[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
|
---|
[15785] | 36 | USE_SQLITE = 0
|
---|
[1076] | 37 |
|
---|
[7060] | 38 |
|
---|
[11256] | 39 | !IF $(GSDL_VC4)
|
---|
[3055] | 40 | CPPFLAGS = -GX
|
---|
[11256] | 41 | !ELSE
|
---|
| 42 | CPPFLAGS = -EHsc
|
---|
| 43 | !ENDIF
|
---|
| 44 |
|
---|
[7060] | 45 | !IF $(DLL)
|
---|
| 46 | CPPFLAGS = $(CPPFLAGS) -MD
|
---|
| 47 | !ELSE
|
---|
| 48 | !IF ($(DLLDEBUG))
|
---|
| 49 | CPPFLAGS = $(CPPFLAGS) -MDd
|
---|
| 50 | !ENDIF
|
---|
| 51 | !ENDIF
|
---|
[1076] | 52 |
|
---|
[15785] | 53 | !IF $(USE_SQLITE)
|
---|
[15851] | 54 | SQLITE_INCLUDES = -I"$(PACKAGES_DIR)\sqlite\include"
|
---|
[15785] | 55 | SQLITE_OBJECTS = sqlitedbclass.obj
|
---|
| 56 | SQLITE_SOURCES = sqlitedbclass.cpp
|
---|
| 57 | !ELSE
|
---|
| 58 | SQLITE_INCLUDES =
|
---|
| 59 | SQLITE_OBJECTS =
|
---|
| 60 | SQLITE_SOURCES =
|
---|
| 61 | !ENDIF
|
---|
[15514] | 62 |
|
---|
[15785] | 63 |
|
---|
[15514] | 64 | AR = lib
|
---|
| 65 | CC = cl
|
---|
[15785] | 66 | DEFS = -D__WIN32__ -DHAVE_CONFIG_H -DPARADOCNUM -D_LITTLE_ENDIAN -DSHORT_SUFFIX -D_CRT_SECURE_NO_DEPRECATE
|
---|
| 67 | INCLUDES = -I"$(GSDL_DIR)" -I"$(INDEXERS_DIR)\mg\lib" -I"$(PACKAGES_DIR)\windows\gdbm\gdbm" $(SQLITE_INCLUDES)
|
---|
[15526] | 68 |
|
---|
[11257] | 69 | !IF $(GSDL_VC4)
|
---|
[2338] | 70 | DEFS = $(DEFS) -DGSDL_NAMESPACE_BROKEN -DGSDL_USE_IOS_H -D__STL_NO_NEW_IOSTREAMS
|
---|
[15789] | 71 | INCLUDES = $(INCLUDES) -I"$(PACKAGES_DIR)\windows\stlport\stlport"
|
---|
[2338] | 72 | !ENDIF
|
---|
| 73 | !IF $(LOCAL_LIBRARY)
|
---|
| 74 | DEFS = $(DEFS) -DGSDL_LOCAL_LIBRARY
|
---|
| 75 | !ENDIF
|
---|
| 76 |
|
---|
[15514] | 77 |
|
---|
[11253] | 78 | COMPILE = $(CC) -nologo -c $(CPPFLAGS) $(DEFS) $(INCLUDES)
|
---|
[1076] | 79 |
|
---|
[15514] | 80 |
|
---|
[1076] | 81 | .SUFFIXES:
|
---|
| 82 | .SUFFIXES: .cpp .obj
|
---|
| 83 | .cpp.obj:
|
---|
| 84 | $(COMPILE) $<
|
---|
| 85 |
|
---|
| 86 |
|
---|
[15418] | 87 | SOURCES = \
|
---|
[15514] | 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 \
|
---|
[15785] | 103 | text_t.cpp \
|
---|
| 104 | $(SQLITE_SOURCES)
|
---|
[1076] | 105 |
|
---|
[15418] | 106 | OBJECTS = \
|
---|
[15514] | 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 \
|
---|
[15785] | 122 | text_t.obj \
|
---|
| 123 | $(SQLITE_OBJECTS)
|
---|
[1076] | 124 |
|
---|
[15526] | 125 | LIBRARY = gsdllib.lib
|
---|
[15429] | 126 |
|
---|
[1076] | 127 |
|
---|
[15580] | 128 | # Default target: make gsdllib.lib
|
---|
| 129 | all: $(LIBRARY)
|
---|
| 130 |
|
---|
[1076] | 131 | gsdllib.lib : $(OBJECTS)
|
---|
[15580] | 132 | if EXIST $(LIBRARY) del $(LIBRARY)
|
---|
| 133 | $(AR) -nologo /out:$(LIBRARY) $(OBJECTS)
|
---|
[1076] | 134 |
|
---|
[15580] | 135 | install:
|
---|
[2338] | 136 |
|
---|
[1076] | 137 | clean:
|
---|
| 138 | del *.obj
|
---|
[15580] | 139 | del $(LIBRARY)
|
---|
[1076] | 140 |
|
---|
[2338] | 141 |
|
---|
[15526] | 142 | # Always recompile gsdltools in case GSDL_LOCAL_LIBRARY has changed
|
---|
| 143 | gsdltools.obj: FORCE
|
---|
| 144 |
|
---|
| 145 | FORCE:
|
---|