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