mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-18 23:32:17 -08:00
build: remove c/-subdir recursive make
This commit is contained in:
parent
6b67cf5cad
commit
09cdf272a2
5 changed files with 190 additions and 216 deletions
218
src/Makefile.in
218
src/Makefile.in
|
|
@ -2,7 +2,7 @@
|
|||
# vim: set filetype=makefile tabstop=8 shiftwidth=4 expandtab:
|
||||
|
||||
#
|
||||
# Makefile for ECoLisp
|
||||
# Makefile for ECoLisp
|
||||
#
|
||||
top_srcdir= @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
|
|
@ -15,6 +15,11 @@ manext=1
|
|||
|
||||
@SET_MAKE@
|
||||
CC = @ECL_CC@
|
||||
TRUE_CC = $(CC)
|
||||
CFLAGS = -Werror -Wno-error=shift-count-overflow \
|
||||
-I. -I@true_builddir@ -I$(srcdir)/c -Iecl/gc \
|
||||
-DECL_BUILD -DECL_API -DECL_NO_LEGACY \
|
||||
@CPPFLAGS@ @CFLAGS@ @ECL_CFLAGS@ -c
|
||||
LIBS = @LIBS@
|
||||
FASL_LIBS = @FASL_LIBS@
|
||||
CORE_LIBS = @CORE_LIBS@
|
||||
|
|
@ -23,6 +28,15 @@ RM = @RM@
|
|||
LN_S = @LN_S@
|
||||
EXE = @EXEEXT@
|
||||
ETAGS = @ETAGS@
|
||||
DPP = ./dpp$(EXE)
|
||||
RANLIB = @RANLIB@
|
||||
AR = @AR@
|
||||
|
||||
# The following flags could be added and used by GCC
|
||||
# -Wall -W -Wfloat-equal -Wundef -Wendif-labels -Wpointer-arith -Wcast-align \
|
||||
# -Wwrite-strings -Wconversion -Wsign-compare -Wmissing-prototypes \
|
||||
# -Wredundant-decls -Wunreachable-code -Winline
|
||||
|
||||
|
||||
# ==================== Where To Install Things ====================
|
||||
|
||||
|
|
@ -41,6 +55,7 @@ ecldir=@ecldir@/
|
|||
#
|
||||
SHELL = @SHELL@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_LIBRARY = $(INSTALL_SCRIPT)
|
||||
|
|
@ -55,22 +70,166 @@ LSP_LIBRARIES = @LSP_LIBRARIES@
|
|||
TARGETS = @TARGETS@
|
||||
ECL_CMPDIR = @ECL_CMPDIR@
|
||||
|
||||
all: $(TARGETS) bin/ecl-config .git/tags TAGS
|
||||
.PHONY: all
|
||||
all: $(TARGETS) bin/ecl-config .git/tags TAGS
|
||||
.PHONY: all
|
||||
.SUFFIXES: .c .o .d .s
|
||||
|
||||
ifndef VERBOSE
|
||||
.SILENT:
|
||||
endif
|
||||
|
||||
%Makefile: $(srcdir)/%Makefile.in config.status
|
||||
./config.status
|
||||
|
||||
#
|
||||
|
||||
# ECL core library (ecl_min)
|
||||
HDIR = ecl
|
||||
HFILES = $(HDIR)/config.h \
|
||||
$(HDIR)/ecl.h \
|
||||
$(HDIR)/ecl-cmp.h \
|
||||
$(HDIR)/object.h \
|
||||
$(HDIR)/cs.h \
|
||||
$(HDIR)/stacks.h \
|
||||
$(HDIR)/external.h \
|
||||
$(HDIR)/cons.h \
|
||||
$(HDIR)/legacy.h \
|
||||
$(HDIR)/number.h \
|
||||
$(HDIR)/page.h
|
||||
|
||||
DFILES = $(addprefix $(srcdir)/c/,main.d symbol.d package.d cons.d list.d apply.d eval.d interpreter.d compiler.d disassembler.d instance.d gfun.d clos/cache.d clos/accessor.d reference.d character.d file.d read.d print.d error.d string.d cfun.d reader/parse_integer.d reader/parse_number.d printer/float_to_digits.d printer/float_to_string.d printer/integer_to_string.d printer/write_ugly.d printer/write_object.d printer/write_symbol.d printer/write_array.d printer/write_list.d printer/write_code.d printer/write_sse.d printer/print_unreadable.d ffi/libraries.d ffi/backtrace.d ffi/mmap.d ffi/cdata.d numbers/cos.d numbers/sin.d numbers/tan.d numbers/atan.d numbers/cosh.d numbers/sinh.d numbers/tanh.d numbers/exp.d numbers/expt.d numbers/log.d numbers/sqrt.d numbers/abs.d numbers/zerop.d numbers/plusp.d numbers/minusp.d numbers/negate.d numbers/conjugate.d numbers/one_plus.d numbers/one_minus.d numbers/plus.d numbers/minus.d numbers/times.d numbers/divide.d numbers/number_compare.d numbers/number_equalp.d numbers/minmax.d numbers/floor.d numbers/ceiling.d numbers/round.d numbers/truncate.d typespec.d assignment.d predicate.d number.d num_pred.d num_arith.d num_co.d num_log.d num_rand.d array.d vector_push.d sequence.d cmpaux.d macros.d backq.d stacks.d time.d unixint.d mapfun.d multival.d hash.d format.d pathname.d structure.d load.d unixfsys.d unixsys.d serialize.d ffi.d sse2.d threads/atomic.d)
|
||||
|
||||
CFILES = $(DFILES:$(srcdir)/c/%.d=c/%.c)
|
||||
OFILES = $(CFILES:%.c=%.o)
|
||||
|
||||
# Build rules
|
||||
|
||||
$(DPP): $(srcdir)/c/dpp.c $(srcdir)/c/symbols_list2.h
|
||||
if test -f CROSS-DPP; then touch $@; else \
|
||||
$(TRUE_CC) -I$(srcdir)/c/ -I@true_builddir@ -I./ \
|
||||
$(srcdir)/c/dpp.c \
|
||||
@CPPFLAGS@ @CFLAGS@ @ECL_CFLAGS@ \
|
||||
-o $@ ; \
|
||||
fi
|
||||
|
||||
$(HFILES):
|
||||
cp -rf $(srcdir)/h/*.h $(srcdir)/h/impl ecl/
|
||||
|
||||
$(OFILES): $(DPP) c/ecl/external.h $(HFILES) $(srcdir)/c/* $(CFILES)
|
||||
|
||||
# When compiling the library itself, we have to remove the dllimport
|
||||
# declarations, because the variables that they mark are in the
|
||||
# in the library and can be referenced without indirection.
|
||||
#
|
||||
c/ecl/external.h: $(top_srcdir)/h/external.h
|
||||
test -d c/ecl || mkdir c/ecl
|
||||
sed 's,__declspec(dllimport),,g' $(top_srcdir)/h/external.h > $@
|
||||
ecl/external.h: c/ecl/external.h c/ecl/external.h
|
||||
cp -rf $(srcdir)/h/*.h $(srcdir)/h/impl ecl/
|
||||
|
||||
# symbols_list2.h is built this way to allow for an atomic replacement of
|
||||
# the file. Otherwise we have problem when doing concurrent builds with
|
||||
# rsync updates of the source tree.
|
||||
$(srcdir)/c/symbols_list2.h: $(srcdir)/c/symbols_list.h Makefile
|
||||
cat $(srcdir)/c/symbols_list.h | \
|
||||
sed -e 's%{\([A-Z ]*.*".*"\),[^,]*,[ ]*NULL,.*}%{\1,NULL}%g' \
|
||||
-e 's%{\([A-Z ]*.*".*"\),[^,]*,[ ]*\([^,]*\),.*}%{\1,"\2"}%g' \
|
||||
-e 's%{NULL.*%{NULL,NULL}};%' | \
|
||||
sed -e 's%"\(IF_[A-Z0-9]*\)(\([^)]*\))"%\1("\2")%g' > tmp.h
|
||||
mv tmp.h $@
|
||||
|
||||
# These files are interrelated
|
||||
c/all_symbols.c: $(DPP)
|
||||
c/all_symbols.o: c/all_symbols.c ecl/external.h
|
||||
$(CC) -I./c/ $(CFLAGS) c/all_symbols.c -o $@
|
||||
c/all_symbols2.o: c/all_symbols.c
|
||||
$(CC) $(CFLAGS) -DECL_FINAL -I./c/ c/all_symbols.c -o $@
|
||||
|
||||
# reduces the overhead of jumping to other functions
|
||||
# c/apply.c: $(DPP)
|
||||
# c/apply.o: c/apply.c $(HFILES)
|
||||
# $(CC) $(CFLAGS) c/apply.c -o $@
|
||||
|
||||
# experimental apply (why isn't referenced anywhere?)
|
||||
# apply_x86.c: $(srcdir)/arch/apply_x86.d $(DPP) $(HFILES)
|
||||
# if test -f CROSS-DPP ; then \
|
||||
# CROSS-DPP $(srcdir)/arch/apply_x86.d $@ \
|
||||
# else $(DPP) $(srcdir)/arch/apply_x86.d $@ ; fi
|
||||
|
||||
# lisp initialization
|
||||
c/cinit.c: $(DPP)
|
||||
c/cinit.o: c/cinit.c $(HFILES)
|
||||
$(CC) $(CFLAGS) -I./ c/cinit.c -o $@
|
||||
|
||||
# general file extension rules
|
||||
|
||||
c/%.c: $(srcdir)/c/%.d $(DPP) $(HFILES)
|
||||
if test -f CROSS-DPP ; then CROSS-DPP $< $@ ; else $(DPP) $< $@ ; fi
|
||||
|
||||
c/%.o: c/%.c
|
||||
@echo "Compiling $@..."
|
||||
$(CC) -DECLDIR="\"@ecldir@\"" $(CFLAGS) -o $@ $<
|
||||
|
||||
c/%.o: $(srcdir)/c/%.c
|
||||
@echo "Compiling $@..."
|
||||
$(CC) -DECLDIR="\"@ecldir@\"" $(CFLAGS) -o $@ $<
|
||||
|
||||
# c/%.o: $(srcdir)/c/%.d $(DPP) $(HFILES)
|
||||
# $(CC) -DECLDIR="\"@ecldir@\"" $(CFLAGS) -o $@ $@.c
|
||||
|
||||
# .d.s: $(HFILES)
|
||||
# if test -f CROSS-DPP ; then CROSS-DPP $< $@.c ; else $(DPP) $< $@.c ; fi
|
||||
# $(CC) -DECLDIR="\"@ecldir@\"" $(CFLAGS) -S -o $@ $@.c
|
||||
|
||||
# prerequisite libraries
|
||||
libeclgc.a: libeclatomic.a
|
||||
test -d ecl/gc || mkdir ecl/gc
|
||||
test -d ecl/gc/private || mkdir ecl/gc/private
|
||||
if (echo $(SUBDIRS) | grep gc); then \
|
||||
cd gc && $(MAKE) install && cd .. && \
|
||||
cp -rf $(srcdir)/@ECL_GC_DIR@/include/private/*.h ecl/gc/private/ && \
|
||||
mv libgc.a libeclgc.a; \
|
||||
fi
|
||||
libeclffi.a:
|
||||
if (echo $(SUBDIRS) | grep libffi); then \
|
||||
cd libffi && $(MAKE) install && cd .. && \
|
||||
sed -e 's,<ffitarget,<ecl/ffitarget,' ecl/ffi.h > ecl/foo.h && \
|
||||
rm ecl/ffi.h && mv ecl/foo.h ecl/ffi.h && \
|
||||
mv libffi.a libeclffi.a; \
|
||||
fi
|
||||
libeclatomic.a:
|
||||
if (echo $(SUBDIRS) | grep atomic); then \
|
||||
cd atomic && $(MAKE) && $(MAKE) install && cd .. && \
|
||||
$(RM) -rf share ecl/atomic_ops_stack.h ecl/atomic_ops_malloc.h *atomic*gpl* && \
|
||||
mv libatomic_ops.a libeclatomic.a; \
|
||||
fi
|
||||
libeclgmp.a:
|
||||
if (echo $(SUBDIRS) | grep gmp); then \
|
||||
cd gmp && $(MAKE) install && \
|
||||
cd .. && mv include/gmp.h ecl/ && rmdir include && \
|
||||
mv ./libgmp.a ./libeclgmp.a; \
|
||||
fi
|
||||
|
||||
# final objects archive
|
||||
libeclmin.a: libeclgmp.a libeclatomic.a libeclgc.a libeclffi.a $(OFILES) @EXTRA_OBJS@ c/all_symbols.o c/all_symbols2.o lsp/config.lsp $(ECL_CMPDIR)/cmpdefs.lsp ecl/external.h
|
||||
@echo "Building $@..."
|
||||
$(RM) $@
|
||||
$(AR) cr $@ $(OFILES) @EXTRA_OBJS@
|
||||
$(RANLIB) $@
|
||||
|
||||
ecl_min$(EXE): $(LIBRARIES) .gdbinit libeclmin.a c/cinit.o
|
||||
@echo "Building $@..."
|
||||
if [ -f CROSS-COMPILER ]; then \
|
||||
touch $@; \
|
||||
else \
|
||||
$(CC) $(LDFLAGS) -o $@ \
|
||||
c/cinit.o c/all_symbols.o \
|
||||
-L./ libeclmin.a \
|
||||
$(CORE_LIBS) $(FASL_LIBS) $(LIBS);\
|
||||
fi
|
||||
|
||||
clean-ecl_min:
|
||||
$(RM) -rf $(DPP) ecl_min$(EXE) libecl*.a c/
|
||||
for i in $(srcdir)/c/*/; do mkdir -p c/`basename $$i`; done
|
||||
|
||||
|
||||
# Common Lisp
|
||||
|
||||
bin/ecl$(EXE): ecl_min$(EXE) compile.lsp ecl/external.h build-stamp $(top_srcdir)/lsp/*.lsp $(top_srcdir)/clos/*.lsp $(top_srcdir)/*cmp/*.lsp
|
||||
if [ -f CROSS-COMPILER ]; then \
|
||||
|
|
@ -86,12 +245,6 @@ bin/ecl$(EXE): ecl_min$(EXE) compile.lsp ecl/external.h build-stamp $(top_srcdir
|
|||
$(LN_S) @SONAME3@ @SONAME@ ) \
|
||||
fi
|
||||
|
||||
ecl_min$(EXE): $(LIBRARIES) .gdbinit @LIBPREFIX@eclmin.@LIBEXT@
|
||||
if [ -f CROSS-COMPILER ]; then \
|
||||
touch $@; \
|
||||
else \
|
||||
$(CC) $(LDFLAGS) -o $@ cinit.o c/all_symbols.o -L./ @LIBPREFIX@eclmin.@LIBEXT@ $(CORE_LIBS) $(FASL_LIBS) $(LIBS);\
|
||||
fi
|
||||
mini_ecl: ecl_min$(EXE) bare2.lsp
|
||||
(echo '#!/bin/sh'; echo './ecl_min bare2.lsp') > $@
|
||||
chmod +x $@
|
||||
|
|
@ -115,37 +268,6 @@ bin/ecl-config: bin/ecl-config.pre
|
|||
-e 's,@includedir\\@,$(includedir),' \
|
||||
-e 's,~A,$(libdir),' bin/ecl-config.pre > bin/ecl-config
|
||||
|
||||
|
||||
@LIBPREFIX@eclmin.@LIBEXT@: @LIBPREFIX@eclgmp.@LIBEXT@ @LIBPREFIX@eclatomic.@LIBEXT@ @LIBPREFIX@eclgc.@LIBEXT@ @LIBPREFIX@eclffi.@LIBEXT@ lsp/config.lsp $(ECL_CMPDIR)/cmpdefs.lsp ecl/external.h $(top_srcdir)/c/*.d
|
||||
cd c; $(MAKE)
|
||||
@LIBPREFIX@eclgc.@LIBEXT@: @LIBPREFIX@eclatomic.@LIBEXT@
|
||||
test -d ecl/gc || mkdir ecl/gc
|
||||
test -d ecl/gc/private || mkdir ecl/gc/private
|
||||
if (echo $(SUBDIRS) | grep gc); then \
|
||||
cd gc && $(MAKE) install && cd .. && \
|
||||
cp -rf $(srcdir)/@ECL_GC_DIR@/include/private/*.h ecl/gc/private/ && \
|
||||
mv @LIBPREFIX@gc.@LIBEXT@ @LIBPREFIX@eclgc.@LIBEXT@; \
|
||||
fi
|
||||
@LIBPREFIX@eclffi.@LIBEXT@:
|
||||
if (echo $(SUBDIRS) | grep libffi); then \
|
||||
cd libffi && $(MAKE) install && cd .. && \
|
||||
sed -e 's,<ffitarget,<ecl/ffitarget,' ecl/ffi.h > ecl/foo.h && \
|
||||
rm ecl/ffi.h && mv ecl/foo.h ecl/ffi.h && \
|
||||
mv @LIBPREFIX@ffi.@LIBEXT@ @LIBPREFIX@eclffi.@LIBEXT@; \
|
||||
fi
|
||||
@LIBPREFIX@eclatomic.@LIBEXT@:
|
||||
if (echo $(SUBDIRS) | grep atomic); then \
|
||||
cd atomic && $(MAKE) && $(MAKE) install && cd .. && \
|
||||
$(RM) -rf share ecl/atomic_ops_stack.h ecl/atomic_ops_malloc.h *atomic*gpl* && \
|
||||
mv @LIBPREFIX@atomic_ops.@LIBEXT@ @LIBPREFIX@eclatomic.@LIBEXT@; \
|
||||
fi
|
||||
@LIBPREFIX@eclgmp.@LIBEXT@:
|
||||
if (echo $(SUBDIRS) | grep gmp); then \
|
||||
cd gmp && $(MAKE) install && \
|
||||
cd .. && mv include/gmp.h ecl/ && rmdir include && \
|
||||
mv ./@LIBPREFIX@gmp.@LIBEXT@ ./@LIBPREFIX@eclgmp.@LIBEXT@; \
|
||||
fi
|
||||
|
||||
build-stamp: config.status
|
||||
echo "#" `uname -a` > $@
|
||||
head -8 config.log | tail -6 >> $@
|
||||
|
|
@ -190,7 +312,7 @@ install:
|
|||
$(LN_S) @SONAME3@ @SONAME1@ && \
|
||||
$(LN_S) @SONAME3@ @SONAME@ ) \
|
||||
fi
|
||||
$(INSTALL_PROGRAM) c/dpp$(EXE) $(DESTDIR)$(ecldir)
|
||||
$(INSTALL_PROGRAM) dpp$(EXE) $(DESTDIR)$(ecldir)
|
||||
$(INSTALL_PROGRAM) ecl_min$(EXE) $(DESTDIR)$(ecldir)
|
||||
for i in `cat modules`; do \
|
||||
case $$i in \
|
||||
|
|
@ -198,7 +320,7 @@ install:
|
|||
*) $(INSTALL_DATA) $$i $(DESTDIR)$(ecldir);; \
|
||||
esac \
|
||||
done
|
||||
for i in LICENSE LGPL; do \
|
||||
for i in LICENSE COPYING; do \
|
||||
$(INSTALL_DATA) $(top_srcdir)/../$$i $(DESTDIR)$(ecldir); \
|
||||
done
|
||||
$(mkinstalldirs) $(DESTDIR)$(mandir)/man$(manext)
|
||||
|
|
@ -220,9 +342,9 @@ uninstall:
|
|||
|
||||
clean: mostlyclean
|
||||
$(RM) -r *
|
||||
mostlyclean: clean_lisp
|
||||
mostlyclean: clean-ecl_min clean_lisp
|
||||
(cd tests && $(MAKE) clean)
|
||||
for i in $(SUBDIRS); do (test -d $$i && cd $$i && $(MAKE) clean); done
|
||||
-for i in $(SUBDIRS); do (test -d $$i && cd $$i && $(MAKE) clean); done
|
||||
$(RM) ecl_min$(EXE) bin/ecl$(EXE) help.doc core a.out TAGS
|
||||
$(RM) config.version config.log config.cache
|
||||
$(RM) *.c *.o *.a *.eclh *.h *.data *.fas *.dat *.la *.so *.dylib
|
||||
|
|
|
|||
10
src/aclocal.m4
vendored
10
src/aclocal.m4
vendored
|
|
@ -248,7 +248,7 @@ THREAD_CFLAGS=''
|
|||
THREAD_LIBS=''
|
||||
THREAD_GC_FLAGS='--enable-threads=posix'
|
||||
INSTALL_TARGET='install'
|
||||
THREAD_OBJ="$THREAD_OBJ threads/process threads/queue threads/mutex threads/condition_variable threads/semaphore threads/barrier threads/mailbox"
|
||||
THREAD_OBJ="$THREAD_OBJ c/threads/process c/threads/queue c/threads/mutex c/threads/condition_variable c/threads/semaphore c/threads/barrier c/threads/mailbox"
|
||||
clibs='-lm'
|
||||
SONAME=''
|
||||
SONAME_LDFLAGS=''
|
||||
|
|
@ -923,7 +923,7 @@ AC_CHECK_FUNC( [pthread_rwlock_init], [
|
|||
AC_DEFINE([HAVE_POSIX_RWLOCK], [], [HAVE_POSIX_RWLOCK])
|
||||
], [])
|
||||
], [])
|
||||
THREAD_OBJ="$THREAD_OBJ threads/rwlock"
|
||||
THREAD_OBJ="$THREAD_OBJ c/threads/rwlock"
|
||||
])
|
||||
|
||||
|
||||
|
|
@ -1040,7 +1040,7 @@ if test "${enable_boehm}" = auto -o "${enable_boehm}" = system; then
|
|||
fi
|
||||
else
|
||||
FASL_LIBS="${FASL_LIBS} -lgc"
|
||||
EXTRA_OBJS="${EXTRA_OBJS} alloc_2.${OBJEXT}"
|
||||
EXTRA_OBJS="${EXTRA_OBJS} c/alloc_2.${OBJEXT}"
|
||||
AC_DEFINE(GBC_BOEHM, [1], [Use Boehm's garbage collector])
|
||||
fi
|
||||
fi
|
||||
|
|
@ -1071,7 +1071,7 @@ if test "${enable_boehm}" = "included"; then
|
|||
ECL_BOEHM_GC_HEADER='ecl/gc/gc.h'
|
||||
SUBDIRS="${SUBDIRS} gc"
|
||||
CORE_LIBS="-leclgc ${CORE_LIBS}"
|
||||
EXTRA_OBJS="${EXTRA_OBJS} alloc_2.${OBJEXT}"
|
||||
EXTRA_OBJS="${EXTRA_OBJS} c/alloc_2.${OBJEXT}"
|
||||
if test "${enable_shared}" = "no"; then
|
||||
LIBRARIES="${LIBRARIES} ${LIBPREFIX}eclgc.${LIBEXT}"
|
||||
fi
|
||||
|
|
@ -1144,7 +1144,7 @@ if test "${enable_libffi}" = "included"; then
|
|||
ECL_LIBFFI_HEADER='ecl/ffi.h'
|
||||
SUBDIRS="${SUBDIRS} libffi"
|
||||
CORE_LIBS="-leclffi ${CORE_LIBS}"
|
||||
EXTRA_OBJS="${EXTRA_OBJS} alloc_2.${OBJEXT}"
|
||||
EXTRA_OBJS="${EXTRA_OBJS} c/alloc_2.${OBJEXT}"
|
||||
if test "${enable_shared}" = "no"; then
|
||||
LIBRARIES="${LIBRARIES} ${LIBPREFIX}eclffi.${LIBEXT}"
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -1,147 +0,0 @@
|
|||
# -*- Mode: Makefile; indent-tabs-mode: nil -*-
|
||||
# vim: set filetype=makefile tabstop=8 shiftwidth=4 expandtab:
|
||||
|
||||
#
|
||||
# Makefile for ECL core library
|
||||
#
|
||||
top_srcdir= @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
# Programs used by "make":
|
||||
#
|
||||
CC = @CC@
|
||||
TRUE_CC = $(CC)
|
||||
CFLAGS = -Werror -Wno-error=shift-count-overflow -I. -I@true_builddir@ -I$(srcdir) -I../ecl/gc -DECL_BUILD -DECL_API -DECL_NO_LEGACY @CPPFLAGS@ @CFLAGS@ @ECL_CFLAGS@ -c
|
||||
|
||||
# The following flags could be added and used by GCC
|
||||
# -Wall -W -Wfloat-equal -Wundef -Wendif-labels -Wpointer-arith -Wcast-align \
|
||||
# -Wwrite-strings -Wconversion -Wsign-compare -Wmissing-prototypes \
|
||||
# -Wredundant-decls -Wunreachable-code -Winline
|
||||
|
||||
SHELL = /bin/sh
|
||||
RM = @RM@
|
||||
EXE = @EXEEXT@
|
||||
DPP = ./dpp$(EXE)
|
||||
RANLIB = @RANLIB@
|
||||
AR = @AR@
|
||||
|
||||
# Data for installation
|
||||
#
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
# Files
|
||||
|
||||
HDIR = ../ecl
|
||||
HFILES = $(HDIR)/config.h $(HDIR)/ecl.h $(HDIR)/ecl-cmp.h\
|
||||
$(HDIR)/object.h $(HDIR)/cs.h $(HDIR)/stacks.h\
|
||||
$(HDIR)/external.h $(HDIR)/cons.h $(HDIR)/legacy.h\
|
||||
$(HDIR)/number.h $(HDIR)/page.h
|
||||
OBJS = main.o symbol.o package.o cons.o list.o\
|
||||
apply.o eval.o interpreter.o compiler.o disassembler.o \
|
||||
instance.o gfun.o clos/cache.o clos/accessor.o \
|
||||
reference.o character.o\
|
||||
file.o read.o print.o error.o string.o cfun.o\
|
||||
reader/parse_integer.o reader/parse_number.o \
|
||||
printer/float_to_digits.o printer/float_to_string.o \
|
||||
printer/integer_to_string.o printer/write_ugly.o \
|
||||
printer/write_object.o printer/write_symbol.o \
|
||||
printer/write_array.o printer/write_list.o printer/write_code.o \
|
||||
printer/write_sse.o printer/print_unreadable.o \
|
||||
ffi/libraries.o ffi/backtrace.o ffi/mmap.o ffi/cdata.o \
|
||||
numbers/cos.o numbers/sin.o numbers/tan.o numbers/atan.o \
|
||||
numbers/cosh.o numbers/sinh.o numbers/tanh.o \
|
||||
numbers/exp.o numbers/expt.o numbers/log.o \
|
||||
numbers/sqrt.o numbers/abs.o \
|
||||
numbers/zerop.o numbers/plusp.o numbers/minusp.o \
|
||||
numbers/negate.o numbers/conjugate.o \
|
||||
numbers/one_plus.o numbers/one_minus.o \
|
||||
numbers/plus.o numbers/minus.o numbers/times.o numbers/divide.o \
|
||||
numbers/number_compare.o numbers/number_equalp.o numbers/minmax.o \
|
||||
numbers/floor.o numbers/ceiling.o numbers/round.o numbers/truncate.o \
|
||||
typespec.o assignment.o \
|
||||
predicate.o number.o\
|
||||
num_pred.o num_arith.o num_co.o\
|
||||
num_log.o num_rand.o array.o vector_push.o sequence.o cmpaux.o\
|
||||
macros.o backq.o stacks.o \
|
||||
time.o unixint.o\
|
||||
mapfun.o multival.o hash.o format.o pathname.o\
|
||||
structure.o load.o unixfsys.o unixsys.o \
|
||||
serialize.o ffi.o sse2.o @EXTRA_OBJS@ threads/atomic.o
|
||||
|
||||
.SUFFIXES: .c .o .d .s
|
||||
.PHONY: all
|
||||
|
||||
all: $(DPP) ../libeclmin.a ../cinit.o
|
||||
|
||||
.d.c: $(DPP)
|
||||
if test -f ../CROSS-DPP ; then ../CROSS-DPP $< $@ ; else $(DPP) $< $@ ; fi
|
||||
.d.o: $(DPP)
|
||||
if test -f ../CROSS-DPP ; then ../CROSS-DPP $< $@.c ; else $(DPP) $< $@.c ; fi
|
||||
$(CC) -DECLDIR="\"@ecldir@\"" $(CFLAGS) -o $@ $@.c
|
||||
.c.o: $(HFILES)
|
||||
$(CC) -DECLDIR="\"@ecldir@\"" $(CFLAGS) -o $@ $<
|
||||
.d.s: $(HFILES)
|
||||
if test -f ../CROSS-DPP ; then ../CROSS-DPP $< $@.c ; else $(DPP) $< $@.c ; fi
|
||||
$(CC) -DECLDIR="\"@ecldir@\"" $(CFLAGS) -S -o $@ $@.c
|
||||
|
||||
apply_x86.c: $(srcdir)/arch/apply_x86.d $(DPP) $(HFILES)
|
||||
if test -f ../CROSS-DPP ; then \
|
||||
../CROSS-DPP $(srcdir)/arch/apply_x86.d $@ ; \
|
||||
else $(DPP) $(srcdir)/arch/apply_x86.d $@ ; \
|
||||
fi
|
||||
|
||||
../libeclmin.a: $(OBJS) all_symbols.o all_symbols2.o
|
||||
$(RM) $@
|
||||
$(AR) cr $@ $(OBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
clean:
|
||||
$(RM) $(DPP) *.c *.h $(OBJS) all_symbols.o all_symbols2.o ../libecl.a cinit.o core a.out tmp.c
|
||||
|
||||
# Build rules
|
||||
|
||||
$(DPP): $(srcdir)/dpp.c $(srcdir)/symbols_list2.h
|
||||
if test -f ../CROSS-DPP; then touch dpp; else \
|
||||
$(TRUE_CC) -I$(srcdir) -I@true_builddir@ -I./ $(srcdir)/dpp.c @CPPFLAGS@ @CFLAGS@ @ECL_CFLAGS@ -o $@ ; \
|
||||
fi
|
||||
|
||||
$(OBJS): $(DPP)
|
||||
# symbols_list2.h is built this way to allow for an atomic replacement of
|
||||
# the file. Otherwise we have problem when doing concurrent builds with
|
||||
# rsync updates of the source tree.
|
||||
#
|
||||
$(srcdir)/symbols_list2.h: $(srcdir)/symbols_list.h Makefile
|
||||
cat $(srcdir)/symbols_list.h | \
|
||||
sed -e 's%{\([A-Z ]*.*".*"\),[^,]*,[ ]*NULL,.*}%{\1,NULL}%g' \
|
||||
-e 's%{\([A-Z ]*.*".*"\),[^,]*,[ ]*\([^,]*\),.*}%{\1,"\2"}%g' \
|
||||
-e 's%{NULL.*%{NULL,NULL}};%' | \
|
||||
sed -e 's%"\(IF_[A-Z0-9]*\)(\([^)]*\))"%\1("\2")%g' > tmp.h
|
||||
mv tmp.h $@
|
||||
|
||||
#
|
||||
# This reduces the overhead of jumping to other functions
|
||||
#
|
||||
apply.c: $(DPP)
|
||||
apply.o: apply.c $(HFILES)
|
||||
$(CC) $(CFLAGS) apply.c -o $@
|
||||
#
|
||||
# These files are interrelated
|
||||
#
|
||||
all_symbols.c: $(DPP)
|
||||
all_symbols.o: all_symbols.c
|
||||
$(CC) $(CFLAGS) -I./ all_symbols.c -o $@
|
||||
all_symbols2.o: all_symbols.c
|
||||
$(CC) $(CFLAGS) -DECL_FINAL -I./ all_symbols.c -o $@
|
||||
|
||||
#
|
||||
# This is in another directory
|
||||
#
|
||||
cinit.c: $(DPP)
|
||||
../cinit.o: cinit.c $(HFILES)
|
||||
$(CC) $(CFLAGS) -I./ cinit.c -o $@
|
||||
21
src/configure
vendored
21
src/configure
vendored
|
|
@ -3020,8 +3020,7 @@ boehm_configure_flags=""
|
|||
|
||||
|
||||
TARGETS='bin/ecl$(EXE)'
|
||||
SUBDIRS=c
|
||||
LSP_FEATURES='*features*'
|
||||
LSP_FEATURES='*features*'
|
||||
|
||||
|
||||
# Make sure we can run config.sub.
|
||||
|
|
@ -4876,7 +4875,7 @@ THREAD_CFLAGS=''
|
|||
THREAD_LIBS=''
|
||||
THREAD_GC_FLAGS='--enable-threads=posix'
|
||||
INSTALL_TARGET='install'
|
||||
THREAD_OBJ="$THREAD_OBJ threads/process threads/queue threads/mutex threads/condition_variable threads/semaphore threads/barrier threads/mailbox"
|
||||
THREAD_OBJ="$THREAD_OBJ c/threads/process c/threads/queue c/threads/mutex c/threads/condition_variable c/threads/semaphore c/threads/barrier c/threads/mailbox"
|
||||
clibs='-lm'
|
||||
SONAME=''
|
||||
SONAME_LDFLAGS=''
|
||||
|
|
@ -5639,7 +5638,7 @@ else
|
|||
fi
|
||||
|
||||
|
||||
EXTRA_OBJS="${EXTRA_OBJS} big.o"
|
||||
EXTRA_OBJS="${EXTRA_OBJS} c/big.o"
|
||||
if test "x${with_system_gmp}" = "xno" ; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuring included GMP library:" >&5
|
||||
$as_echo "$as_me: Configuring included GMP library:" >&6;}
|
||||
|
|
@ -5894,7 +5893,7 @@ fi
|
|||
|
||||
fi
|
||||
|
||||
THREAD_OBJ="$THREAD_OBJ threads/rwlock"
|
||||
THREAD_OBJ="$THREAD_OBJ c/threads/rwlock"
|
||||
|
||||
boehm_configure_flags="${boehm_configure_flags} ${THREAD_GC_FLAGS}"
|
||||
for k in $THREAD_OBJ; do EXTRA_OBJS="$EXTRA_OBJS ${k}.${OBJEXT}"; done
|
||||
|
|
@ -6161,7 +6160,7 @@ $as_echo "${system_boehm} " >&6; }
|
|||
fi
|
||||
else
|
||||
FASL_LIBS="${FASL_LIBS} -lgc"
|
||||
EXTRA_OBJS="${EXTRA_OBJS} alloc_2.${OBJEXT}"
|
||||
EXTRA_OBJS="${EXTRA_OBJS} c/alloc_2.${OBJEXT}"
|
||||
|
||||
$as_echo "#define GBC_BOEHM 1" >>confdefs.h
|
||||
|
||||
|
|
@ -6190,7 +6189,7 @@ $as_echo "$as_me: Configuring included Boehm GC library:" >&6;}
|
|||
ECL_BOEHM_GC_HEADER='ecl/gc/gc.h'
|
||||
SUBDIRS="${SUBDIRS} gc"
|
||||
CORE_LIBS="-leclgc ${CORE_LIBS}"
|
||||
EXTRA_OBJS="${EXTRA_OBJS} alloc_2.${OBJEXT}"
|
||||
EXTRA_OBJS="${EXTRA_OBJS} c/alloc_2.${OBJEXT}"
|
||||
if test "${enable_shared}" = "no"; then
|
||||
LIBRARIES="${LIBRARIES} ${LIBPREFIX}eclgc.${LIBEXT}"
|
||||
fi
|
||||
|
|
@ -6324,7 +6323,7 @@ $as_echo "$as_me: Configuring included libffi library:" >&6;}
|
|||
ECL_LIBFFI_HEADER='ecl/ffi.h'
|
||||
SUBDIRS="${SUBDIRS} libffi"
|
||||
CORE_LIBS="-leclffi ${CORE_LIBS}"
|
||||
EXTRA_OBJS="${EXTRA_OBJS} alloc_2.${OBJEXT}"
|
||||
EXTRA_OBJS="${EXTRA_OBJS} c/alloc_2.${OBJEXT}"
|
||||
if test "${enable_shared}" = "no"; then
|
||||
LIBRARIES="${LIBRARIES} ${LIBPREFIX}eclffi.${LIBEXT}"
|
||||
fi
|
||||
|
|
@ -9566,7 +9565,7 @@ if test "${with_tcp}" = "yes"; then
|
|||
|
||||
$as_echo "#define TCP 1" >>confdefs.h
|
||||
|
||||
EXTRA_OBJS="${EXTRA_OBJS} tcp.${OBJEXT}"
|
||||
EXTRA_OBJS="${EXTRA_OBJS} c/tcp.${OBJEXT}"
|
||||
|
||||
|
||||
LSP_FEATURES="(cons :wants-sockets ${LSP_FEATURES})"
|
||||
|
|
@ -9692,13 +9691,13 @@ $as_echo "#define ECL_UNICODE 21" >>confdefs.h
|
|||
|
||||
CHAR_CODE_LIMIT=1114112
|
||||
ECL_CHARACTER=$ECL_INT32_T
|
||||
EXTRA_OBJS="$EXTRA_OBJS unicode/ucd.o unicode/ucd-0000.o unicode/ucd-0016.o unicode/ucd-0032.o unicode/ucd-0048.o unicode/ucd-0064.o unicode/ucd-0080.o unicode/ucd-0096.o"
|
||||
EXTRA_OBJS="$EXTRA_OBJS c/unicode/ucd.o c/unicode/ucd-0000.o c/unicode/ucd-0016.o c/unicode/ucd-0032.o c/unicode/ucd-0048.o c/unicode/ucd-0064.o c/unicode/ucd-0080.o c/unicode/ucd-0096.o"
|
||||
fi
|
||||
if test "${with_unicode_names}" = "yes"; then
|
||||
|
||||
$as_echo "#define ECL_UNICODE_NAMES 1" >>confdefs.h
|
||||
|
||||
EXTRA_OBJS="$EXTRA_OBJS unicode/ucd_names_char.o unicode/ucd_names_codes.o unicode/ucd_names_pair.o unicode/ucd_names_str.o"
|
||||
EXTRA_OBJS="$EXTRA_OBJS c/unicode/ucd_names_char.o c/unicode/ucd_names_codes.o c/unicode/ucd_names_pair.o c/unicode/ucd_names_str.o"
|
||||
fi
|
||||
else
|
||||
CHAR_CODE_LIMIT=256
|
||||
|
|
|
|||
|
|
@ -329,7 +329,7 @@ AC_SUBST(SHARED_LDFLAGS) dnl Flags for shared libraries linker
|
|||
AC_SUBST(BUNDLE_LDFLAGS) dnl Flags for FASL files linker
|
||||
AC_SUBST(EXTRA_OBJS) dnl Extra *.o files to be compiled into libecl.a
|
||||
AC_SUBST(TARGETS, ['bin/ecl$(EXE)'])dnl Versions of ECL to be built
|
||||
AC_SUBST(SUBDIRS, [c]) dnl Subdirectories that make should process
|
||||
AC_SUBST(SUBDIRS, []) dnl Subdirectories that make should process
|
||||
AC_SUBST(LIBRARIES, []) dnl GMP, Boehm's GC, etc
|
||||
AC_SUBST(LSP_LIBRARIES) dnl Libraries produced by lisp translator
|
||||
AC_SUBST(LSP_FEATURES, ['*features*']) dnl Symbols to add to *FEATURES* for conditional compilation
|
||||
|
|
@ -421,7 +421,7 @@ fi
|
|||
dnl ----------------------------------------------------------------------
|
||||
dnl Configure local GMP if needed
|
||||
AC_SUBST(ECL_GMP_HEADER)
|
||||
EXTRA_OBJS="${EXTRA_OBJS} big.o"
|
||||
EXTRA_OBJS="${EXTRA_OBJS} c/big.o"
|
||||
if test "x${with_system_gmp}" = "xno" ; then
|
||||
AC_MSG_NOTICE(Configuring included GMP library:)
|
||||
test -d gmp && rm -rf gmp
|
||||
|
|
@ -809,7 +809,7 @@ if test "${with_tcp}" = "builtin"; then
|
|||
fi
|
||||
if test "${with_tcp}" = "yes"; then
|
||||
AC_DEFINE(TCP, [1], [Network streams])
|
||||
EXTRA_OBJS="${EXTRA_OBJS} tcp.${OBJEXT}"
|
||||
EXTRA_OBJS="${EXTRA_OBJS} c/tcp.${OBJEXT}"
|
||||
ECL_ADD_LISP_MODULE([sockets])
|
||||
LIBS="${LIBS} ${TCPLIBS}"
|
||||
fi
|
||||
|
|
@ -879,11 +879,11 @@ if test "x${enable_unicode}" != "xno"; then
|
|||
AC_DEFINE([ECL_UNICODE], [21], [Support for Unicode])
|
||||
CHAR_CODE_LIMIT=1114112
|
||||
ECL_CHARACTER=$ECL_INT32_T
|
||||
EXTRA_OBJS="$EXTRA_OBJS unicode/ucd.o unicode/ucd-0000.o unicode/ucd-0016.o unicode/ucd-0032.o unicode/ucd-0048.o unicode/ucd-0064.o unicode/ucd-0080.o unicode/ucd-0096.o"
|
||||
EXTRA_OBJS="$EXTRA_OBJS c/unicode/ucd.o c/unicode/ucd-0000.o c/unicode/ucd-0016.o c/unicode/ucd-0032.o c/unicode/ucd-0048.o c/unicode/ucd-0064.o c/unicode/ucd-0080.o c/unicode/ucd-0096.o"
|
||||
fi
|
||||
if test "${with_unicode_names}" = "yes"; then
|
||||
AC_DEFINE([ECL_UNICODE_NAMES], [1], [Link in the database of Unicode names])
|
||||
EXTRA_OBJS="$EXTRA_OBJS unicode/ucd_names_char.o unicode/ucd_names_codes.o unicode/ucd_names_pair.o unicode/ucd_names_str.o"
|
||||
EXTRA_OBJS="$EXTRA_OBJS c/unicode/ucd_names_char.o c/unicode/ucd_names_codes.o c/unicode/ucd_names_pair.o c/unicode/ucd_names_str.o"
|
||||
fi
|
||||
else
|
||||
CHAR_CODE_LIMIT=256
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue