Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

[db9194]: msvc / Makefile Maximize Restore History

Download this file

Makefile    326 lines (295 with data), 9.3 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
#
# Makefile for ECoLisp
#
top_srcdir= ..\src
srcdir = ..\src
# =============================================================
# ECL configuration
# <BEGIN>
SHORT_SITE_NAME =
LONG_SITE_NAME =
ECL_VERSION = 0.9g
ARCHITECTURE = PENTIUM4
MACHINE_INSTANCE = localhost
MACHINE =
SOFTWARE_TYPE = NT
SOFTWARE_VERSION = 5.0
THEHOST = win32
# Define here the processor type to compile GMP library
# with maximum optimization. Possible values are:
# gc -> generic implementation
# p0 -> Pentium processor
# p3 -> Pentium III processor
# p4 -> Pentium IV processor
GMP_TYPE = gc
# Set it to non-empty to include Win32 thread support
ECL_THREADS =
# Add the extensions to include in the build process. Current
# extensions are: asdf
ECL_MODULES = asdf
# <END> (ECL configuration)
# =============================================================
TAR_DIR = %%CD%%\ecl-$(ECL_VERSION)
# Programs used by "make":
#
CC = cl
CFLAGS = /MD /DGC_NOT_DLL
LIBS = eclgc.lib eclgmp.lib user32.lib ws2_32.lib
LDFLAGS = -MD -Zi
RM = del
RMDIR = rmdir /Q /S
MKDIR = mkdir
EXE = .exe
CP = copy /Y
MV = move /Y
MSDEV = msdev
MKNSI = makensis.exe
# ==================== Where To Install Things ====================
# The default location for installation. Everything is placed in
# subdirectories of this directory. The default values for many of
# the variables below are expressed in terms of this one, so you may
# not need to change them. This defaults to /usr/local.
prefix=D:\Software\ECL
exec_prefix=$(prefix)
bindir=$(prefix)\bin
libdir=$(prefix)\lib\ecl
# Programs used by "make install":
#
SHELL = @SHELL@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_DATA = @INSTALL_DATA@
mkinstalldirs = $(SHELL) $(top_srcdir)/gc/mkinstalldirs
# Files
#
SUBDIR = c gc gmp
LIBRARIES =
LSP_LIBRARIES = cmp.fas clx.fas sockets.fas sysfun.lsp
TARGETS = ecl$(EXE)
DEF = ecl.def
# Additional configuration for thread support
#
!if "$(ECL_THREADS)" == ""
ENV_EXPORT = cl_env,DATA
!else
ENV_EXPORT = ecl_process_env
CFLAGS = $(CFLAGS) -DECL_THREADS
DEF = ecl-threads.def
!endif
# Build rules
#
all: $(TARGETS) doc ecl-config.bat
.PHONY: all
%Makefile: $(srcdir)/%Makefile.in config.status
./config.status
c\cut$(EXE):
cd c
$(MAKE) cut$(EXE)
cd ..
$(TARGETS): ecl_min$(EXE) compile.lsp sysfun.lsp
.\ecl_min < compile.lsp
ecl-static.lib: $(TARGETS)
link -lib -out:$@ eclmin.lib c\all_symbols2.obj lsp.lib eclgmp.lib eclgc.lib
ecl_min$(EXE): $(LIBRARIES) eclmin.lib
$(CC) $(LDFLAGS) /Fe$@ cinit.obj c\all_symbols.obj eclmin.lib $(LIBS)
.gdbinit: $(srcdir)\util\gdbinit
$(CP) $(srcdir)\util\gdbinit $@
lsp/config.lsp: $(srcdir)/lsp/config.lsp.in Makefile c\cut$(EXE)
if not exist lsp $(MKDIR) lsp
c\cut "@ecldir@" "$(libdir:\=/)" \
"@SHORT_SITE_NAME@" "$(SHORT_SITE_NAME)" \
"@LONG_SITE_NAME@" "$(LONG_SITE_NAME)" \
"@PACKAGE_VERSION@" "$(ECL_VERSION)" \
"@ARCHITECTURE@" "$(ARCHITECTURE)" \
"@MACHINE_INSTANCE@" "$(MACHINE_INSTANCE)" \
"@MACHINE_VERSION@" "$(MACHINE)" \
"@SOFTWARE_TYPE@" "$(SOFTWARE_TYPE)" \
"@SOFTWARE_VERSION@" "$(SOFTWARE_VERSION)" \
"@thehost@" "$(THEHOST)" \
< $(srcdir)\lsp\config.lsp.in > lsp\config.lsp
compile.lsp: bare.lsp $(srcdir)/compile.lsp.in Makefile
c\cut "@ecldir@" "$(libdir:\=/)" \
"@true_srcdir@" "$(srcdir:\=/)" \
"@true_builddir@" "$(MAKEDIR:\=/)" \
"@CFLAGS@" "$(CFLAGS)" \
"@ECL_CFLAGS@" "" \
"@CPPFLAGS@" "" \
"@LDRPATH@" "" \
"@LDFLAGS@" "/MD /link /LIBPATH:~S" \
"@SHARED_LDFLAGS@" "/LDd" \
"@BUNDLE_LDFLAGS@" "/LDd" \
"@CLIBS@" "user32.lib ws2_32.lib" \
"@STATICLIBS@" "eclgmp.lib eclgc.lib" \
"@LIBS@" "user32.lib ws2_32.lib" \
"@CORE_LIBS@" "" \
"@FASL_LIBS@" "" \
"@OBJEXT@" "obj" \
"@SHAREDPREFIX@" "" \
"@SHAREDEXT@" "lib" \
"@LIBPREFIX@" "" \
"@LIBEXT@" "lib" \
"@EXEEXT@" ".exe" \
"@LDINSTALLNAME@" "" \
"@DEF@" "$(DEF)" \
"@ECL_MODULES@" "$(ECL_MODULES)" \
"@RANLIB@" "ranlib" \
"@PUSH_CROSS_FEATURES@" "" \
< $(srcdir)\compile.lsp.in > compile.lsp
bare.lsp: $(srcdir)/bare.lsp.in lsp/load.lsp clos/load.lsp cmp/load.lsp cmp/cmpcfg.lsp
c\cut "@true_srcdir@" "$(srcdir:\=/)" \
"@true_builddir@" "$(MAKEDIR:\=/)" < $(srcdir)\bare.lsp.in > bare.lsp
lsp/load.lsp: $(srcdir)/lsp/load.lsp.in
$(CP) $(srcdir)\lsp\load.lsp.in lsp\load.lsp
clos/load.lsp: $(srcdir)/clos/load.lsp.in
if not exist clos $(MKDIR) clos
$(CP) $(srcdir)\clos\load.lsp.in clos\load.lsp
cmp/load.lsp: $(srcdir)/cmp/load.lsp.in
if not exist cmp $(MKDIR) cmp
$(CP) $(srcdir)\cmp\load.lsp.in cmp\load.lsp
cmp/cmpcfg.lsp: $(srcdir)/cmp/cmpcfg.lsp.in Makefile
c\cut "@ECL_CC@" "$(CC)" \
"@CFLAGS@" "$(CFLAGS)" \
"@ECL_CFLAGS@" "" \
"@CPPFLAGS@" "" \
"@LDRPATH@" "" \
"@LDFLAGS@" "/MD /link /LIBPATH:~S" \
"@SHARED_LDFLAGS@" "/LDd" \
"@BUNDLE_LDFLAGS@" "/LDd" \
"@CLIBS@" "user32.lib ws2_32.lib" \
"@STATICLIBS@" "eclgmp.lib eclgc.lib" \
"@OBJEXT@" "obj" \
"@SHAREDPREFIX@" "" \
"@SHAREDEXT@" "dll" \
"@LIBPREFIX@" "" \
"@LIBEXT@" "lib" \
"@EXEEXT@" ".exe" \
< $(srcdir)\cmp\cmpcfg.lsp.in > cmp\cmpcfg.lsp
ecl-config.bat: util\ecl-config.bat Makefile
c\cut "~A" "$(libdir:\=/)"\
"~*" "" \
"@ECL_CFLAGS@" "$(CFLAGS)" \
"@LDFLAGS@" "" \
"@CLIBS@" "" \
"@libdir@" "$(libdir:\=/)" \
"@includedir@" "$(libdir:\=/)/h" \
< util\ecl-config.bat > ecl-config.bat
eclmin.lib: eclgmp.lib eclgc.lib lsp/config.lsp
cd c
$(MAKE) "ECL_THREADS = $(ECL_THREADS)"
cd ..
eclgc.lib:
cd gc
$(MAKE) nodebug=1 "ECL_THREADS = $(ECL_THREADS)" gc.lib
$(CP) gc.lib ..\eclgc.lib
cd ..
for %h in (gc.h gc_local_alloc.h gc_pthread_redirects.h \
gc_config_macros.h leak_detector.h gc_typed.h) \
do $(CP) $(srcdir)\gc\include\%h h\%h
eclgmp.lib:
cd gmp
$(MAKE) "MPN_TYPE = $(GMP_TYPE)"
$(CP) gmp.lib ..\eclgmp.lib
$(CP) gmp.h ..\h\gmp.h
cd ..
sysfun.lsp:
$(CP) $(srcdir)\cmp\sysfun.lsp .\
rt.lisp:
$(CP) $(srcdir)\..\contrib\rt\rt.lisp .\
install: install-base
for %h in (gc.h gc_local_alloc.h gc_pthread_redirects.h \
gc_config_macros.h leak_detector.h gc_typed.h) \
do $(CP) h\%h $(libdir)\h
$(CP) h\gmp.h $(libdir)\h\gmp.h
cd c
$(MAKE) install "prefix=$(prefix)"
cd ..\doc
$(MAKE) install "prefix=$(prefix)"
install-base:
IF NOT EXIST $(bindir) $(MKDIR) $(bindir)
IF NOT EXIST $(libdir)\h $(MKDIR) $(libdir)\h
for %i in ($(TARGETS) ecl.dll) do $(CP) %i $(bindir)\%i
IF EXIST $(bindir)\ecl2$(EXE) $(MV) $(bindir)\ecl2$(EXE) $(bindir)\ecl$(EXE)
$(CP) ecl-config.bat $(bindir)\ecl-config.bat
for %i in ($(LSP_LIBRARIES) $(LIBRARIES) c\dpp.exe help.doc ecl.lib) do $(CP) %i $(libdir)
for %i in ($(ECL_MODULES)) do $(CP) %i.fas $(libdir)
for %i in (ecl-static.lib) do IF EXIST %i $(CP) %i $(libdir)
$(CP) h\config.h $(libdir)\h
flatinstall:
$(MAKE) bindir=$(prefix) libdir=$(prefix) install-base
cd c
$(MAKE) prefix=$(prefix) flatinstall
cd ..\doc
$(MAKE) prefix=$(prefix) flatinstall
cd ..
windows-nsi:
IF EXIST $(TAR_DIR) $(RMDIR) $(TAR_DIR)
$(MKDIR) $(TAR_DIR)
$(MAKE) flatinstall prefix=$(TAR_DIR)
util\ecl_nsi.bat %%CD%%\$(srcdir)\util\ecl.nsi $(TAR_DIR)
$(MKNSI) $(TAR_DIR)/ecl.nsi
$(MV) $(TAR_DIR)\Setup.exe ecl-$(ECL_VERSION).exe
$(RMDIR) $(TAR_DIR)
uninstall:
for i in $(TARGETS) ecl-config; do rm -rf $(bindir)/$$i; done
rm -rf $(libdir)
cd doc; $(MAKE) uninstall
doc: $(TARGETS)
cd doc
$(MAKE)
cd ..
clean: clean_ecl clean_lisp clean_doc
-$(RM) .gdbinit
cd gc
-$(MAKE) "ECL_THREADS = $(ECL_THREADS)" clean
cd ..
-for %h in (gc.h gc_local_alloc.h gc_pthread_redirects.h \
gc_config_macros.h leak_detector.h gc_typed.h) \
do $(RM) h\%h
cd gmp
$(MAKE) "ECL_THREADS = $(ECL_THREADS)" clean
cd ..
-$(RM) h\gmp.h
clean_ecl:
-for %i in (eclgc.lib eclgmp.lib lsp\config.lsp compile.lsp bare.lsp \
lsp\load.lsp clos\load.lsp cmp\load.lsp cmp\cmpcfg.lsp \
ecl.lib ecl.dll ecl_min$(EXE) eclmin.lib help.doc sysfun.lsp \
$(TARGETS) *.exp *.ilk *.pdb *.c *.obj ecl-config.bat ecl-static.lib) \
do $(RM) %i
cd c
-$(MAKE) "ECL_THREADS = $(ECL_THREADS)" clean
cd ..
clean_lisp:
-for %i in (lsp cmp clos clx tk $(ECL_MODULES) sockets) do for %k in (%i.lib %i.fas %i.ilk %i.c %i.obj %i.pdb) do $(RM) %k
-for %i in (lsp cmp clos clx tk ext) do $(RMDIR) %i
-$(RM) help.doc
clean_doc:
cd doc
-$(MAKE) "ECL_THREADS = $(ECL_THREADS)" clean
cd ..
distclean: clean
realclean: distclean
test1:
cd c; $(MAKE)
$(MAKE) ecl_min
$(MAKE) ecl
cd tests; $(MAKE)
diff tests tests2
test2:
$(MAKE) clean_lisp
cd c; $(MAKE)
$(MAKE) ecl_min
$(RM) ecl
$(MAKE) ecl
for i in lsp clos cmp; do diff --exclude=\*.o $$i old/$$i; done
test3:
-mkdir stage2
cp -rf lsp clos cmp stage2
-for i in lsp cmp clos clx tk; do test -f lib$$i.a && mv lib$$i.a stage2; done
$(MAKE) clean_lisp
./ecl < compile.lsp
-for i in lsp clos cmp clx tk; do test -d $$i && diff --exclude=\*.o $$i stage2/$$i; done | less
test:
$(MAKE) -C tests
$(MAKE) -C ansi-tests > ansi-tests/log
#-(diff tests ~/src/tests; diff --exclude log ansi-tests ~/src/ansi-tests) | less