version 1.5, 1998/05/02 21:29:01
|
version 1.6, 1998/06/04 16:17:58
|
Line 1
|
Line 1
|
#Makefile for library replace functions |
#Makefile for the C part of Gforth |
|
|
#Copyright (C) 1995-1997 Free Software Foundation, Inc. |
#Copyright (C) 1995-1997 Free Software Foundation, Inc. |
|
|
Line 20
|
Line 20
|
|
|
# ------------- gforth version |
# ------------- gforth version |
|
|
VERSION_MAJOR=0 |
VERSION =@VERSION@ |
VERSION_MINOR=4 |
DOSVERSION=`echo $VERSION|sed 's/\.//g'` |
VERSION_RELEASE=0 |
|
VERSION =$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_RELEASE) |
|
DOSVERSION=$(VERSION_MAJOR)$(VERSION_MINOR)$(VERSION_RELEASE) |
|
|
|
# ------------- System specific variables |
# ------------- System specific variables |
|
|
machine=@mach_h@ |
machine=@machine@ |
# this is the type of machine |
# this is the type of machine |
# used to extend the include path with ./arch/$machine |
# used to extend the include path with ./arch/$machine |
# so we could include a machine specific |
# so we could include a machine specific |
Line 66 infodir = $(prefix)/info
|
Line 63 infodir = $(prefix)/info
|
mandir = $(prefix)/man |
mandir = $(prefix)/man |
man1dir= $(mandir)/man1 |
man1dir= $(mandir)/man1 |
man1ext= .1 |
man1ext= .1 |
#older emacses have their site-lisp in $(libdir)/emacs/ |
|
emacssitelispdir=$(datadir)/emacs/site-lisp |
|
|
|
# ------------- Compiler Flags |
# ------------- Compiler Flags |
|
|
Line 76 XDEFINES = @DEFS@
|
Line 71 XDEFINES = @DEFS@
|
SWITCHES = $(XCFLAGS) $(XDEFINES) |
SWITCHES = $(XCFLAGS) $(XDEFINES) |
ENGINE_FLAGS = @ENGINE_FLAGS@ -fno-defer-pop -fcaller-saves |
ENGINE_FLAGS = @ENGINE_FLAGS@ -fno-defer-pop -fcaller-saves |
DEBUGFLAG = @DEBUGFLAG@ |
DEBUGFLAG = @DEBUGFLAG@ |
CFLAGS = $(DEBUGFLAG) -I../arch/$(machine) -O4 -Wall $(SWITCHES) -DDEFAULTPATH=\"$(FORTHPATH)\" |
CFLAGS = $(DEBUGFLAG) -I$(srcdir)/../arch/$(machine) -O4 -Wall $(SWITCHES) -DDEFAULTPATH=\"$(FORTHPATH)\" |
|
|
#John Wavrik should use -Xlinker -N to get a writable text (executable) |
#John Wavrik should use -Xlinker -N to get a writable text (executable) |
XLDFLAGS = @LDFLAGS@ |
XLDFLAGS = @LDFLAGS@ |
Line 84 GCCLDFLAGS = @GCCLDFLAGS@
|
Line 79 GCCLDFLAGS = @GCCLDFLAGS@
|
LDFLAGS = $(DEBUGFLAG) $(XLDFLAGS) $(GCCLDFLAGS) |
LDFLAGS = $(DEBUGFLAG) $(XLDFLAGS) $(GCCLDFLAGS) |
LDLIBS = @LIBS@ |
LDLIBS = @LIBS@ |
|
|
AOBJECTS = io.o memcmpc.o @LIBOBJS@ @getopt_long@ |
AOBJECTS = io.o memcmpc.o @LIBOBJS@ |
|
|
OBJECTS0 = replace.a |
|
OBJECTS = engine.o main.o |
OBJECTS = engine.o main.o |
OBJECTS_DITC = engine-ditc.o main-ditc.o |
OBJECTS_DITC = engine-ditc.o main-ditc.o |
|
|
# In engine subdirectory there are (or should be) only files that belong to |
# In engine subdirectory there are (or should be) only files that belong to |
# our engine, so we can make life easy |
# our engine, so we can make life easy |
ENGINE_DEPS = *.c *.h *.i ../arch/$(machine)/* |
ENGINE_DEPS = *.c *.h *.i ../arch/$(machine)/*.[ch] |
|
|
all: replace.a |
gforth: $(OBJECTS) $(AOBJECTS) |
|
$(GCC) $(LDFLAGS) $(OBJECTS) $(AOBJECTS) $(LDLIBS) -o $@ |
|
|
replace.a: $(AOBJECTS) |
gforth-ditc: $(OBJECTS_DITC) $(AOBJECTS) |
ar r $@ $(AOBJECTS) |
$(GCC) $(LDFLAGS) $(OBJECTS_DITC) $(AOBJECTS) $(LDLIBS) -o $@ |
|
|
engine.s: $(ENGINE_DEPS) |
engine.s: $(ENGINE_DEPS) |
$(GCC) $(CFLAGS) $(ENGINE_FLAGS) -S engine.c |
$(GCC) $(CFLAGS) $(ENGINE_FLAGS) -S engine.c |
Line 123 engine_ditc: $(OBJECTS_DITC) $(OBJECTS0)
|
Line 118 engine_ditc: $(OBJECTS_DITC) $(OBJECTS0)
|
termios.o: /usr/lib/libposix.a |
termios.o: /usr/lib/libposix.a |
ar x /usr/lib/libposix.a termios.o |
ar x /usr/lib/libposix.a termios.o |
|
|
|
prim.i: FORCE |
|
cd ..; $(MAKE) engine/$@ |
|
|
|
prim_lab.i: FORCE |
|
cd ..; $(MAKE) engine/$@ |
|
|
|
#phony targets depend on FORCE; this is more portable than .PHONY |
|
FORCE: |
|
|