mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-01 15:20:36 -08:00
FIXNUM_BITS and CHAR_BIT do not rely now on "char" being 8-bit large. + All configuration settings are now grouped in config.h. This file has two parts, and the second one, containing flags which are only needed during the build process, is deleted when installing ECL. + File critical.h merged into lwp.h.
94 lines
2.3 KiB
Makefile
94 lines
2.3 KiB
Makefile
#
|
|
# Makefile for ECL core library
|
|
#
|
|
top_srcdir= @top_srcdir@
|
|
srcdir = @srcdir@
|
|
VPATH = @srcdir@
|
|
|
|
# Programs used by "make":
|
|
#
|
|
TRUE_CC = @CC@
|
|
CC = @ECL_CC@
|
|
DEFS = -D@host@
|
|
CFLAGS = -c -I../h -I$(srcdir) -I$(HDIR) @BOEHM_HEADERS@ @CFLAGS@ $(DEFS)
|
|
|
|
SHELL = /bin/sh
|
|
RM = @RM@
|
|
EXE = @EXEEXT@
|
|
DPP = ./dpp$(EXE)
|
|
|
|
# Data for installation
|
|
#
|
|
INSTALL = @INSTALL@
|
|
INSTALL_DATA = @INSTALL_DATA@
|
|
libdir = @libdir@
|
|
|
|
# Files
|
|
|
|
HDIR = $(top_srcdir)/h
|
|
HFILES = ../h/config.h $(HDIR)/ecl.h $(HDIR)/ecl-cmp.h\
|
|
$(HDIR)/machines.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
|
|
OBJS = main.o symbol.o package.o list.o\
|
|
apply.o eval.o interpreter.o compiler.o disassembler.o \
|
|
clos.o instance.o gfun.o reference.o character.o\
|
|
file.o read.o print.o error.o string.o cfun.o\
|
|
typespec.o assignment.o \
|
|
predicate.o big.o number.o\
|
|
num_pred.o num_comp.o num_arith.o num_sfun.o num_co.o\
|
|
num_log.o num_rand.o array.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 \
|
|
all_symbols.o @EXTRA_OBJS@
|
|
|
|
.SUFFIXES: .c .o .d
|
|
|
|
%.o: %.c $(HFILES)
|
|
$(CC) $(CFLAGS) -o $@ $<
|
|
%.c: %.d $(DPP) $(HFILES)
|
|
$(DPP) $< $@
|
|
|
|
all: $(DPP) ../libecl.a cinit.o
|
|
.PHONY: all
|
|
|
|
install: $(HFILES)
|
|
$(INSTALL_DATA) $(HFILES) $(PREFIX)$(libdir)/h/
|
|
sed ',-CUT-,$$d' ../h/config.h > ../h/config-install.h
|
|
$(INSTALL_DATA) ../h/config-install.h $(PREFIX)$(libdir)/h/config.h
|
|
|
|
../libecl.a: $(OBJS)
|
|
ar cr $@ $(OBJS)
|
|
ranlib $@
|
|
|
|
clean:
|
|
$(RM) dpp *.c $(OBJS) ../libecl.a cinit.o core a.out
|
|
|
|
# Build rules
|
|
|
|
$(DPP): $(srcdir)/dpp.c symbols_list2.h
|
|
$(TRUE_CC) @CFLAGS@ -I../h -I./ -I$(HDIR) $(DEFS) $(srcdir)/dpp.c -o $@
|
|
symbols_list2.h: $(srcdir)/symbols_list.h Makefile
|
|
cat $(srcdir)/symbols_list.h | \
|
|
sed -e 's%{"\(.*\)",.*,[ ]*NULL,.*}%{"\1",NULL}%g' \
|
|
-e 's%{"\(.*\)",.*,[ ]*\(.*\),.*}%{"\1","\2"}%g' \
|
|
-e 's%{NULL.*%{NULL,NULL}};%' > $@
|
|
|
|
#
|
|
# GCC might break this code
|
|
#
|
|
gbc.o: gbc.c $(HFILES)
|
|
$(CC) $(CFLAGS) -O0 gbc.c -o $@
|
|
#
|
|
# This reduces the overhead of jumping to other functions
|
|
#
|
|
apply.o: apply.c $(HFILES) $(HDIR)/cs.h
|
|
$(CC) $(CFLAGS) -fomit-frame-pointer apply.c -o $@
|
|
#
|
|
# These files are interrelated
|
|
#
|
|
all_symbols.o: all_symbols.c
|
|
$(CC) $(CFLAGS) -I./ all_symbols.c -o $@
|