Final fixes to make the new directory structure work with MSVC++

This commit is contained in:
jjgarcia 2006-02-28 14:21:26 +00:00
parent 67f578cc5a
commit d9997268f8
14 changed files with 64 additions and 32 deletions

View file

@ -59,7 +59,7 @@ CC = cl
MFLAGS = -MD
CFLAGS = -GX -DGC_DLL -nologo
LIBS = eclgc.lib eclgmp.lib user32.lib ws2_32.lib
LDFLAGS = /link /nodefaultlib:libcmt /nodefaultlib:libc /nodefaultlib:libd
LDFLAGS = /link /nodefaultlib:libcmt /nodefaultlib:libcmtd /nodefaultlib:libc /nodefaultlib:libd
SHARED_LDFLAGS = -LD
GCFLAGS = nodebug=1
RM = del
@ -166,8 +166,10 @@ c\cut$(EXE): $(top_srcdir)\util\cut.c
$(MAKE) cut$(EXE)
cd ..
$(TARGETS): ecl_min$(EXE) compile.lsp sysfun.lsp
$(TARGETS): ecl_min$(EXE) compile.lsp sysfun.lsp BUILD-STAMP
.\ecl_min < compile.lsp
BUILD-STAMP: Makefile
date /t > $@
ecl-static.lib: $(TARGETS)
link -lib -out:$@ eclmin.lib c\all_symbols2.obj lsp.lib eclgmp.lib eclgc.lib
@ -229,7 +231,7 @@ clos/load.lsp: $(srcdir)/clos/load.lsp.in
cmp/load.lsp: $(srcdir)/cmp/load.lsp.in
if not exist cmp $(MKDIR) cmp
$(CP) $(srcdir)\cmp\load.lsp.in cmp\load.lsp
cmp/cmpcdefs.lsp: $(srcdir)/cmp/cmpdefs.lsp Makefile
cmp/cmpdefs.lsp: $(srcdir)/cmp/cmpdefs.lsp Makefile
c\cut "@ECL_CC@" "$(CC)" \
"@CFLAGS@" "$(CFLAGS)" \
"@ECL_CFLAGS@" "" \
@ -278,8 +280,9 @@ eclgc.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 ecl\%h
gc_config_macros.h leak_detector.h gc_typed.h \
private\gc_priv.h private\gcconfig.h gc_mark.h) \
do $(CP) $(srcdir)\gc\include\%h ecl\gc\%h
eclgmp.lib:
cd gmp
$(MAKE) "MPN_TYPE = $(GMP_TYPE)" "MFLAGS = $(MFLAGS)"
@ -294,7 +297,8 @@ 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) \
gc_config_macros.h leak_detector.h gc_typed.h \
gc_mark.h private\gc_priv.h private\gcconfig.h) \
do $(CP) ecl\%h $(libdir)\ecl
$(CP) ecl\gmp.h $(libdir)\ecl\gmp.h
cd c
@ -346,8 +350,9 @@ clean: clean_ecl clean_lisp clean_doc
-$(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) ecl\%h
gc_config_macros.h leak_detector.h gc_typed.h \
gc_mark.h private\gc_priv.h private\gcconfig.h) \
do $(RM) ecl\gc\%h
cd gmp
$(MAKE) "ECL_THREADS = $(ECL_THREADS)" clean
cd ..

View file

@ -16,7 +16,7 @@ THREADS_FLAGS=
#
TRUE_CC = cl
CC = cl
CFLAGS = -c $(ECL_CFLAGS) -I./ -I$(srcdir) -I$(HDIR) -I../h -I$(top_srcdir)/gc/include
CFLAGS = -c $(ECL_CFLAGS) -I./ -I../ -I$(srcdir) -I$(top_srcdir)/gc/include
# -Wall -W -Wfloat-equal -Wundef -Wendif-labels -Wpointer-arith -Wcast-align \
# -Wwrite-strings -Wconversion -Wsign-compare -Wmissing-prototypes -Wredundant-decls \
# -Wunreachable-code -Winline
@ -45,7 +45,9 @@ HFILES = ..\ecl\config.h $(HDIR)\ecl.h $(HDIR)\ecl-cmp.h\
$(HDIR)\object.h $(HDIR)\cs.h $(HDIR)\stacks.h\
$(HDIR)\external.h $(HDIR)\eval.h\
$(HDIR)\number.h $(HDIR)\page.h $(HDIR)\unify.h\
$(HDIR)\lwp.h $(HDIR)\internal.h
$(HDIR)\lwp.h $(HDIR)\internal.h $(HDIR)\ecl-inl.h\
$(HDIR)\bytecodes.h
OBJS = main.obj symbol.obj package.obj list.obj\
apply.obj eval.obj interpreter.obj compiler.obj disassembler.obj \
instance.obj gfun.obj reference.obj character.obj\
@ -60,7 +62,7 @@ OBJS = main.obj symbol.obj package.obj list.obj\
structure.obj load.obj unixfsys.obj unixsys.obj \
ffi.obj alloc_2.obj tcp.obj $(THREADS_OBJ) ffi_x86.obj
all: $(DPP) external.h ..\eclmin.lib ..\cinit.obj
all: $(DPP) ecl\external.h ..\eclmin.lib ..\cinit.obj
.SUFFIXES: .obj .c .d
@ -82,7 +84,7 @@ all: $(DPP) external.h ..\eclmin.lib ..\cinit.obj
# declarations, because the variables that they mark are in the
# in the library and can be referenced without indirection.
#
external.h: $(top_srcdir)/h/external.h Makefile
ecl\external.h: $(top_srcdir)/h/external.h Makefile
cut.exe removedecl < $(top_srcdir)/h/external.h > $@
cut.exe: $(top_srcdir)/util/cut.c
@ -106,7 +108,7 @@ flatinstall: $(HFILES)
$(LINK) -lib -out:$@ $(OBJS)
clean:
-for %f in (..\ecl\config.h dpp dpp.obj $(DPP) external.h \
-for %f in (..\ecl\config.h dpp dpp.obj $(DPP) ecl\external.h \
..\eclmin.lib ..\cinit.obj cinit.c \
symbols_list2.h) \
do $(RM) %f
@ -116,9 +118,10 @@ clean:
# Build rules
$(DPP): $(srcdir)/dpp.c $(srcdir)/symbols_list2.h ../h/config.h
$(TRUE_CC) -I../h -I./ -I$(HDIR) $(DEFS) $(srcdir)/dpp.c -o $@
../h/config.h: ../h/config.h.msvc6 Makefile
$(DPP): $(srcdir)/dpp.c $(srcdir)/symbols_list2.h ../ecl/config.h ecl\external.h
$(TRUE_CC) -I.. -I./ $(DEFS) $(srcdir)/dpp.c -o $@
../ecl/config.h: ../ecl/config.h.msvc6 Makefile
for %i in ($(HFILES)) do $(CP) %i ..\ecl
cut.exe "@ECL_FPE_CODE@" "$(srcdir:\=/)/arch/fpe_x86.c" \
< ..\ecl\config.h.msvc6 > $@
@ -136,12 +139,12 @@ apply.o: apply.c $(HFILES) $(HDIR)/cs.h
# These files are interrelated
#
all_symbols.obj: all_symbols.c
$(CC) $(CFLAGS) -Fo$@ -I./ all_symbols.c
$(CC) $(CFLAGS) -Fo$@ -I../ -I./ all_symbols.c
all_symbols2.obj: all_symbols.c
$(CC) $(CFLAGS) -DECL_FINAL -Fo$@ -I./ all_symbols.c
$(CC) $(CFLAGS) -DECL_FINAL -Fo$@ -I../ -I./ all_symbols.c
#
# This is in another directory
#
../cinit.obj: cinit.c
$(CC) $(CFLAGS) -I./ -o cinit.obj cinit.c
$(CC) $(CFLAGS) -I../ -I./ -o cinit.obj cinit.c
$(MV) cinit.obj ..\

View file

@ -62,7 +62,7 @@ ecl/external.h: c/external.h
cp $(srcdir)/h/*.h ecl/
if grep 'undef ENABLE_DLOPEN' ecl/config.h; then cp c/external.h h; fi
bin/ecl$(EXE): ecl_min$(EXE) compile.lsp sysfun.lsp ecl/external.h
bin/ecl$(EXE): ecl_min$(EXE) compile.lsp sysfun.lsp ecl/external.h BUILD-STAMP
if [ -f CROSS-COMPILER ]; then \
./CROSS-COMPILER < compile.lsp; \
else \
@ -116,7 +116,7 @@ rt.lisp:
BUILD-STAMP: config.status
echo "#" `uname -a` > $@
head -8 config.log | tail -6 >> $@
install: BUILD-STAMP install-base
install: install-base
cd c; $(MAKE) prefix=$(prefix) DESTDIR=$(DESTDIR) install
cd doc; $(MAKE) prefix=$(prefix) DESTDIR=$(DESTDIR) install
install-base:

View file

@ -18,8 +18,8 @@
#include <ecl/ecl.h>
#include <ecl/internal.h>
#include <ecl/page.h>
#include <ecl/gc/gc.h>
#include <ecl/gc/private/gc_priv.h>
#include <gc.h>
#include <private/gc_priv.h>
#ifdef GBC_BOEHM

View file

@ -1023,7 +1023,7 @@ BEGIN:
#if defined(ECL_WSOCK)
case smm_io_wsock:
case smm_input_wsock: {
int fp = strm->stream.file;
int fp = (int)strm->stream.file;
if (!strm->stream.char_stream_p)
not_a_character_stream(strm);
if ( fp == INVALID_SOCKET )

View file

@ -20,6 +20,7 @@
#include <stdlib.h>
#include <limits.h>
#include <ecl/internal.h>
extern int GC_dont_gc;
/******************************* EXPORTS ******************************/

View file

@ -24,6 +24,9 @@
#include <ecl/ecl.h>
#include <float.h>
#include <math.h>
#ifdef _MSC_VER
# undef complex
#endif
#ifndef HAVE_ISOC99
# define floorf floor
# define ceilf ceil

View file

@ -16,6 +16,9 @@
#include <ecl/ecl.h>
#include <math.h>
#ifdef _MSC_VER
# undef complex
#endif
#ifndef HAVE_ISOC99
# define expf exp
# define logf log

View file

@ -16,6 +16,9 @@
#include <ecl/ecl.h>
#include <math.h>
#ifdef _MSC_VER
# undef complex
#endif
#include <float.h>
#include <ecl/internal.h>

View file

@ -19,6 +19,9 @@
#include <stdlib.h>
#include <float.h>
#include <math.h>
#ifdef _MSC_VER
# undef complex
#endif
#include <ctype.h>
#ifndef _MSC_VER
#include <unistd.h>

View file

@ -18,6 +18,9 @@
#include <limits.h>
#include <float.h>
#include <math.h>
#ifdef _MSC_VER
# undef complex
#endif
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
@ -25,6 +28,8 @@
#include <ecl/ecl-inl.h>
#include <ecl/bytecodes.h>
#undef _complex
#define cat(rtbl,c) ((rtbl)->readtable.table[c].syntax_type)
#define read_suppress (SYM_VAL(@'*read-suppress*') != Cnil)
@ -384,7 +389,7 @@ parse_number(const char *s, cl_index end, cl_index *ep, int radix)
#ifdef __GNUC__
char buffer[end+1];
#else
char *buffer = cl_alloc_atomic(end+1);
char *buffer = (char*)cl_alloc_atomic(end+1);
#endif
char *parse_end;
char exp_marker;

View file

@ -16,12 +16,15 @@
#include <ecl/ecl.h>
#include <math.h>
#ifdef _MSC_VER
# undef complex
#endif
#include <time.h>
#ifdef HAVE_TIMES
#include <sys/times.h>
# include <sys/times.h>
#endif
#ifndef _MSC_VER
#include <unistd.h>
# include <unistd.h>
#endif
#include <ecl/internal.h>

View file

@ -68,11 +68,14 @@ Returns, as a string, the version of the software under which ECL runs."
;; * Set configuration pathnames. Notice the trailing slash!
;; Otherwise it would not be a directory.
;;
#-(and mingw32 msvc)
(si::pathname-translations "SYS" '(("**;*.*" "@ecldir@/**/*.*")))
#+(or mingw32 msvc)
(si::pathname-translations "SYS"
`(("**;*.*" ,(merge-pathnames "**/*.*" (si::get-library-pathname)))))
#-ecl-min
(progn
#-(and mingw32 msvc)
(si::pathname-translations "SYS" '(("**;*.*" "@ecldir@/**/*.*")))
#+(or mingw32 msvc)
(si::pathname-translations "SYS"
`(("**;*.*" ,(merge-pathnames "**/*.*" (si::get-library-pathname)))))
);#-eclmin
#-msvc
(si::pathname-translations "HOME" '(("**;*.*" "~/**/*.*")))
#+msvc