head	1.4;
access;
symbols;
locks; strict;
comment	@# @;


1.4
date	2002.04.11.17.50.23;	author jm;	state Exp;
branches;
next	1.3;

1.3
date	2002.04.11.17.34.35;	author jm;	state Exp;
branches;
next	1.2;

1.2
date	2002.04.06.16.05.44;	author jm;	state Exp;
branches;
next	1.1;

1.1
date	2002.04.03.00.47.05;	author jm;	state Exp;
branches;
next	;


desc
@@


1.4
log
@
Added two rules to each makefile that, with any luck (ha), will cause
the depend.mk to be built if either it doesn't exist or if it's older
than any of the sources.  james said he'll take care of CVS issues
with depend.mk, but this should help a little bit.
@
text
@.KEEP_STATE:

UNIX_SOURCES = \
 jjconsole.cc \
 jjmachin.cc \
 jjtimer.cc \
 main.cc

UNIX_OBJECTS = $(UNIX_SOURCES:.cc=.o)\

%.o : %.cc
	$(CC) $(CFLAGS) -c $<

CC = g++
IFLAGS = -I. -I../../common
# definable options include:
# -DTARGET_UNIX			;
# -DPARANOID			; include all sorts of consistency checks.  Slow.
# -DNATIVE_CLOCK		; should Java or native code handle clock interrupts?
# -DUSE_CURSES			; use the curses library for console i/o.
#
# development options.
# -DFAST_NATIVE_CODE		; only check for native code when a method's signature is native.
# -DNEW_INTERRUPT_HANDLING	; sane interrupt handling.  Will become the default soon.
# -DUSING_CLASSPATH		; try to load native methods out of
#				; classpath's shared library.  Probably
#				; most useful with -DFAST_NATIVE_CODE.
# -no-builtins
# -DPARANOID
CFLAGS = -Wall -fno-builtins -DTARGET_UNIX \
 -DPARANOID \
 $(IFLAGS)

# -lcurses is optional, see above
LDFLAGS = -g -lm -g++ -lncurses

.SUFFIXES:
.SUFFIXES: .o .cc

TARGET = e3

ALL_SOURCE_FILES = $(UNIX_SOURCES) $(COMMON_SOURCES) $(E3_SOURCES) $(GC_SOURCES)

all: $(TARGET)

include ../../common/Makefile
include ../../common/Makefile.gc
include ../../Makefile.inc

# *D! OBJECTS = $(COMMON_OBJECTS) $(UNIX_OBJECTS) $(GC_OBJECTS)
OBJECTS = $(COMMON_OBJECTS) $(UNIX_OBJECTS) $(E3_OBJECTS) $(GC_OBJECTS)

#
# Cumulative flags
#

$(TARGET): $(OBJECTS)
	$(CC) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(MORE_LDFLAGS) $(LIBS)

depend.mk: $(ALL_SOURCE_FILES)
	makedepend -f depend.mk -o o $(IFLAGS) $(ALL_SOURCE_FILES)

Makefile: depend.mk

#depend:
#	makedepend -f depend.mk -o o $(IFLAGS) $(ALL_SOURCE_FILES)

clean:
	rm -f $(TARGET) $(OBJECTS) core 

native : $(COMMON_OBJECTS) $(UNIX_OBJECTS)

native_clean:
	rm -f $(UNIX_OBJECTS)

RCS_OPTS=-u

etags:
	etags -t $(ALL_SOURCE_FILES)

%.o : %.cc
	$(CC) $(CFLAGS) -c $<

include depend.mk
@


1.3
log
@
Add forgotten file to Makefile.inc.  In order to make it easier to
fake up i/o stream stuff, change "hex" to "ios::hex" in several
files.  Moved global (another issue) "lispm" pointer to lispm from e3
to ease integrating upon bare iron.  For band loading, I separated out
the stream stuff from the band to ease integration on bare iron -- am
not finished yet however.
@
text
@d60 1
a60 1
depend:
d62 5
@


1.2
log
@
All right.  Lotsa changes.  Changed how makefiles called makedepend
and maintained dependency files -- the old way added an extra period
in the suffix, so it was essentially useless on my RH7.2 installation
-- let me know if this is platform-specific and I inadvertantly broke
something on you (FreeBSD guys, etc.). I added a Makefile.inc to the
top-level directory so the e3 sources could be referenced from each of
the build-target directories (one might want to build many targets on
one box -- especially when cross-compiling for bare iron, and
therefore I store the build-target-specific object files in the build
target directory).  I tried to reduce the number of platform-specific
include files in band.h/cc etc -- if stdlib.h sufficed, then I removed
all the other ones (this may have broken something on other platforms
-- let me know).  I also told cpp for the i386 build target to NOT
search the standard include file directories so I could get it to grab
the workalike system include files from the build-target-specific
directory -- however I may have to change this for the stdarg.h
because that is compiler-specific rather than target-specific (remains
to be seen).  I also added Makefile.gc so that the conservative GC
files could be referenced from the build target directories although
that whole thing might never be used (but it is used right now, and
I'd prefer to make incremental changes and pull it out later).
Finally, I added stubs for the fstream.h stuff used to load the band
although that may be changed later (I am pretty sure I do not want to
read the band a byte at a time when Etherboot has already put it in
memory for the i386 platform, and GRUB-like loaders that go to disk
might not support C++ streams, so I'd have to change that anyways).
@
text
@d32 1
a32 1
 -DNEW_INTERRUPT_HANDLING $(IFLAGS)
d40 1
a40 1
TARGET = jjos
d42 1
a42 1
ALL_SOURCE_FILES = $(UNIX_SOURCES) $(COMMON_SOURCES) $(GC_SOURCES)
d51 1
a51 1
OBJECTS = $(COMMON_OBJECTS) $(UNIX_OBJECTS) $(GC_OBJECTS)
a74 6

init:
	./jjos init

testsuite:
	./jjos TestSuite
@


1.1
log
@
Whoops.
@
text
@d3 7
a9 5
HOST_OBJECTS = \
 jjconsole.o \
 jjmachin.o \
 jjtimer.o \
 main.o
d42 1
a42 1
ALL_SOURCE_FILES = $(HOST_SOURCE_FILES) $(COMMON_SOURCES) $(GC_SOURCES)
d48 1
d50 2
a51 2
# *D! OBJECTS = $(COMMON_OBJECTS) $(HOST_OBJECTS) $(GC_OBJECTS)
OBJECTS = $(COMMON_OBJECTS) $(HOST_OBJECTS) $(GC_OBJECTS)
d61 1
a61 1
	makedepend $(IFLAGS) $(ALL_SOURCE_FILES)
d66 1
a66 1
native : $(COMMON_OBJECTS) $(HOST_OBJECTS)
d69 1
a69 1
	rm -f $(HOST_OBJECTS)
a75 12
checkin:
	- for file in $(HOST_SOURCE_FILES) Makefile; \
	       do \
	               ( ci $(RCS_OPTS) $$file < /dev/null ) ; \
	       done

checkout:
	- for file in $(HOST_SOURCE_FILES) Makefile; \
	       do \
	               ( co $(RCS_OPTS) $$file < /dev/null ) ; \
	       done

d84 2
@

