# Copyright Notice
# ================
# BOCHS is Copyright 1994 by Kevin P. Lawton.
# 
# BOCHS is shareware for PERSONAL USE only.
# 
# For more information, read the file 'LICENSE' included in the bochs
# distribution.  If you don't have access to this file, or have questions
# regarding the licensing policy, the author may be contacted via:
# 
#     US Mail:  Kevin Lawton
#               528 Lexington St.
#               Waltham, MA 02154
# 
#     EMail:    bochs@tiac.net



# Systems which bochs has been compiled on
# There's no guarrantee that the most
# current version will compile under all environments, since I
# can't possible test them all for every verson.
#
# Architecture         compiler             O.S.
# -------------------------------------------------------------------
# 486PC                gcc                  NetBSD 1.0-ALPHA
#                      gcc-2.5.8            Linux 1.0.8
# Sparc                gcc-2.5.8            Solaris 2.3
#                      SPARCompiler 2.0.1   Solaris 2.3
# Alpha 4000/710       gcc-2.5.8            OSF/1 Version 2

include Makefile.config


# ===========================================================
# end of configurable options
# ===========================================================

# gnu flags for clean up
#BX_CFLAGS  = -ansi -O -g -Wunused -Wuninitialized

BX_OBJS = \
	bx_decode_group.o \
	bx_arith.o \
	bx_arith2.o \
	bx_memory.o \
	bx_main.o \
	bx_decode.o \
	bx_bit.o \
	bx_ctrl_xfer.o \
	bx_data_xfer.o \
	bx_flag_ctrl.o \
	bx_io.o \
	bx_logical.o \
	bx_ndp.o \
	bx_proc_ctrl.o \
	bx_protect_ctrl.o \
	bx_segment_ctrl.o \
	bx_soft_int.o \
	bx_stack.o \
	bx_string.o


BX_INCLUDES = bx_bochs.h


.c.o:
	$(BX_CC) -c $(BX_CFLAGS) $(BX_INCDIRS) $<


bx_8086: iodev/libbx_iodev.a debug/libbx_debug.a $(BX_OBJS)
	$(BX_CC) -o $@ $(BX_CFLAGS) $(BX_OBJS) \
		-Liodev -lbx_iodev -Ldebug -lbx_debug $(BX_LIBS)

$(BX_OBJS): bx_bochs.h config.h

bx_decode.o: bx_instr_proto.h

iodev/libbx_iodev.a:
	cd iodev; $(MAKE) libbx_iodev.a

debug/libbx_debug.a:
	cd debug; $(MAKE) libbx_debug.a

clean:
	@echo " "
	@echo "making clean in ./"
	rm -f *~ *.o \#*\# bx_8086

dist-clean: clean
	@echo " "
	@echo "making clean in iodev/"
	cd iodev; $(MAKE) clean
	cd debug; $(MAKE) clean

