Bochs/bochs/Makefile.in
Bryce Denney e61d00351f - merged BRANCH-smp-bochs into main branch. For details see comments
in BRANCH-smp-bochs revisions.
- The general task was to make multiple CPU's which communicate
  through their APICs.  So instead of BX_CPU and BX_MEM, we now have
  BX_CPU(x) and BX_MEM(y).  For an SMP simulation you have several
  processors in a shared memory space, so there might be processors
  BX_CPU(0..3) but only one memory space BX_MEM(0).  For cosimulation,
  you could have BX_CPU(0) with BX_MEM(0), then BX_CPU(1) with
  BX_MEM(1).  WARNING: Cosimulation is almost certainly broken by the
  SMP changes.
- to simulate multiple CPUs, you have to give each CPU time to execute
  in turn.  This is currently implemented using debugger guards.  The
  cpu loop steps one CPU for a few instructions, then steps the
  next CPU for a few instructions, etc.
- there is some limited support in the debugger for two CPUs, for
  example printing information from each CPU when single stepping.
2001-05-23 08:16:07 +00:00

338 lines
8.2 KiB
Makefile

# Copyright (C) 2001 MandrakeSoft S.A.
#
# MandrakeSoft S.A.
# 43, rue d'Aboukir
# 75002 Paris - France
# http://www.linux-mandrake.com/
# http://www.mandrakesoft.com/
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library 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
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
VERSION=1.2
VER_STRING=1.2-pre1
REL_STRING=Tue May 22 23:57:25 EDT 2001
PREFIX=/usr/local/bochs
BINPATH=/usr/local/bin
INSTALL_LIST=bios/BIOS-* CHANGES.txt COPYING README bios/VGABIOS*
CP=cp
CAT=cat
RM=rm
MV=mv
LN_S=ln -sf
DLXLINUX_TAR=dlxlinux1.tar.gz
DLXLINUX_TAR_URL=http://bochs.sourceforge.net/guestos/${DLXLINUX_TAR}
DLXLINUX_ROMFILE=BIOS-bochs-2001_0517
GUNZIP=gunzip
WGET=wget
SED=sed
SOURCES=/usr/src/redhat/SOURCES
SPECS=/usr/src/redhat/SPECS
RPMS=/usr/src/redhat/RPMS
SRPMS=/usr/src/redhat/SRPMS
MKDIR=mkdir
TAR=tar
RPM=rpm
CHMOD=chmod
CHOWN=chown
@SUFFIX_LINE@
SHELL = /bin/sh
@SET_MAKE@
CC = @CC@
CXX = @CXX@
CFLAGS = @CFLAGS@ $(MCH_CFLAGS) $(FLA_FLAGS)
CXXFLAGS = @CXXFLAGS@ $(MCH_CFLAGS) $(FLA_FLAGS)
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
# To compile with readline:
# linux needs just -lreadline
# solaris needs -lreadline -lcurses
X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
GUI_LINK_OPTS_X = $(X_LIBS) $(X_PRE_LIBS) -lX11
GUI_LINK_OPTS_BEOS = -lbe
GUI_LINK_OPTS_WIN32 = -luser32 -lgdi32 -lwinmm -lcomdlg32 -lcomctl32
GUI_LINK_OPTS_WIN32_VCPP = user32.lib gdi32.lib winmm.lib \
comdlg32.lib comctl32.lib wsock32.lib
GUI_LINK_OPTS_MACOS =
GUI_LINK_OPTS_NOGUI =
GUI_LINK_OPTS_TERM = @GUI_LINK_OPTS_TERM@
GUI_LINK_OPTS = @GUI_LINK_OPTS@
RANLIB = @RANLIB@
BX_INCDIRS = -I. -I@INSTRUMENT_DIR@
MDEFINES = CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" \
LDFLAGS="$(LDFLAGS)" LIBS="$(LIBS)" \
X_LIBS="$(X_LIBS)" X_PRE_LIBS="$(X_PRE_LIBS)" \
prefix="$(prefix)" exec_prefix="$(exec_prefix)" \
bindir="$(bindir)" infodir="$(infodir)"
#SUBDIRS = iodev debug
#all install uninstall: config.h#
# for subdir in $(SUBDIRS); do #
# echo making $@ in $$subdir; #
# (cd $$subdir && $(MAKE) $(MDEFINES) $@) || exit 1; #
# done#
# gnu flags for clean up
#CFLAGS = -ansi -O -g -Wunused -Wuninitialized
NONINLINE_OBJS = \
main.o \
load32bitOShack.o \
state_file.o \
pc_system.o \
osdep.o
EXTERN_ENVIRONMENT_OBJS = \
main.o \
load32bitOShack.o \
state_file.o \
pc_system.o
DEBUGGER_LIB = debug/libdebug.a
DISASM_LIB = disasm/libdisasm.a
DYNAMIC_LIB = dynamic/libdynamic.a
INSTRUMENT_LIB = @INSTRUMENT_DIR@/libinstrument.a
FPU_LIB = fpu/libfpu.a
READLINE_LIB = @READLINE_LIB@
BX_OBJS = @NONINLINE_VAR@
BX_INCLUDES = bochs.h config.h osdep.h
.@CPP_SUFFIX@.o:
$(CXX) @DASH@c $(CXXFLAGS) $(BX_INCDIRS) @CXXFP@$< @OFP@$@
all: @PRIMARY_TARGET@
@EXTERNAL_DEPENDENCY@
bochs@EXE@: @IODEV_LIB_VAR@ @DEBUGGER_VAR@ \
cpu/libcpu.a memory/libmemory.a gui/libgui.a \
@DISASM_VAR@ @INSTRUMENT_VAR@ @DYNAMIC_VAR@ $(BX_OBJS) \
$(SIMX86_OBJS) \
$(FPU_LIB)
@LINK@ $(BX_OBJS) \
$(SIMX86_OBJS) \
iodev/libiodev.a \
cpu/libcpu.a memory/libmemory.a gui/libgui.a \
@DEBUGGER_VAR@ @DISASM_VAR@ @INSTRUMENT_VAR@ @DYNAMIC_VAR@ \
$(FPU_LIB) \
$(GUI_LINK_OPTS) \
$(MCH_LINK_FLAGS) \
$(SIMX86_LINK_FLAGS) \
$(READLINE_LIB)
$(BX_OBJS): $(BX_INCLUDES)
bxversion.h::
${RM} -f bxversion.h
echo '// This file is generated by "make bxversion.h"' > bxversion.h
echo "#define VER_STRING \"$(VER_STRING)\"" >> bxversion.h
echo "#define REL_STRING \"$(REL_STRING)\"" >> bxversion.h
iodev/libiodev.a::
cd iodev @COMMAND_SEPARATOR@
$(MAKE) $(MDEFINES) libiodev.a
@CD_UP_ONE@
debug/libdebug.a::
cd debug @COMMAND_SEPARATOR@
$(MAKE) $(MDEFINES) libdebug.a
@CD_UP_ONE@
cpu/libcpu.a::
cd cpu @COMMAND_SEPARATOR@
$(MAKE) $(MDEFINES) libcpu.a
@CD_UP_ONE@
memory/libmemory.a::
cd memory @COMMAND_SEPARATOR@
$(MAKE) $(MDEFINES) libmemory.a
@CD_UP_ONE@
gui/libgui.a::
cd gui @COMMAND_SEPARATOR@
$(MAKE) $(MDEFINES) libgui.a
@CD_UP_ONE@
disasm/libdisasm.a::
cd disasm @COMMAND_SEPARATOR@
$(MAKE) $(MDEFINES) libdisasm.a
@CD_UP_ONE@
dynamic/libdynamic.a::
cd dynamic @COMMAND_SEPARATOR@
$(MAKE) $(MDEFINES) libdynamic.a
@CD_UP_ONE@
@INSTRUMENT_DIR@/libinstrument.a::
cd @INSTRUMENT_DIR@ @COMMAND_SEPARATOR@
$(MAKE) $(MDEFINES) libinstrument.a
@CD_UP_TWO@
fpu/libfpu.a::
cd fpu @COMMAND_SEPARATOR@
$(MAKE) $(MDEFINES) libfpu.a
@CD_UP_ONE@
libbochs.a:
-rm -f libbochs.a
ar rv libbochs.a $(EXTERN_ENVIRONMENT_OBJS)
$(RANLIB) libbochs.a
libbochs_cpu.a: @DEBUGGER_VAR@ $(BX_OBJS)
-rm -f libbochs_cpu.a
ar rv libbochs_cpu.a $(BX_OBJS)
$(RANLIB) libbochs_cpu.a
install: install_bin install_dlx
install_bin::
${CP} bochs ${BINPATH}/bochs-${VERSION}
${RM} -f ${BINPATH}/bochs
${LN_S} bochs-${VERSION} ${BINPATH}/bochs
for i in bochs-dlx bochs-docs; do cp build/linux/$$i ${BINPATH}; done
-mkdir ${PREFIX}
-mkdir ${PREFIX}/${VERSION}
test -d ${PREFIX}/${VERSION}
test -w ${PREFIX}/${VERSION}
for i in ${INSTALL_LIST}; do /bin/cp $$i ${PREFIX}/${VERSION}; done
${CP} -r docs-html ${PREFIX}/${VERSION}
${RM} -f ${PREFIX}/${VERSION}/README
${CAT} build/linux/README.linux-binary README > ${PREFIX}/${VERSION}/README
install_dlx::
${RM} -f ${DLXLINUX_TAR}
${WGET} ${DLXLINUX_TAR_URL}
${RM} -rf ${PREFIX}/dlxlinux
${GUNZIP} -c ${DLXLINUX_TAR} | (cd ${PREFIX}; tar -xvf -)
test -d ${PREFIX}/dlxlinux
(cd ${PREFIX}/dlxlinux; ${MV} .bochsrc .bochsrc.orig; ${SED} -e "s/BIOS-bochs-990925a/${DLXLINUX_ROMFILE}/" -e "s/1\.1\.2/${VERSION}/g"< .bochsrc.orig > bochsrc; rm -f .bochsrc.orig)
${CHOWN} -R root.root ${PREFIX}/dlxlinux
${CHMOD} 777 ${PREFIX}/dlxlinux
${CHMOD} 666 ${PREFIX}/dlxlinux/*
${CHMOD} 644 ${PREFIX}/dlxlinux/README
erase_install::
${RM} -rf ${PREFIX}/${VERSION}
${RM} -rf ${PREFIX}/dlxlinux
rpm:: dist-clean
test -w ${SOURCES}
test -w ${SPECS}
rm -f /usr/src/redhat/SPECS/bochs.spec
${CAT} build/linux/bochs.rpmspec.template | ${SED} "s/@VERSION@/${VERSION}/g" > ${SPECS}/bochs.spec
${RM} -rf ${SOURCES}/bochs
${MKDIR} ${SOURCES}/bochs
${TAR} cf - * .??* | (cd ${SOURCES}/bochs && tar xf -)
(cd ${SOURCES}; tar czf bochs.tar.gz bochs)
${RPM} -ba ${SPECS}/bochs.spec
clean:
@RMCOMMAND@ *.o
@RMCOMMAND@ */*.o
@RMCOMMAND@ *.a
@RMCOMMAND@ */*.a
@RMCOMMAND@ bochs@EXE@
@RMCOMMAND@ bochs.out
local-dist-clean: clean
@RMCOMMAND@ config.h config.status config.log config.cache
all-clean: clean
cd iodev @COMMAND_SEPARATOR@
$(MAKE) clean
@CD_UP_ONE@
cd debug @COMMAND_SEPARATOR@
$(MAKE) clean
@CD_UP_ONE@
cd cpu @COMMAND_SEPARATOR@
$(MAKE) clean
@CD_UP_ONE@
cd memory @COMMAND_SEPARATOR@
$(MAKE) clean
@CD_UP_ONE@
cd gui @COMMAND_SEPARATOR@
$(MAKE) clean
@CD_UP_ONE@
cd disasm @COMMAND_SEPARATOR@
$(MAKE) clean
@CD_UP_ONE@
cd @INSTRUMENT_DIR@ @COMMAND_SEPARATOR@
$(MAKE) clean
@CD_UP_TWO@
cd misc @COMMAND_SEPARATOR@
$(MAKE) clean
@CD_UP_ONE@
cd dynamic @COMMAND_SEPARATOR@
$(MAKE) clean
@CD_UP_ONE@
cd fpu @COMMAND_SEPARATOR@
$(MAKE) clean
@CD_UP_ONE@
dist-clean: local-dist-clean
cd iodev @COMMAND_SEPARATOR@
$(MAKE) dist-clean
@CD_UP_ONE@
cd debug @COMMAND_SEPARATOR@
$(MAKE) dist-clean
@CD_UP_ONE@
cd bios @COMMAND_SEPARATOR@
$(MAKE) dist-clean
@CD_UP_ONE@
cd cpu @COMMAND_SEPARATOR@
$(MAKE) dist-clean
@CD_UP_ONE@
cd memory @COMMAND_SEPARATOR@
$(MAKE) dist-clean
@CD_UP_ONE@
cd gui @COMMAND_SEPARATOR@
$(MAKE) dist-clean
@CD_UP_ONE@
cd disasm @COMMAND_SEPARATOR@
$(MAKE) dist-clean
@CD_UP_ONE@
cd @INSTRUMENT_DIR@ @COMMAND_SEPARATOR@
$(MAKE) dist-clean
@CD_UP_TWO@
cd misc @COMMAND_SEPARATOR@
$(MAKE) dist-clean
@CD_UP_ONE@
cd dynamic @COMMAND_SEPARATOR@
$(MAKE) dist-clean
@CD_UP_ONE@
cd fpu @COMMAND_SEPARATOR@
$(MAKE) dist-clean
@CD_UP_ONE@
@RMCOMMAND@ Makefile