version 1.447, 2009/11/29 19:26:47
|
version 1.456, 2011/01/09 15:29:14
|
Line 1
|
Line 1
|
#Makefile for Gforth |
#Makefile for Gforth |
|
|
#Copyright (C) 1995,1996,1997,1998,2000,2003,2004,2005,2006,2007,2008 Free Software Foundation, Inc. |
#Copyright (C) 1995,1996,1997,1998,2000,2003,2004,2005,2006,2007,2008,2009,2010 Free Software Foundation, Inc. |
|
|
#This file is part of Gforth. |
#This file is part of Gforth. |
|
|
Line 64 INSTALL_INFO = @INSTALL_INFO@
|
Line 64 INSTALL_INFO = @INSTALL_INFO@
|
LN_S = @LN_S@ |
LN_S = @LN_S@ |
M4 = @M4@ |
M4 = @M4@ |
GCC = @CC@ |
GCC = @CC@ |
EMACS = emacs |
EMACS = @EMACS@ |
LIBTOOL = @GNU_LIBTOOL@ |
LIBTOOL = @GNU_LIBTOOL@ |
PREFORTH = ./preforth -p ".$(PATHSEP)~+$(PATHSEP)$(srcdir)" |
PREFORTH = ./preforth -p ".$(PATHSEP)~+$(PATHSEP)$(srcdir)" |
CC = $(GCC) |
CC = $(GCC) |
Line 129 datarootdir = @datarootdir@
|
Line 129 datarootdir = @datarootdir@
|
datadir = @datadir@ |
datadir = @datadir@ |
#read-only architecture-dependent non-ascii files |
#read-only architecture-dependent non-ascii files |
libdir = @libdir@ |
libdir = @libdir@ |
libccdir = $(libdir)/gforth/$(VERSION)/libcc-named/ |
libccdir = $(subst $(DESTDIR),,$(libdir)/gforth/$(VERSION)/libcc-named/) |
includedir = @includedir@ |
includedir = @includedir@ |
infodir = @infodir@ |
infodir = @infodir@ |
htmldir = @htmldir@ |
htmldir = @htmldir@ |
Line 189 KERN_SRC = \
|
Line 189 KERN_SRC = \
|
kernel/doers.fs \ |
kernel/doers.fs \ |
kernel/getdoers.fs \ |
kernel/getdoers.fs \ |
kernel/pass.fs \ |
kernel/pass.fs \ |
kernel/xchars.fs |
kernel/xchars.fs \ |
|
string.fs |
|
|
EC_SRC = \ |
EC_SRC = \ |
asm/README \ |
asm/README \ |
Line 207 EC_SRC = \
|
Line 208 EC_SRC = \
|
ec/nesting.fs \ |
ec/nesting.fs \ |
build-ec.in |
build-ec.in |
|
|
GFORTH_FI_SRC = \ |
GFORTH_FI_SRC1=\ |
assert.fs \ |
assert.fs \ |
backtrac.fs \ |
backtrac.fs \ |
blocked.fb \ |
blocked.fb \ |
Line 218 GFORTH_FI_SRC = \
|
Line 219 GFORTH_FI_SRC = \
|
debugs.fs \ |
debugs.fs \ |
dis-gdb.fs \ |
dis-gdb.fs \ |
ekey.fs \ |
ekey.fs \ |
envos.fs \ |
|
|
GFORTH_FI_SRC2=\ |
savesys.fs \ |
savesys.fs \ |
environ.fs \ |
environ.fs \ |
errors.fs \ |
errors.fs \ |
Line 255 GFORTH_FI_SRC = \
|
Line 257 GFORTH_FI_SRC = \
|
arch/386/asm.fs arch/386/disasm.fs \ |
arch/386/asm.fs arch/386/disasm.fs \ |
arch/amd64/asm.fs arch/amd64/disasm.fs \ |
arch/amd64/asm.fs arch/amd64/disasm.fs \ |
arch/alpha/asm.fs arch/alpha/disasm.fs arch/alpha/testasm.fs\ |
arch/alpha/asm.fs arch/alpha/disasm.fs arch/alpha/testasm.fs\ |
|
arch/arm/asm.fs arch/arm/disasm.fs \ |
|
arch/arm/testdisasm.fs arch/arm/testdisasm.out arch/arm/Makefile \ |
arch/mips/asm.fs arch/mips/disasm.fs arch/mips/insts.fs \ |
arch/mips/asm.fs arch/mips/disasm.fs arch/mips/insts.fs \ |
arch/mips/testasm.fs arch/mips/testdisasm.fs \ |
arch/mips/testasm.fs arch/mips/testdisasm.fs \ |
arch/power/asm.fs arch/power/disasm.fs arch/power/inst.fs |
arch/power/asm.fs arch/power/disasm.fs arch/power/inst.fs |
|
|
|
# execlude envos.fs into list of distributed sources |
|
GFORTH_FI_DIST_SRC = \ |
|
$(GFORTH_FI_SRC1) \ |
|
$(GFORTH_FI_SRC2) |
|
|
|
GFORTH_FI_SRC = \ |
|
$(GFORTH_FI_SRC1) \ |
|
envos.fs \ |
|
$(GFORTH_FI_SRC2) |
|
|
LIBCC_SRC = cstr.fs unix/socket.fs |
LIBCC_SRC = cstr.fs unix/socket.fs |
|
|
LIBCC_DIST_SRC = libffi.fs fflib.fs $(LIBCC_SRC) |
LIBCC_DIST_SRC = libffi.fs fflib.fs $(LIBCC_SRC) |
|
|
LIBCC_BUILD_SRC = @LIBCC_BUILD_SRC@ $(LIBCC_SRC) |
LIBCC_BUILD_SRC = @LIBCC_BUILD_SRC@ $(LIBCC_SRC) |
|
|
FORTH_SRC = $(KERN_SRC) $(GFORTH_FI_SRC) $(EC_SRC) $(LIBCC_DIST_SRC) \ |
|
|
FORTH_SRC = $(KERN_SRC) $(GFORTH_FI_DIST_SRC) $(EC_SRC) $(LIBCC_DIST_SRC) \ |
ans-report.fs ansi.fs answords.fs \ |
ans-report.fs ansi.fs answords.fs \ |
colorize.fs comp-i.fs complex.fs \ |
colorize.fs comp-i.fs complex.fs \ |
depth-changes.fs dosekey.fs doskey.fs ds2texi.fs \ |
depth-changes.fs dosekey.fs doskey.fs ds2texi.fs \ |
Line 313 ARCHS = \
|
Line 328 ARCHS = \
|
arch/generic/machine.h \ |
arch/generic/machine.h \ |
arch/m68k/machine.h \ |
arch/m68k/machine.h \ |
arch/mips/machine.h \ |
arch/mips/machine.h \ |
|
arch/mips/check_prim.c \ |
arch/386/machine.h \ |
arch/386/machine.h \ |
arch/hppa/machine.h \ |
arch/hppa/machine.h \ |
arch/hppa/cache.c \ |
arch/hppa/cache.c \ |
Line 430 SOURCES = $(ENGINE_SOURCES) compat Makef
|
Line 446 SOURCES = $(ENGINE_SOURCES) compat Makef
|
|
|
RCS_FILES = ToDo model high-level |
RCS_FILES = ToDo model high-level |
|
|
ENGINES = gforth$(EC)$(EXE) gforth-ditc$(EC)$(EXE) gforth-itc$(EC)$(EXE) $(PROFEXES) |
ENGINES = gforth$(EC)$(EXE) @NO_EC@ gforth-ditc$(EC)$(EXE) gforth-itc$(EC)$(EXE) $(PROFEXES) |
|
|
ENGINES_FAST = gforth-fast$(OPT)$(EC)$(EXE) #gforth-native$(OPT)$(EC)$(EXE) |
ENGINES_FAST = @NO_EC@ gforth-fast$(OPT)$(EC)$(EXE) #gforth-native$(OPT)$(EC)$(EXE) |
|
|
GEN = $(ENGINES) $(ENGINES_FAST) gforth.elc |
GEN = $(ENGINES) $(ENGINES_FAST) @gforth_elc@ |
|
|
# things that need a working forth system to be generated |
# things that need a working forth system to be generated |
FORTH_GEN_ENGINE=engine/prim.i engine/prim_lab.i engine/prim_names.i \ |
FORTH_GEN_ENGINE=engine/prim.i engine/prim_lab.i engine/prim_names.i \ |
Line 448 FORTH_GEN_ENGINE_FAST= \
|
Line 464 FORTH_GEN_ENGINE_FAST= \
|
engine/costs-fast.i engine/super2-fast.i |
engine/costs-fast.i engine/super2-fast.i |
FORTH_GEN_PRIMB = $(FORTH_GEN_ENGINE) kernel/aliases.fs kernel/prim.fs |
FORTH_GEN_PRIMB = $(FORTH_GEN_ENGINE) kernel/aliases.fs kernel/prim.fs |
FORTH_GEN0 = prim.b $(FORTH_GEN_PRIMB) |
FORTH_GEN0 = prim.b $(FORTH_GEN_PRIMB) |
FORTH_GEN = $(FORTH_GEN0) @KERNEL@ gforth.fi |
FORTH_GEN = $(FORTH_GEN0) @KERNEL@ @NO_EC@ gforth.fi |
# this is used for antidependences, |
# this is used for antidependences, |
FORTH_GEN1 = $(FORTH_GEN0) @kernel_fi@ build-ec |
FORTH_GEN1 = $(FORTH_GEN0) @kernel_fi@ build-ec |
|
|
Line 477 GEN_PRECIOUS = $(FORTH_GEN) $(KERNLS) \
|
Line 493 GEN_PRECIOUS = $(FORTH_GEN) $(KERNLS) \
|
.SUFFIXES: |
.SUFFIXES: |
.SUFFIXES: .c .o |
.SUFFIXES: .c .o |
|
|
all: kernel/version.fs more check |
all: kernel/version.fs more @NO_EC@ check |
|
|
# use this dependency for phony targets just as mostlyclean,... |
# use this dependency for phony targets just as mostlyclean,... |
FORCE: ; |
FORCE: ; |
Line 616 install: gforth$(EC)$(EXE) $(FORTH_SRC)
|
Line 632 install: gforth$(EC)$(EXE) $(FORTH_SRC)
|
(cd $(DESTDIR)$(bindir) && $(LN_S) vmgen-$(VERSION) vmgen) |
(cd $(DESTDIR)$(bindir) && $(LN_S) vmgen-$(VERSION) vmgen) |
-$(INSTALL_DATA) $(srcdir)/doc/gforth.1 $(DESTDIR)$(man1dir) |
-$(INSTALL_DATA) $(srcdir)/doc/gforth.1 $(DESTDIR)$(man1dir) |
-for i in $(srcdir)/doc/gforth.info* $(srcdir)/doc/vmgen.info*; do $(INSTALL_DATA) $$i $(DESTDIR)$(infodir); done |
-for i in $(srcdir)/doc/gforth.info* $(srcdir)/doc/vmgen.info*; do $(INSTALL_DATA) $$i $(DESTDIR)$(infodir); done |
for i in $(FORTH_SRC) $(COMPAT) prim; do \ |
for i in $(FORTH_SRC) $(COMPAT) envos.fs prim; do \ |
$(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(datadir)/gforth/$(VERSION)/$$i; \ |
$(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(datadir)/gforth/$(VERSION)/$$i; \ |
done |
done |
$(INSTALL_DATA) $(kernel_fi) $(DESTDIR)$(datadir)/gforth/$(VERSION) |
$(INSTALL_DATA) $(kernel_fi) $(DESTDIR)$(datadir)/gforth/$(VERSION) |
@if test -d "$(DESTDIR)$(emacssitelispdir)"; then \ |
@if test -d "$(DESTDIR)$(emacssitelispdir)"; then \ |
$(INSTALL_DATA) gforth.el $(DESTDIR)$(emacssitelispdir); \ |
for i in gforth.el @gforth_elc@; do \ |
$(INSTALL_DATA) gforth.elc $(DESTDIR)$(emacssitelispdir); \ |
$(INSTALL_DATA) $$i $(DESTDIR)$(emacssitelispdir); \ |
|
done; \ |
else \ |
else \ |
echo '>>>>>Please install gforth.{el,elc} in your .../emacs/site-lisp directory'; \ |
echo '>>>>>Please install gforth.{el,elc} in your .../emacs/site-lisp directory'; \ |
fi |
fi |
Line 660 uninstall: FORCE
|
Line 677 uninstall: FORCE
|
|
|
build-libcc-named: $(LIBCC_BUILD_SRC) $(FORTH_GEN) $(GEN) FORCE |
build-libcc-named: $(LIBCC_BUILD_SRC) $(FORTH_GEN) $(GEN) FORCE |
$(RMTREE) lib/gforth/$(VERSION)/libcc-named/ |
$(RMTREE) lib/gforth/$(VERSION)/libcc-named/ |
for i in $(LIBCC_BUILD_SRC); do ./gforth -e "s\" `pwd`/lib/gforth/$(VERSION)/libcc-named/\" libcc-named-dir-v 2! libcc-path clear-path libcc-named-dir libcc-path also-path :noname 2drop s\" $(libccdir)\" ; is replace-rpath" $(srcdir)/$$i -e bye; done |
for i in $(LIBCC_BUILD_SRC); do ./gforth -e "s\" `pwd`/lib/gforth/$(VERSION)/libcc-named/\" libcc-named-dir-v 2! libcc-path clear-path libcc-named-dir libcc-path also-path :noname 2drop s\" $(DESTDIR)$(libccdir)\" ; is replace-rpath" $(srcdir)/$$i -e bye; done |
|
|
check: gforths gforth.fi |
check: gforths gforth.fi |
$(MAKE) checkone check-nofast ENGINE="./gforth --no-dynamic" >/dev/null 2>&1 |
$(MAKE) checkone check-nofast ENGINE="./gforth --no-dynamic" >/dev/null 2>&1 |
Line 826 gforth$(OPT)$(EC)$(EXE): $(ENGINE_SOURCE
|
Line 843 gforth$(OPT)$(EC)$(EXE): $(ENGINE_SOURCE
|
$(CP) engine/$@ $@ && \ |
$(CP) engine/$@ $@ && \ |
$(MASSAGE_EXE) $@; \ |
$(MASSAGE_EXE) $@; \ |
@GFORTH_EXE@; \ |
@GFORTH_EXE@; \ |
$(MAKE) checkone check-nofast ENGINE=./engine/$@; \ |
@NO_EC@ $(MAKE) checkone check-nofast ENGINE=./engine/$@; \ |
fi |
fi |
|
|
optgforth: |
optgforth: |
Line 840 gforth-fast$(OPT)$(EC)$(EXE): $(ENGINE_S
|
Line 857 gforth-fast$(OPT)$(EC)$(EXE): $(ENGINE_S
|
$(CP) engine/$@ $@ && \ |
$(CP) engine/$@ $@ && \ |
$(MASSAGE_EXE) $@; \ |
$(MASSAGE_EXE) $@; \ |
@GFORTHFAST_EXE@; \ |
@GFORTHFAST_EXE@; \ |
$(MAKE) checkone ENGINE=./engine/$@; \ |
@NO_EC@ $(MAKE) checkone ENGINE=./engine/$@; \ |
fi |
fi |
|
|
optgforth-fast: |
optgforth-fast: |