File:  [gforth] / gforth / engine / Makefile.in
Revision 1.6: download - view: text, annotated - select for diffs
Thu Jun 4 16:17:58 1998 UTC (25 years, 10 months ago) by anton
Branches: MAIN
CVS tags: HEAD
various changes in configure.in and the Makefile.in's:
   symlinks kernel.fi and arch/machine eliminated
   utilize some automake stuff (e.g., @VERSION@ and @lispdir@)
   eliminated engine/version.h
   eliminated replace.a; gforth[-ditc] is now built by engine/Makefile
   getopt_long replacement is now donw through LIBOBJS, like everything else
automake-induced changes in acconfig.h; added acinclude.m4 and AUTHORS.
aclocal.m4 is now generated (it's still in CVS because there's not yet a
	make rule for it).
made gforthmi more conformant with GNU standards (--version etc.).
prim: fixed portability bug (RTLD_GLOBAL does not exist everywhere)
arch/power/machine.h: refined cache flush code
doc/gforth.ds now uses @VERSION{} (but we need to generate version.texi)
	documented new buffering behaviour

#Makefile for the C part of Gforth

#Copyright (C) 1995-1997 Free Software Foundation, Inc.

#This file is part of Gforth.

#Gforth is free software; you can redistribute it and/or
#modify it under the terms of the GNU General Public License
#as published by the Free Software Foundation; either version 2
#of the License, or (at your option) any later version.

#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.#See the
#GNU General Public License for more details.

#You should have received a copy of the GNU General Public License
#along with this program; if not, write to the Free Software
#Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

# ------------- gforth version

VERSION =@VERSION@
DOSVERSION=`echo $VERSION|sed 's/\.//g'`

# ------------- System specific variables

machine=@machine@
# this is the type of machine
# used to extend the include path with ./arch/$machine
# so we could include a machine specific
# machine.h file

PATHSEP = @PATHSEP@

osclass = @OSCLASS@

# ------------- Utility programs

SHELL	= /bin/sh
RM	= rm
RMTREE	= rm -rf
CP	= cp
TAR	= tar cf -
GCC	= @CC@
CC	= $(GCC)
STRIP	= strip

FORTHPATH = $(libdir)/gforth/site-forth$(PATHSEP)$(datadir)/gforth/site-forth$(PATHSEP)$(libdir)/gforth/$(VERSION)$(PATHSEP)$(datadir)/gforth/$(VERSION)$(PATHSEP).

# ------------	Install Directorys

VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
srcdir = @srcdir@
bindir = $(exec_prefix)/bin
#read-only architecture-independent files
datadir = $(prefix)/share
#read-only architecture-dependent non-ascii files
libdir = $(prefix)/lib
infodir = $(prefix)/info
mandir = $(prefix)/man
man1dir= $(mandir)/man1
man1ext= .1

# ------------- Compiler Flags

XCFLAGS	= @CFLAGS@
XDEFINES = @DEFS@
SWITCHES = $(XCFLAGS) $(XDEFINES)
ENGINE_FLAGS = @ENGINE_FLAGS@ -fno-defer-pop -fcaller-saves
DEBUGFLAG = @DEBUGFLAG@
CFLAGS	= $(DEBUGFLAG) -I$(srcdir)/../arch/$(machine) -O4 -Wall $(SWITCHES) -DDEFAULTPATH=\"$(FORTHPATH)\"

#John Wavrik should use -Xlinker -N to get a writable text (executable)
XLDFLAGS = @LDFLAGS@
GCCLDFLAGS = @GCCLDFLAGS@
LDFLAGS =  $(DEBUGFLAG) $(XLDFLAGS) $(GCCLDFLAGS)
LDLIBS  = @LIBS@

AOBJECTS = io.o memcmpc.o @LIBOBJS@

OBJECTS = engine.o main.o
OBJECTS_DITC =  engine-ditc.o main-ditc.o

# In engine subdirectory there are (or should be) only files that belong to
# our engine, so we can make life easy
ENGINE_DEPS = *.c *.h *.i ../arch/$(machine)/*.[ch]

gforth:	$(OBJECTS) $(AOBJECTS)
	$(GCC) $(LDFLAGS) $(OBJECTS) $(AOBJECTS) $(LDLIBS) -o $@

gforth-ditc: $(OBJECTS_DITC) $(AOBJECTS)
	$(GCC) $(LDFLAGS) $(OBJECTS_DITC) $(AOBJECTS) $(LDLIBS) -o $@

engine.s:	$(ENGINE_DEPS)
		$(GCC) $(CFLAGS) $(ENGINE_FLAGS) -S engine.c

engine.o:	$(ENGINE_DEPS)
		$(GCC) $(CFLAGS) $(ENGINE_FLAGS) -c engine.c -o $@

engine-ditc.o:	$(ENGINE_DEPS)
		$(GCC) $(CFLAGS) $(ENGINE_FLAGS) -DDOUBLY_INDIRECT -o $@ -c engine.c

main.o:		$(ENGINE_DEPS) 
		$(GCC) $(CFLAGS) $(ENGINE_FLAGS) -o $@ -c main.c

main-ditc.o:	$(ENGINE_DEPS)
		$(GCC) $(CFLAGS) $(ENGINE_FLAGS) -DDOUBLY_INDIRECT -o $@ -c main.c

engine:		$(OBJECTS) $(OBJECTS0) ;

engine_ditc:	$(OBJECTS_DITC) $(OBJECTS0) ;

#NeXTstep hack

termios.o:	/usr/lib/libposix.a
	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:


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>