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