2021-02-17 19:53:40 +03:00
# Copyright (C) 2001-2021 The Bochs Project
2001-04-10 05:04:59 +04:00
#
# 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
2009-02-08 12:05:52 +03:00
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
2001-05-24 09:36:07 +04:00
#
####################################################
# NOTE: To be compatibile with nmake (microsoft vc++) please follow
# the following rules:
# use $(VAR) not ${VAR}
2001-04-10 05:04:59 +04:00
2001-06-06 17:57:24 +04:00
prefix = @prefix@
exec_prefix = @exec_prefix@
2002-10-28 11:42:28 +03:00
srcdir = @srcdir@
VPATH = @srcdir@
2001-06-06 17:57:24 +04:00
bindir = @bindir@
2002-10-25 01:07:56 +04:00
libdir = @libdir@
2002-12-11 22:21:53 +03:00
plugdir = @libdir@/bochs/plugins
2007-09-23 12:45:14 +04:00
datarootdir = @datarootdir@
2001-06-06 17:57:24 +04:00
mandir = @mandir@
man1dir = $( mandir) /man1
2002-06-29 22:35:32 +04:00
man5dir = $( mandir) /man5
2007-09-23 12:45:14 +04:00
docdir = $( datarootdir) /doc/bochs
sharedir = $( datarootdir) /bochs
2002-10-25 01:07:56 +04:00
top_builddir = .
top_srcdir = $( srcdir)
2001-06-06 17:57:24 +04:00
2001-09-14 08:19:08 +04:00
DESTDIR =
2001-06-06 17:57:24 +04:00
2001-11-10 06:48:22 +03:00
VERSION = @VERSION@
REL_STRING = @REL_STRING@
2014-06-19 11:54:56 +04:00
MAN_PAGE_1_LIST = bochs bximage bochs-dlx
2002-06-29 22:35:32 +04:00
MAN_PAGE_5_LIST = bochsrc
2020-01-05 15:58:25 +03:00
INSTALL_LIST_SHARE = bios/BIOS-bochs-* bios/VGABIOS* bios/SeaBIOS* bios/SeaVGABIOS* bios/bios.bin-* bios/vgabios-cirrus.bin-* @INSTALL_LIST_FOR_PLATFORM@
2020-12-26 11:31:16 +03:00
INSTALL_LIST_DOC = CHANGES COPYING LICENSE README TODO misc/slirp.conf misc/vnet.conf
2014-06-19 11:54:56 +04:00
INSTALL_LIST_BIN = bochs@EXE@ bximage@EXE@
2013-11-18 20:49:56 +04:00
INSTALL_LIST_BIN_OPTIONAL = bochsdbg@EXE@ @OPTIONAL_TARGET@
INSTALL_LIST_WIN32 = $( INSTALL_LIST_SHARE) $( INSTALL_LIST_DOC) $( INSTALL_LIST_BIN) $( INSTALL_LIST_BIN_OPTIONAL)
2006-11-05 13:41:56 +03:00
INSTALL_LIST_MACOSX = $( INSTALL_LIST_SHARE) $( INSTALL_LIST_DOC) bochs.scpt
2002-11-23 00:04:10 +03:00
# for win32 and macosx, these files get renamed to *.txt in install process
2019-12-29 10:20:50 +03:00
TEXT_FILE_LIST = README CHANGES COPYING LICENSE TODO VGABIOS-elpin-LICENSE VGABIOS-lgpl-README SeaBIOS-README SeaVGABIOS-README
2001-05-22 20:12:01 +04:00
CP = cp
CAT = cat
RM = rm
2001-05-22 21:20:45 +04:00
MV = mv
2001-05-22 20:12:01 +04:00
LN_S = ln -sf
2002-12-15 01:43:56 +03:00
DLXLINUX_TAR = dlxlinux4.tar.gz
2021-06-13 11:02:33 +03:00
DLXLINUX_TAR_URL = https://bochs.sourceforge.io/guestos/$( DLXLINUX_TAR)
2001-05-31 19:30:30 +04:00
DLXLINUX_ROMFILE = BIOS-bochs-latest
2001-05-22 20:12:01 +04:00
GUNZIP = gunzip
2005-07-30 19:04:26 +04:00
WGET = @WGET@
2001-05-22 21:20:45 +04:00
SED = sed
MKDIR = mkdir
2001-06-04 08:26:56 +04:00
RMDIR = rmdir
2001-05-22 21:20:45 +04:00
TAR = tar
2001-05-23 12:16:07 +04:00
CHMOD = chmod
2004-09-04 12:24:40 +04:00
# the GZIP variable is reserved by gzip program
GZIP_BIN = gzip -9
2001-09-24 08:16:53 +04:00
GUNZIP = gunzip
2001-09-24 08:21:29 +04:00
ZIP = zip
2001-10-05 10:03:41 +04:00
UNIX2DOS = unix2dos
2002-10-25 01:07:56 +04:00
LIBTOOL = @LIBTOOL@
DLLTOOL = dlltool
2003-06-06 23:57:25 +04:00
RC_CMD = @RC_CMD@
2001-04-10 05:04:59 +04:00
@ S U F F I X _ L I N E @
2001-09-14 08:19:08 +04:00
srcdir = @srcdir@
VPATH = @srcdir@
2001-04-10 05:04:59 +04:00
2012-07-14 11:01:43 +04:00
SHELL = @SHELL@
2001-04-10 05:04:59 +04:00
@ S E T _ M A K E @
CC = @CC@
CXX = @CXX@
2002-12-15 01:18:00 +03:00
CFLAGS = @CFLAGS@ @GUI_CFLAGS@ $( MCH_CFLAGS) $( FLA_FLAGS) @DEFINE_PLUGIN_PATH@ -DBX_SHARE_PATH= '"$(sharedir)"'
CXXFLAGS = @CXXFLAGS@ @GUI_CXXFLAGS@ $( MCH_CFLAGS) $( FLA_FLAGS) @DEFINE_PLUGIN_PATH@ -DBX_SHARE_PATH= '"$(sharedir)"'
2021-09-10 18:33:22 +03:00
CPPFLAGS = @CPPFLAGS@
2001-04-10 05:04:59 +04:00
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
2001-05-23 12:16:07 +04:00
# To compile with readline:
# linux needs just -lreadline
# solaris needs -lreadline -lcurses
2001-04-10 05:04:59 +04:00
X_LIBS = @X_LIBS@
2012-08-07 22:28:00 +04:00
X_PRE_LIBS = @X_PRE_LIBS@
GUI_LINK_OPTS_X = $( X_LIBS) $( X_PRE_LIBS)
2014-06-21 12:22:22 +04:00
GUI_LINK_OPTS_SDL = @GUI_LINK_OPTS_SDL@
2014-06-23 23:37:58 +04:00
GUI_LINK_OPTS_SDL2 = @GUI_LINK_OPTS_SDL2@
2002-11-21 22:26:07 +03:00
GUI_LINK_OPTS_SVGA = -lvga -lvgagl
2001-06-02 07:07:28 +04:00
GUI_LINK_OPTS_RFB = @RFB_LIBS@
2013-05-31 20:46:15 +04:00
GUI_LINK_OPTS_VNCSRV = @GUI_LINK_OPTS_VNCSRV@
2008-02-06 01:57:43 +03:00
GUI_LINK_OPTS_AMIGAOS =
2013-12-22 16:17:28 +04:00
GUI_LINK_OPTS_WIN32 = -luser32 -lgdi32 -lcomdlg32 -lcomctl32 -lshell32
2001-04-10 05:04:59 +04:00
GUI_LINK_OPTS_WIN32_VCPP = user32.lib gdi32.lib winmm.lib \
2013-12-22 16:17:28 +04:00
comdlg32.lib comctl32.lib advapi32.lib shell32.lib
2001-04-10 05:04:59 +04:00
GUI_LINK_OPTS_MACOS =
2001-09-27 06:00:37 +04:00
GUI_LINK_OPTS_CARBON = -framework Carbon
2001-04-10 05:04:59 +04:00
GUI_LINK_OPTS_NOGUI =
2001-05-08 23:07:26 +04:00
GUI_LINK_OPTS_TERM = @GUI_LINK_OPTS_TERM@
2002-09-05 19:12:13 +04:00
GUI_LINK_OPTS_WX = @GUI_LINK_OPTS_WX@
2014-01-27 02:11:31 +04:00
GUI_LINK_OPTS = @GUI_LINK_OPTS@
DEVICE_LINK_OPTS = @DEVICE_LINK_OPTS@
2001-04-10 05:04:59 +04:00
RANLIB = @RANLIB@
- add -lwinmm to the link lines anytime you use --enable-sb16=win. Now
instead of winmm being a part of GUI_LINK_OPTS_WIN32 only, it is
placed in @DEVICE_LINE_OPTS@ so that it will be used for sdl, rfb, wx,
etc.
- solve compile problems when building bximage, niclist, and any other
console based program. The compile flags returned by wx-config and
sdl-config did strange things to these console programs, for example
redefining main to SDL_main. Because I wanted to use the
configure-generated CFLAGS to compile the programs, but I wanted to
avoid including GUI specific compile options, I split up the configure's
@CFLAGS@ variable into @CFLAGS@ and @GUI_CFLAGS@, and split
@CXXFLAGS@ into @CXXFLAGS@ and @GUI_CXXFLAGS@. All programs in the
Bochs binary will use both, but the console programs will just use
@CFLAGS@ or @CXXFLAGS@.
- gui/Makefile.in, I no longer use the gui specific CFLAGS variables,
SDL_CFLAGS and WX_CXXFLAGS. These values are included in CFLAGS and
CXXFLAGS now.
- modified: configure.in, configure, all Makefile.in's
2002-10-02 03:37:50 +04:00
CFLAGS_CONSOLE = @CFLAGS@ $( MCH_CFLAGS) $( FLA_FLAGS)
2013-10-29 00:31:34 +04:00
CXXFLAGS_CONSOLE = @CXXFLAGS_CONSOLE@ $( MCH_CFLAGS) $( FLA_FLAGS)
2005-05-14 18:41:27 +04:00
BXIMAGE_LINK_OPTS = @BXIMAGE_LINK_OPTS@
- add -lwinmm to the link lines anytime you use --enable-sb16=win. Now
instead of winmm being a part of GUI_LINK_OPTS_WIN32 only, it is
placed in @DEVICE_LINE_OPTS@ so that it will be used for sdl, rfb, wx,
etc.
- solve compile problems when building bximage, niclist, and any other
console based program. The compile flags returned by wx-config and
sdl-config did strange things to these console programs, for example
redefining main to SDL_main. Because I wanted to use the
configure-generated CFLAGS to compile the programs, but I wanted to
avoid including GUI specific compile options, I split up the configure's
@CFLAGS@ variable into @CFLAGS@ and @GUI_CFLAGS@, and split
@CXXFLAGS@ into @CXXFLAGS@ and @GUI_CXXFLAGS@. All programs in the
Bochs binary will use both, but the console programs will just use
@CFLAGS@ or @CXXFLAGS@.
- gui/Makefile.in, I no longer use the gui specific CFLAGS variables,
SDL_CFLAGS and WX_CXXFLAGS. These values are included in CFLAGS and
CXXFLAGS now.
- modified: configure.in, configure, all Makefile.in's
2002-10-02 03:37:50 +04:00
2001-09-14 08:19:08 +04:00
BX_INCDIRS = -I. -I$( srcdir) /. -I@INSTRUMENT_DIR@ -I$( srcdir) /@INSTRUMENT_DIR@
2001-04-10 05:04:59 +04:00
2003-11-28 18:07:29 +03:00
#SUBDIRS = iodev bx_debug
2001-04-10 05:04:59 +04:00
#all install uninstall: config.h#
# for subdir in $(SUBDIRS); do #
# echo making $@ in $$subdir; #
2008-05-10 17:53:25 +04:00
# ($(MAKE) -C $$subdir $(MDEFINES) $@) || exit 1; #
2001-04-10 05:04:59 +04:00
# done#
# gnu flags for clean up
#CFLAGS = -ansi -O -g -Wunused -Wuninitialized
NONINLINE_OBJS = \
2001-06-19 20:31:28 +04:00
logio.o \
2001-04-10 05:04:59 +04:00
main.o \
2004-06-05 02:06:55 +04:00
config.o \
2001-04-10 05:51:50 +04:00
pc_system.o \
2002-10-02 04:09:49 +04:00
osdep.o \
2002-10-25 01:07:56 +04:00
plugin.o \
2006-01-24 22:03:55 +03:00
crc.o \
2017-09-14 19:18:12 +03:00
bxthread.o \
2002-10-02 04:09:49 +04:00
@EXTRA_BX_OBJS@
2001-04-10 05:04:59 +04:00
EXTERN_ENVIRONMENT_OBJS = \
main.o \
2004-06-05 02:06:55 +04:00
config.o \
2001-04-10 05:04:59 +04:00
pc_system.o
2003-11-28 18:07:29 +03:00
DEBUGGER_LIB = bx_debug/libdebug.a
2001-04-10 05:04:59 +04:00
INSTRUMENT_LIB = @INSTRUMENT_DIR@/libinstrument.a
2012-09-13 01:08:40 +04:00
FPU_LIB = cpu/fpu/libfpu.a
2014-07-25 12:35:06 +04:00
AVX_LIB = cpu/avx/libavx.a
2001-05-23 12:16:07 +04:00
READLINE_LIB = @READLINE_LIB@
2001-12-08 00:56:15 +03:00
EXTRA_LINK_OPTS = @EXTRA_LINK_OPTS@
2001-04-10 05:04:59 +04:00
2002-10-03 09:23:20 +04:00
GDBSTUB_OBJS = gdbstub.o
2001-04-10 05:04:59 +04:00
BX_OBJS = @NONINLINE_VAR@
2001-04-10 05:51:50 +04:00
BX_INCLUDES = bochs.h config.h osdep.h
2001-04-10 05:04:59 +04:00
.@CPP_SUFFIX@.o :
2021-09-10 18:33:22 +03:00
$( CXX) @DASH@c $( BX_INCDIRS) $( CPPFLAGS) $( CXXFLAGS) @CXXFP@$< @OFP@$@
2001-06-01 09:58:46 +04:00
.c.o :
2021-09-10 18:33:22 +03:00
$( CC) @DASH@c $( BX_INCDIRS) $( CPPFLAGS) $( CFLAGS) $( FPU_FLAGS) $< @OFP@$@
2001-04-10 05:04:59 +04:00
2014-06-19 11:54:56 +04:00
all : @PRIMARY_TARGET @ @PLUGIN_TARGET @ bximage @EXE @ @OPTIONAL_TARGET @ @BUILD_DOCBOOK_VAR @
2001-04-10 05:04:59 +04:00
@ E X T E R N A L _ D E P E N D E N C Y @
2012-09-11 00:49:29 +04:00
bochs@EXE@ : @IODEV_LIB_VAR @ @DISPLAY_LIB_VAR @ @HDIMAGE_LIB_VAR @ @USB_LIB_VAR @ @NETWORK_LIB_VAR @ @SOUND_LIB_VAR @ \
2014-07-25 12:35:06 +04:00
@DEBUGGER_VAR@ cpu/libcpu.a @AVX_LIB_VAR@ cpu/cpudb/libcpudb.a memory/libmemory.a \
2021-01-02 16:43:10 +03:00
gui/libgui.a @INSTRUMENT_VAR@ $( BX_OBJS) \
2012-01-15 11:52:04 +04:00
$( SIMX86_OBJS) @FPU_VAR@ @GDBSTUB_VAR@ @PLUGIN_VAR@
2005-06-14 00:28:38 +04:00
@LINK@ @EXPORT_DYNAMIC@ $( BX_OBJS) $( SIMX86_OBJS) \
2012-09-11 00:49:29 +04:00
@IODEV_LIB_VAR@ @DISPLAY_LIB_VAR@ @HDIMAGE_LIB_VAR@ @USB_LIB_VAR@ @NETWORK_LIB_VAR@ @SOUND_LIB_VAR@ \
2014-07-25 12:35:06 +04:00
@DEBUGGER_VAR@ cpu/libcpu.a @AVX_LIB_VAR@ cpu/cpudb/libcpudb.a \
2011-08-18 22:55:22 +04:00
memory/libmemory.a gui/libgui.a \
2021-01-02 16:43:10 +03:00
@INSTRUMENT_VAR@ @PLUGIN_LIB@ \
2003-04-23 00:42:27 +04:00
@GDBSTUB_VAR@ @FPU_VAR@ \
2003-05-24 21:09:26 +04:00
@NONPLUGIN_GUI_LINK_OPTS@ \
2014-01-27 02:11:31 +04:00
$( DEVICE_LINK_OPTS) \
2002-10-25 01:07:56 +04:00
$( MCH_LINK_FLAGS) \
$( SIMX86_LINK_FLAGS) \
$( READLINE_LIB) \
$( EXTRA_LINK_OPTS) \
$( LIBS)
# Special make target for cygwin/mingw using dlltool instead of
# libtool. This creates a .DEF file, and exports file, an import library,
# and then links bochs.exe with the exports file.
2012-09-11 00:49:29 +04:00
.win32_dll_plugin_target : @IODEV_LIB_VAR @ @DISPLAY_LIB_VAR @ @HDIMAGE_LIB_VAR @ @USB_LIB_VAR @ @NETWORK_LIB_VAR @ \
2014-07-25 12:35:06 +04:00
@SOUND_LIB_VAR@ @DEBUGGER_VAR@ cpu/libcpu.a @AVX_LIB_VAR@ cpu/cpudb/libcpudb.a \
2021-01-02 16:43:10 +03:00
memory/libmemory.a gui/libgui.a @INSTRUMENT_VAR@ \
2012-01-15 11:52:04 +04:00
$( BX_OBJS) $( SIMX86_OBJS) @FPU_VAR@ @GDBSTUB_VAR@ @PLUGIN_VAR@
2002-11-01 16:44:43 +03:00
$( DLLTOOL) --export-all-symbols --output-def bochs.def \
$( BX_OBJS) $( SIMX86_OBJS) \
2012-09-11 00:49:29 +04:00
@IODEV_LIB_VAR@ @DISPLAY_LIB_VAR@ @HDIMAGE_LIB_VAR@ @USB_LIB_VAR@ @NETWORK_LIB_VAR@ @SOUND_LIB_VAR@ \
2014-07-25 12:35:06 +04:00
cpu/libcpu.a @AVX_LIB_VAR@ cpu/cpudb/libcpudb.a memory/libmemory.a gui/libgui.a \
2021-01-02 16:43:10 +03:00
@DEBUGGER_VAR@ @INSTRUMENT_VAR@ @PLUGIN_VAR@ \
2003-04-23 00:42:27 +04:00
@GDBSTUB_VAR@ @FPU_VAR@
2002-10-25 01:07:56 +04:00
$( DLLTOOL) --dllname bochs.exe --def bochs.def --output-lib dllexports.a
$( DLLTOOL) --dllname bochs.exe --output-exp bochs.exp --def bochs.def
2014-01-07 20:52:03 +04:00
$( CXX) -o bochs.exe $( CXXFLAGS) $( LDFLAGS) \
2002-10-25 01:07:56 +04:00
$( BX_OBJS) bochs.exp $( SIMX86_OBJS) \
2012-09-11 00:49:29 +04:00
@IODEV_LIB_VAR@ @DISPLAY_LIB_VAR@ @HDIMAGE_LIB_VAR@ @USB_LIB_VAR@ @NETWORK_LIB_VAR@ @SOUND_LIB_VAR@ \
2014-07-25 12:35:06 +04:00
cpu/libcpu.a @AVX_LIB_VAR@ cpu/cpudb/libcpudb.a memory/libmemory.a gui/libgui.a \
2021-01-02 16:43:10 +03:00
@DEBUGGER_VAR@ @INSTRUMENT_VAR@ @PLUGIN_LIB@ \
2003-04-23 00:42:27 +04:00
@GDBSTUB_VAR@ @FPU_VAR@ \
2003-05-25 03:49:38 +04:00
$( GUI_LINK_OPTS) \
2014-01-27 02:11:31 +04:00
$( DEVICE_LINK_OPTS) \
2001-04-10 05:04:59 +04:00
$( MCH_LINK_FLAGS) \
2002-10-25 01:07:56 +04:00
$( SIMX86_LINK_FLAGS) \
2001-12-08 00:56:15 +03:00
$( READLINE_LIB) \
2002-10-25 01:07:56 +04:00
$( EXTRA_LINK_OPTS) \
$( LIBS)
touch .win32_dll_plugin_target
bochs_plugins :
2008-06-01 20:48:13 +04:00
cd gui @COMMAND_SEPARATOR@
$( MAKE) plugins
@CD_UP_ONE@
cd iodev @COMMAND_SEPARATOR@
$( MAKE) plugins
@CD_UP_ONE@
2012-09-11 00:49:29 +04:00
cd iodev/display @COMMAND_SEPARATOR@
$( MAKE) plugins
@CD_UP_TWO@
2012-08-05 22:13:38 +04:00
cd iodev/hdimage @COMMAND_SEPARATOR@
$( MAKE) plugins
@CD_UP_TWO@
2012-01-14 16:36:32 +04:00
cd iodev/usb @COMMAND_SEPARATOR@
$( MAKE) plugins
@CD_UP_TWO@
2012-01-14 21:03:00 +04:00
cd iodev/network @COMMAND_SEPARATOR@
$( MAKE) plugins
@CD_UP_TWO@
2012-01-15 11:52:04 +04:00
cd iodev/sound @COMMAND_SEPARATOR@
$( MAKE) plugins
@CD_UP_TWO@
2001-04-10 05:04:59 +04:00
2020-12-30 20:56:27 +03:00
bximage@EXE@ : misc /bximage .o misc /hdimage .o misc /vmware 3.o misc /vmware 4.o misc /vpc .o misc /vbox .o
@LINK_CONSOLE@ $( BXIMAGE_LINK_OPTS) misc/bximage.o misc/hdimage.o misc/vmware3.o misc/vmware4.o misc/vpc.o misc/vbox.o
2013-10-20 14:43:01 +04:00
2005-06-13 19:56:57 +04:00
niclist@EXE@ : misc /niclist .o
@LINK_CONSOLE@ misc/niclist.o
2017-03-12 10:48:08 +03:00
bxhub@EXE@ : misc /bxhub .o misc /netutil .o
@LINK_CONSOLE@ misc/bxhub.o misc/netutil.o @BXHUB_LINK_OPTS@
2017-02-28 01:26:43 +03:00
- add -lwinmm to the link lines anytime you use --enable-sb16=win. Now
instead of winmm being a part of GUI_LINK_OPTS_WIN32 only, it is
placed in @DEVICE_LINE_OPTS@ so that it will be used for sdl, rfb, wx,
etc.
- solve compile problems when building bximage, niclist, and any other
console based program. The compile flags returned by wx-config and
sdl-config did strange things to these console programs, for example
redefining main to SDL_main. Because I wanted to use the
configure-generated CFLAGS to compile the programs, but I wanted to
avoid including GUI specific compile options, I split up the configure's
@CFLAGS@ variable into @CFLAGS@ and @GUI_CFLAGS@, and split
@CXXFLAGS@ into @CXXFLAGS@ and @GUI_CXXFLAGS@. All programs in the
Bochs binary will use both, but the console programs will just use
@CFLAGS@ or @CXXFLAGS@.
- gui/Makefile.in, I no longer use the gui specific CFLAGS variables,
SDL_CFLAGS and WX_CXXFLAGS. These values are included in CFLAGS and
CXXFLAGS now.
- modified: configure.in, configure, all Makefile.in's
2002-10-02 03:37:50 +04:00
# compile with console CXXFLAGS, not gui CXXFLAGS
2013-10-20 14:43:01 +04:00
misc/bximage.o : $( srcdir ) /misc /bximage .cc $( srcdir ) /misc /bswap .h \
2013-10-14 00:30:51 +04:00
$( srcdir) /misc/bxcompat.h $( srcdir) /iodev/hdimage/hdimage.h
2021-09-10 18:33:22 +03:00
$( CXX) @DASH@c $( BX_INCDIRS) $( CPPFLAGS) $( CXXFLAGS_CONSOLE) $( srcdir) /misc/bximage.cc @OFP@$@
2013-10-14 00:30:51 +04:00
misc/hdimage.o : $( srcdir ) /iodev /hdimage /hdimage .cc \
$( srcdir) /iodev/hdimage/hdimage.h $( srcdir) /misc/bxcompat.h
2021-09-10 18:33:22 +03:00
$( CXX) @DASH@c $( BX_INCDIRS) @BXIMAGE_FLAG@ $( CPPFLAGS) $( CXXFLAGS_CONSOLE) $( srcdir) /iodev/hdimage/hdimage.cc @OFP@$@
2013-10-14 00:30:51 +04:00
misc/vmware3.o : $( srcdir ) /iodev /hdimage /vmware 3.cc $( srcdir ) /iodev /hdimage /vmware 3.h \
$( srcdir) /iodev/hdimage/hdimage.h $( srcdir) /misc/bxcompat.h
2021-09-10 18:33:22 +03:00
$( CXX) @DASH@c $( BX_INCDIRS) @BXIMAGE_FLAG@ $( CPPFLAGS) $( CXXFLAGS_CONSOLE) $( srcdir) /iodev/hdimage/vmware3.cc @OFP@$@
2013-10-14 00:30:51 +04:00
misc/vmware4.o : $( srcdir ) /iodev /hdimage /vmware 4.cc $( srcdir ) /iodev /hdimage /vmware 4.h \
$( srcdir) /iodev/hdimage/hdimage.h $( srcdir) /misc/bxcompat.h
2021-09-10 18:33:22 +03:00
$( CXX) @DASH@c $( BX_INCDIRS) @BXIMAGE_FLAG@ $( CPPFLAGS) $( CXXFLAGS_CONSOLE) $( srcdir) /iodev/hdimage/vmware4.cc @OFP@$@
2013-10-14 00:30:51 +04:00
2020-12-30 20:56:27 +03:00
misc/vpc.o : $( srcdir ) /iodev /hdimage /vpc .cc $( srcdir ) /iodev /hdimage /vpc .h \
2013-10-14 00:30:51 +04:00
$( srcdir) /iodev/hdimage/hdimage.h $( srcdir) /misc/bxcompat.h
2021-09-10 18:33:22 +03:00
$( CXX) @DASH@c $( BX_INCDIRS) @BXIMAGE_FLAG@ $( CPPFLAGS) $( CXXFLAGS_CONSOLE) $( srcdir) /iodev/hdimage/vpc.cc @OFP@$@
2013-10-14 00:30:51 +04:00
2015-03-29 17:27:32 +03:00
misc/vbox.o : $( srcdir ) /iodev /hdimage /vbox .cc $( srcdir ) /iodev /hdimage /vbox .h \
$( srcdir) /iodev/hdimage/hdimage.h $( srcdir) /misc/bxcompat.h
2021-09-10 18:33:22 +03:00
$( CXX) @DASH@c $( BX_INCDIRS) @BXIMAGE_FLAG@ $( CPPFLAGS) $( CXXFLAGS_CONSOLE) $( srcdir) /iodev/hdimage/vbox.cc @OFP@$@
2015-03-29 17:27:32 +03:00
2017-02-28 01:26:43 +03:00
misc/bxhub.o : $( srcdir ) /misc /bxhub .cc $( srcdir ) /iodev /network /netmod .h \
2020-05-23 12:04:35 +03:00
$( srcdir) /iodev/network/netutil.h $( srcdir) /misc/bxcompat.h
2021-09-10 18:33:22 +03:00
$( CC) @DASH@c $( BX_INCDIRS) $( CPPFLAGS) $( CXXFLAGS_CONSOLE) $( srcdir) /misc/bxhub.cc @OFP@$@
2017-02-28 01:26:43 +03:00
2017-03-12 23:26:42 +03:00
misc/netutil.o : $( srcdir ) /iodev /network /netutil .cc $( srcdir ) /iodev /network /netutil .h \
2017-03-12 10:48:08 +03:00
$( srcdir) /iodev/network/netmod.h $( srcdir) /misc/bxcompat.h
2021-09-10 18:33:22 +03:00
$( CXX) @DASH@c $( BX_INCDIRS) @BXHUB_FLAG@ $( CPPFLAGS) $( CXXFLAGS_CONSOLE) $( srcdir) /iodev/network/netutil.cc @OFP@$@
2017-02-28 01:26:43 +03:00
2013-10-20 14:43:01 +04:00
# compile with console CFLAGS, not gui CXXFLAGS
2005-06-13 19:56:57 +04:00
misc/niclist.o : $( srcdir ) /misc /niclist .c
2021-09-10 18:33:22 +03:00
$( CC) @DASH@c $( BX_INCDIRS) $( CPPFLAGS) $( CFLAGS_CONSOLE) $( srcdir) /misc/niclist.c @OFP@$@
2001-04-10 05:04:59 +04:00
$(BX_OBJS) : $( BX_INCLUDES )
2008-06-01 20:48:13 +04:00
# cannot use -C option to be compatible with Microsoft nmake
2001-05-14 19:32:43 +04:00
iodev/libiodev.a ::
2008-06-01 20:48:13 +04:00
cd iodev @COMMAND_SEPARATOR@
$( MAKE) $( MDEFINES) libiodev.a
@CD_UP_ONE@
2001-04-10 05:04:59 +04:00
2012-09-11 00:54:15 +04:00
iodev/display/libdisplay.a ::
2012-09-11 00:49:29 +04:00
cd iodev/display @COMMAND_SEPARATOR@
$( MAKE) $( MDEFINES) libdisplay.a
@CD_UP_TWO@
2012-08-05 22:13:38 +04:00
iodev/hdimage/libhdimage.a ::
cd iodev/hdimage @COMMAND_SEPARATOR@
$( MAKE) $( MDEFINES) libhdimage.a
@CD_UP_TWO@
2012-01-14 16:36:32 +04:00
iodev/usb/libusb.a ::
cd iodev/usb @COMMAND_SEPARATOR@
$( MAKE) $( MDEFINES) libusb.a
@CD_UP_TWO@
2012-01-14 21:03:00 +04:00
iodev/network/libnetwork.a ::
cd iodev/network @COMMAND_SEPARATOR@
$( MAKE) $( MDEFINES) libnetwork.a
@CD_UP_TWO@
2012-01-15 11:52:04 +04:00
iodev/sound/libsound.a ::
cd iodev/sound @COMMAND_SEPARATOR@
$( MAKE) $( MDEFINES) libsound.a
@CD_UP_TWO@
2003-11-28 18:07:29 +03:00
bx_debug/libdebug.a ::
2008-06-01 20:48:13 +04:00
cd bx_debug @COMMAND_SEPARATOR@
$( MAKE) $( MDEFINES) libdebug.a
@CD_UP_ONE@
2001-04-10 05:04:59 +04:00
2002-09-14 09:46:57 +04:00
cpu/libcpu.a ::
2008-06-01 20:48:13 +04:00
cd cpu @COMMAND_SEPARATOR@
$( MAKE) $( MDEFINES) libcpu.a
@CD_UP_ONE@
2001-04-10 05:04:59 +04:00
2014-07-25 12:35:06 +04:00
cpu/avx/libavx.a ::
cd cpu/avx @COMMAND_SEPARATOR@
$( MAKE) $( MDEFINES) libavx.a
@CD_UP_TWO@
2011-08-18 22:55:22 +04:00
cpu/cpudb/libcpudb.a ::
cd cpu/cpudb @COMMAND_SEPARATOR@
$( MAKE) $( MDEFINES) libcpudb.a
@CD_UP_TWO@
2012-09-13 01:08:40 +04:00
cpu/fpu/libfpu.a ::
cd cpu/fpu @COMMAND_SEPARATOR@
$( MAKE) $( MDEFINES) libfpu.a
@CD_UP_TWO@
2001-05-14 19:32:43 +04:00
memory/libmemory.a ::
2008-06-01 20:48:13 +04:00
cd memory @COMMAND_SEPARATOR@
$( MAKE) $( MDEFINES) libmemory.a
@CD_UP_ONE@
2001-04-10 05:04:59 +04:00
2001-05-14 19:32:43 +04:00
gui/libgui.a ::
2008-06-01 20:48:13 +04:00
cd gui @COMMAND_SEPARATOR@
$( MAKE) $( MDEFINES) libgui.a
@CD_UP_ONE@
2001-04-10 05:04:59 +04:00
2001-05-14 19:32:43 +04:00
@INSTRUMENT_DIR@/libinstrument.a ::
2008-06-01 20:48:13 +04:00
cd @INSTRUMENT_DIR@ @COMMAND_SEPARATOR@
$( MAKE) $( MDEFINES) libinstrument.a
@CD_UP_TWO@
2001-04-10 05:04:59 +04:00
libbochs.a :
-rm -f libbochs.a
ar rv libbochs.a $( EXTERN_ENVIRONMENT_OBJS)
$( RANLIB) libbochs.a
2005-01-05 22:54:32 +03:00
# for wxWidgets port, on win32 platform
2021-03-22 11:50:55 +03:00
wxbochs_resources.o : wxbochs .rc win 32res .rc bxversion .rc
2002-10-03 06:26:32 +04:00
windres $( srcdir) /wxbochs.rc -o $@ --include-dir= ` @WX_CONFIG@ --prefix` /include
2002-10-02 04:09:49 +04:00
2002-12-26 21:24:41 +03:00
# for win32 gui
2008-01-27 21:02:22 +03:00
win32res.o : win 32res .rc bxversion .rc
2012-02-20 10:43:53 +04:00
$( RC_CMD) $@ $( srcdir) /win32res.rc
2002-12-26 21:24:41 +03:00
2001-10-05 10:03:41 +04:00
#####################################################################
# Install target for all platforms.
#####################################################################
install : all @INSTALL_TARGET @
#####################################################################
# Install target for win32
#
# This is intended to be run in cygwin, since it has better scripting
# tools.
#####################################################################
2013-11-18 20:49:56 +04:00
install_win32 : download_dlx dl_docbook
-mkdir -p $( INSTDIR)
-cp -p obj-release/*.exe .
for i in $( INSTALL_LIST_WIN32) ; do if test -f $$ i; then cp -p $$ i $( INSTDIR) ; else cp -p $( srcdir) /$$ i $( INSTDIR) ; fi ; done
cp $( srcdir) /misc/sb16/sb16ctrl.example $( INSTDIR) /sb16ctrl.txt
cp -p $( srcdir) /misc/sb16/sb16ctrl.exe $( INSTDIR)
cp $( srcdir) /.bochsrc $( INSTDIR) /bochsrc-sample.txt
2014-06-03 21:24:00 +04:00
cp $( srcdir) /TESTFORM.txt $( INSTDIR)
2013-11-18 20:49:56 +04:00
-mkdir $( INSTDIR) /keymaps
cp -p $( srcdir) /gui/keymaps/*.map $( INSTDIR) /keymaps
cat $( DLXLINUX_TAR) | ( cd $( INSTDIR) && tar xzvf -)
echo '..\bochs -q' > $( INSTDIR) /dlxlinux/run.bat
2014-05-31 21:24:20 +04:00
dlxrc = $( INSTDIR) /dlxlinux/bochsrc; mv $$ dlxrc.txt $$ dlxrc.orig && sed < $$ dlxrc.orig 's/$$BXSHARE/../' > $$ dlxrc.bxrc && rm -f $$ dlxrc.orig
2013-11-18 20:49:56 +04:00
mv $( INSTDIR) /README $( INSTDIR) /README.orig
cat $( srcdir) /build/win32/README.win32-binary $( INSTDIR) /README.orig > $( INSTDIR) /README
rm -f $( INSTDIR) /README.orig
for i in $( TEXT_FILE_LIST) ; do mv $( INSTDIR) /$$ i $( INSTDIR) /$$ i.txt; done
cd $( INSTDIR) ; $( UNIX2DOS) *.txt */*.txt
-mkdir -p $( INSTDIR) /docs
$( GUNZIP) -c $( srcdir) /doc/docbook/bochsdoc.tar.gz | $( TAR) -xvf - -C $( INSTDIR) /docs
cd $( INSTDIR) ; NAME = ` pwd| $( SED) 's/.*\///' ` ; ( cd ..; $( ZIP) $$ NAME.zip -r $$ NAME) ; ls -l ../$$ NAME.zip
2001-10-05 10:03:41 +04:00
#####################################################################
# install target for unix
#####################################################################
2002-12-13 20:52:16 +03:00
install_unix : install_bin @INSTALL_PLUGINS_VAR @ install_man install_share install_doc @INSTALL_DOCBOOK_VAR @
2001-05-22 20:12:01 +04:00
install_bin ::
2002-06-25 11:30:44 +04:00
for i in $( DESTDIR) $( bindir) ; do mkdir -p $$ i && test -d $$ i && test -w $$ i; done
2005-03-06 00:02:59 +03:00
for i in $( INSTALL_LIST_BIN) ; do if test -f $$ i; then install $$ i $( DESTDIR) $( bindir) ; else install $( srcdir) /$$ i $( DESTDIR) $( bindir) ; fi ; done
-for i in $( INSTALL_LIST_BIN_OPTIONAL) ; do if test -f $$ i; then install $$ i $( DESTDIR) $( bindir) ; else install $( srcdir) /$$ i $( DESTDIR) $( bindir) ; fi ; done
2002-06-25 11:30:44 +04:00
2002-10-25 01:07:56 +04:00
install_libtool_plugins ::
2002-11-14 21:45:49 +03:00
for i in $( DESTDIR) $( plugdir) ; do mkdir -p $$ i && test -d $$ i && test -w $$ i; done
2014-11-13 21:18:38 +03:00
for i in gui iodev; do \
find $$ i -type f -name '*.la' -exec $( LIBTOOL) --mode= install install '{}' $( DESTDIR) $( plugdir) ';' ; done
2002-11-14 21:45:49 +03:00
$( LIBTOOL) --finish $( DESTDIR) $( plugdir)
2002-10-25 01:07:56 +04:00
install_dll_plugins ::
2002-11-14 21:45:49 +03:00
for i in $( DESTDIR) $( plugdir) ; do mkdir -p $$ i && test -d $$ i && test -w $$ i; done
2014-11-13 21:18:38 +03:00
for i in gui iodev; do \
find $$ i -type f -name '*.dll' -exec cp '{}' $( DESTDIR) $( plugdir) ';' ; done
2002-10-25 01:07:56 +04:00
2002-06-25 11:30:44 +04:00
install_share ::
for i in $( DESTDIR) $( sharedir) ; do mkdir -p $$ i && test -d $$ i && test -w $$ i; done
2005-03-06 00:02:59 +03:00
for i in $( INSTALL_LIST_SHARE) ; do if test -f $$ i; then install -m 644 $$ i $( DESTDIR) $( sharedir) ; else install -m 644 $( srcdir) /$$ i $( DESTDIR) $( sharedir) ; fi ; done
2004-10-29 21:04:02 +04:00
-mkdir $( DESTDIR) $( sharedir) /keymaps
2005-03-06 00:02:59 +03:00
for i in $( srcdir) /gui/keymaps/*.map; do install -m 644 $$ i $( DESTDIR) $( sharedir) /keymaps/; done
2002-06-25 11:30:44 +04:00
install_doc ::
for i in $( DESTDIR) $( docdir) ; do mkdir -p $$ i && test -d $$ i && test -w $$ i; done
2005-03-06 00:02:59 +03:00
for i in $( INSTALL_LIST_DOC) ; do if test -f $$ i; then install -m 644 $$ i $( DESTDIR) $( docdir) ; else install -m 644 $( srcdir) /$$ i $( DESTDIR) $( docdir) ; fi ; done
2002-06-25 11:30:44 +04:00
$( RM) -f $( DESTDIR) $( docdir) /README
$( CAT) $( srcdir) /build/linux/README.linux-binary $( srcdir) /README > $( DESTDIR) $( docdir) /README
2005-03-06 00:02:59 +03:00
install -m 644 $( srcdir) /.bochsrc $( DESTDIR) $( docdir) /bochsrc-sample.txt
2001-05-22 20:12:01 +04:00
2002-12-13 23:37:38 +03:00
2012-08-22 11:16:33 +04:00
# docbook section: the -C option can be used here
2002-12-13 23:37:38 +03:00
build_docbook ::
2012-08-22 11:16:33 +04:00
$( MAKE) -C doc/docbook
2002-12-13 23:37:38 +03:00
2002-12-15 00:17:25 +03:00
dl_docbook ::
2012-08-22 11:16:33 +04:00
$( MAKE) -C doc/docbook dl_docs
2002-12-15 00:17:25 +03:00
2002-12-13 23:37:38 +03:00
install_docbook : build_docbook
2012-08-22 11:16:33 +04:00
$( MAKE) -C doc/docbook install
2002-12-13 19:21:04 +03:00
2012-04-11 20:53:02 +04:00
clean_docbook ::
2012-08-22 11:16:33 +04:00
$( MAKE) -C doc/docbook clean
2012-04-11 20:53:02 +04:00
2001-06-04 08:26:56 +04:00
install_man ::
2001-09-14 08:19:08 +04:00
-mkdir -p $( DESTDIR) $( man1dir)
2002-06-29 22:35:32 +04:00
-mkdir -p $( DESTDIR) $( man5dir)
2004-09-04 12:24:40 +04:00
for i in $( MAN_PAGE_1_LIST) ; do cat $( srcdir) /doc/man/$$ i.1 | $( SED) 's/@version@/$(VERSION)/g' | $( GZIP_BIN) -c > $( DESTDIR) $( man1dir) /$$ i.1.gz; chmod 644 $( DESTDIR) $( man1dir) /$$ i.1.gz; done
for i in $( MAN_PAGE_5_LIST) ; do cat $( srcdir) /doc/man/$$ i.5 | $( GZIP_BIN) -c > $( DESTDIR) $( man5dir) /$$ i.5.gz; chmod 644 $( DESTDIR) $( man5dir) /$$ i.5.gz; done
2001-06-04 08:26:56 +04:00
2001-10-03 16:55:00 +04:00
download_dlx : $( DLXLINUX_TAR )
$(DLXLINUX_TAR) :
2001-05-24 09:36:07 +04:00
$( RM) -f $( DLXLINUX_TAR)
$( WGET) $( DLXLINUX_TAR_URL)
2001-10-03 16:55:00 +04:00
test -f $( DLXLINUX_TAR)
2001-12-08 08:35:57 +03:00
unpack_dlx : $( DLXLINUX_TAR )
rm -rf dlxlinux
$( GUNZIP) -c $( DLXLINUX_TAR) | $( TAR) -xvf -
test -d dlxlinux
2002-09-05 01:13:21 +04:00
( cd dlxlinux; $( MV) bochsrc.txt bochsrc.txt.orig; $( SED) -e " s/1\.1\.2/ $( VERSION) /g " -e 's,/usr/local/bochs/latest,$(prefix)/share/bochs,g' < bochsrc.txt.orig > bochsrc.txt; rm -f bochsrc.txt.orig)
2001-12-08 08:35:57 +03:00
install_dlx :
2002-06-25 11:30:44 +04:00
$( RM) -rf $( DESTDIR) $( sharedir) /dlxlinux
cp -r dlxlinux $( DESTDIR) $( sharedir) /dlxlinux
$( CHMOD) 755 $( DESTDIR) $( sharedir) /dlxlinux
2004-09-04 12:24:40 +04:00
$( GZIP_BIN) $( DESTDIR) $( sharedir) /dlxlinux/hd10meg.img
2002-06-25 11:30:44 +04:00
$( CHMOD) 644 $( DESTDIR) $( sharedir) /dlxlinux/*
2004-10-29 21:04:02 +04:00
for i in bochs-dlx; do cp $( srcdir) /build/linux/$$ i $( DESTDIR) $( bindir) /$$ i; $( CHMOD) 755 $( DESTDIR) $( bindir) /$$ i; done
2001-06-06 17:57:24 +04:00
uninstall ::
2002-06-25 11:30:44 +04:00
$( RM) -rf $( DESTDIR) $( sharedir)
$( RM) -rf $( DESTDIR) $( docdir)
2005-03-06 00:02:59 +03:00
$( RM) -rf $( DESTDIR) $( libdir) /bochs
2014-04-14 20:56:21 +04:00
for i in $( INSTALL_LIST_BIN) ; do rm -f $( DESTDIR) $( bindir) /$$ i; done
-for i in $( INSTALL_LIST_BIN_OPTIONAL) ; do rm -f $( DESTDIR) $( bindir) /$$ i; done
2002-06-29 22:35:32 +04:00
for i in $( MAN_PAGE_1_LIST) ; do $( RM) -f $( man1dir) /$$ i.1.gz; done
for i in $( MAN_PAGE_5_LIST) ; do $( RM) -f $( man5dir) /$$ i.5.gz; done
2001-05-22 20:12:01 +04:00
2022-08-22 01:38:49 +03:00
VS2019_WORKSPACE_SRC = build/win32/vs2019-workspace/vs2019
VS2019_WORKSPACE_DST = vs2019
2001-09-24 08:16:53 +04:00
2001-10-05 17:40:34 +04:00
########
# the win32_snap target is used to create a ZIP of bochs sources configured
# for VC++. This ZIP is stuck on the website every once in a while to make
# it easier for VC++ users to compile bochs. First, you should
# run "sh .conf.win32-vcpp" to configure the source code, then do
2022-08-22 01:38:49 +03:00
# "make win32_snap" to copy the workspace files and create the ZIP.
2001-10-05 17:40:34 +04:00
########
2001-09-24 08:16:53 +04:00
win32_snap :
2022-08-22 01:38:49 +03:00
cp -r $( VS2019_WORKSPACE_SRC) $( VS2019_WORKSPACE_DST)
2008-01-20 01:32:28 +03:00
$( MAKE) zip
2001-09-24 08:16:53 +04:00
tar :
2004-09-04 12:24:40 +04:00
NAME = ` pwd| $( SED) 's/.*\///' ` ; ( cd ..; $( RM) -f $$ NAME.zip; tar cf - $$ NAME | $( GZIP_BIN) > $$ NAME.tar.gz) ; ls -l ../$$ NAME.tar.gz
2001-09-24 08:16:53 +04:00
2001-09-24 08:21:29 +04:00
zip :
2013-11-18 20:49:56 +04:00
NAME = ` pwd| $( SED) 's/.*\///' ` ; ( cd ..; $( RM) -f $$ NAME-msvc-src.zip; $( ZIP) $$ NAME-msvc-src.zip -r $$ NAME -x \* .svn\* ) ; ls -l ../$$ NAME-msvc-src.zip
2001-09-24 08:21:29 +04:00
2001-04-10 05:04:59 +04:00
clean :
@RMCOMMAND@ *.o
@RMCOMMAND@ *.a
2017-03-18 12:27:48 +03:00
@RMCOMMAND@ bochs
@RMCOMMAND@ bochs.exe
@RMCOMMAND@ bximage
@RMCOMMAND@ bximage.exe
@RMCOMMAND@ bxhub
@RMCOMMAND@ bxhub.exe
@RMCOMMAND@ niclist
@RMCOMMAND@ niclist.exe
2001-04-10 05:04:59 +04:00
@RMCOMMAND@ bochs.out
2001-06-02 11:37:38 +04:00
@RMCOMMAND@ bochsout.txt
2014-07-26 10:54:34 +04:00
@RMCOMMAND@ *.exp *.lib
2002-10-25 01:07:56 +04:00
@RMCOMMAND@ bochs.def
2002-11-21 20:30:41 +03:00
@RMCOMMAND@ bochs.scpt
@RMCOMMAND@ -rf bochs.app
@RMCOMMAND@ -rf .libs
2002-10-25 01:07:56 +04:00
@RMCOMMAND@ .win32_dll_plugin_target
2001-04-10 05:04:59 +04:00
local-dist-clean : clean
@RMCOMMAND@ config.h config.status config.log config.cache
2003-10-31 23:50:04 +03:00
@RMCOMMAND@ .dummy ` find . -name '*.dsp' -o -name '*.dsw' -o -name '*.opt' -o -name '.DS_Store' `
2012-05-28 00:11:37 +04:00
@RMCOMMAND@ bxversion.h bxversion.rc build/linux/bochs-dlx _rpm_top *.rpm
2003-09-12 00:44:35 +04:00
@RMCOMMAND@ build/win32/nsis/Makefile build/win32/nsis/bochs.nsi
2003-10-31 23:50:04 +03:00
@RMCOMMAND@ build/macosx/Info.plist build/macosx/script_compiled.rsrc
2002-10-25 01:07:56 +04:00
@RMCOMMAND@ libtool
@RMCOMMAND@ ltdlconf.h
2001-04-10 05:04:59 +04:00
2012-08-09 22:26:14 +04:00
clean_pcidev ::
cd host/linux/pcidev @COMMAND_SEPARATOR@
$( MAKE) clean
@CD_UP_THREE@
all-clean : clean @CLEAN_DOCBOOK_VAR @ @CLEAN_PCIDEV_VAR @
2008-06-01 20:48:13 +04:00
cd iodev @COMMAND_SEPARATOR@
$( MAKE) clean
@CD_UP_ONE@
2012-09-11 00:49:29 +04:00
cd iodev/display @COMMAND_SEPARATOR@
$( MAKE) clean
@CD_UP_TWO@
2012-08-05 22:13:38 +04:00
cd iodev/hdimage @COMMAND_SEPARATOR@
$( MAKE) clean
@CD_UP_TWO@
2012-01-14 16:36:32 +04:00
cd iodev/usb @COMMAND_SEPARATOR@
$( MAKE) clean
@CD_UP_TWO@
2012-01-14 21:03:00 +04:00
cd iodev/network @COMMAND_SEPARATOR@
$( MAKE) clean
@CD_UP_TWO@
2012-01-15 11:52:04 +04:00
cd iodev/sound @COMMAND_SEPARATOR@
$( MAKE) clean
@CD_UP_TWO@
2008-06-01 20:48:13 +04:00
cd bx_debug @COMMAND_SEPARATOR@
$( MAKE) clean
@CD_UP_ONE@
cd cpu @COMMAND_SEPARATOR@
$( MAKE) clean
@CD_UP_ONE@
2014-07-25 12:35:06 +04:00
cd cpu/avx @COMMAND_SEPARATOR@
$( MAKE) clean
@CD_UP_TWO@
2011-08-18 23:27:45 +04:00
cd cpu/cpudb @COMMAND_SEPARATOR@
$( MAKE) clean
@CD_UP_TWO@
2012-09-13 01:08:40 +04:00
cd cpu/fpu @COMMAND_SEPARATOR@
$( MAKE) clean
@CD_UP_TWO@
2008-06-01 20:48:13 +04:00
cd memory @COMMAND_SEPARATOR@
$( MAKE) clean
@CD_UP_ONE@
cd gui @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@
2001-04-10 05:04:59 +04:00
dist-clean : local -dist -clean
2008-06-01 20:48:13 +04:00
cd iodev @COMMAND_SEPARATOR@
$( MAKE) dist-clean
@CD_UP_ONE@
2012-09-11 00:49:29 +04:00
cd iodev/display @COMMAND_SEPARATOR@
$( MAKE) dist-clean
@CD_UP_TWO@
2012-08-05 22:13:38 +04:00
cd iodev/hdimage @COMMAND_SEPARATOR@
$( MAKE) dist-clean
@CD_UP_TWO@
2012-05-28 00:11:37 +04:00
cd iodev/usb @COMMAND_SEPARATOR@
$( MAKE) dist-clean
@CD_UP_TWO@
cd iodev/network @COMMAND_SEPARATOR@
$( MAKE) dist-clean
@CD_UP_TWO@
cd iodev/sound @COMMAND_SEPARATOR@
$( MAKE) dist-clean
@CD_UP_TWO@
2008-06-01 20:48:13 +04:00
cd bx_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@
2014-07-25 12:35:06 +04:00
cd cpu/avx @COMMAND_SEPARATOR@
$( MAKE) dist-clean
@CD_UP_TWO@
2011-08-19 10:31:51 +04:00
cd cpu/cpudb @COMMAND_SEPARATOR@
$( MAKE) dist-clean
@CD_UP_TWO@
2012-09-13 01:08:40 +04:00
cd cpu/fpu @COMMAND_SEPARATOR@
$( MAKE) dist-clean
@CD_UP_TWO@
2008-06-01 20:48:13 +04:00
cd memory @COMMAND_SEPARATOR@
$( MAKE) dist-clean
@CD_UP_ONE@
cd gui @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@
2002-12-13 20:12:46 +03:00
cd doc/docbook @COMMAND_SEPARATOR@
2002-12-13 20:13:20 +03:00
$( MAKE) dist-clean
2002-12-13 20:12:46 +03:00
@CD_UP_TWO@
2004-01-15 05:08:37 +03:00
cd host/linux/pcidev @COMMAND_SEPARATOR@
$( MAKE) dist-clean
@CD_UP_THREE@
2001-04-10 05:04:59 +04:00
@RMCOMMAND@ Makefile
2001-09-27 06:00:37 +04:00
###########################################
# Build app on MacOS X
###########################################
2002-11-22 06:36:08 +03:00
MACOSX_STUFF = build/macosx
MACOSX_STUFF_SRCDIR = $( srcdir) /$( MACOSX_STUFF)
2001-09-27 06:00:37 +04:00
APP = bochs.app
2002-11-01 20:53:52 +03:00
APP_PLATFORM = MacOS
2002-11-21 20:26:48 +03:00
SCRIPT_EXEC = bochs.scpt
SCRIPT_DATA = $( MACOSX_STUFF_SRCDIR) /script.data
SCRIPT_R = $( MACOSX_STUFF_SRCDIR) /script.r
SCRIPT_APPLESCRIPT = $( MACOSX_STUFF_SRCDIR) /bochs.applescript
SCRIPT_COMPILED_RSRC = $( MACOSX_STUFF) /script_compiled.rsrc
2001-09-27 06:00:37 +04:00
REZ = /Developer/Tools/Rez
2002-11-22 09:33:46 +03:00
CPMAC = /Developer/Tools/CpMac
2001-09-27 06:00:37 +04:00
RINCLUDES = /System/Library/Frameworks/Carbon.framework/Libraries/RIncludes
REZ_ARGS = -append -i $RINCLUDES -d SystemSevenOrLater = 1 -useDF
2002-11-01 20:53:52 +03:00
STANDALONE_LIBDIR = ` pwd ` /$( APP) /Contents/$( APP_PLATFORM) /lib
2002-10-21 15:38:38 +04:00
OSACOMPILE = /usr/bin/osacompile
2011-01-16 22:29:11 +03:00
SETFILE = /Developer/Tools/SetFile
2001-09-27 06:00:37 +04:00
2002-11-21 20:26:48 +03:00
# On a MacOS X machine, you run rez, osacompile, and setfile to
# produce the script executable, which has both a data fork and a
# resource fork. Ideally, we would just recompile the whole
# executable at build time, but unfortunately this cannot be done on
# the SF compile farm through an ssh connection because osacompile
# needs to be run locally for some reason. Solution: If the script
2008-02-06 01:57:43 +03:00
# sources are changed, rebuild the executable on a MacOSX machine,
2011-11-07 23:20:11 +04:00
# split it into its data and resource forks and check them into SVN
2008-02-06 01:57:43 +03:00
# as separate files. Then at release time, all that's left to do is
2002-11-21 20:26:48 +03:00
# put the data and resource forks back together to make a working script.
# (This can be done through ssh.)
#
# Sources:
# 1. script.r: resources for the script
# 2. script.data: binary data for the script
# 3. bochs.applescript: the source of the script
2008-02-06 01:57:43 +03:00
#
2002-11-21 20:26:48 +03:00
# NOTE: All of this will fail if you aren't building on an HFS+
# filesystem! On the SF compile farm building in your user directory
# will fail, while doing the build in /tmp will work ok.
# check if this filesystem supports resource forks at all
test_hfsplus :
$( RM) -rf test_hfsplus
echo data > test_hfsplus
# if you get "Not a directory", then this filesystem doesn't support resources
echo resource > test_hfsplus/rsrc
# test succeeded
$( RM) -rf test_hfsplus
# Step 1 (must be done locally on MacOSX, only when sources change)
# Compile and pull out just the resource fork. The resource fork is
2011-11-07 23:20:11 +04:00
# checked into SVN as script_compiled.rsrc. Note that we don't need
2002-11-21 20:26:48 +03:00
# to check in the data fork of tmpscript because it is identical to the
# script.data input file.
$(SCRIPT_COMPILED_RSRC) : $( SCRIPT_R ) $( SCRIPT_APPLESCRIPT )
2008-02-06 01:57:43 +03:00
$( RM) -f tmpscript
2002-11-21 20:26:48 +03:00
$( CP) -f $( SCRIPT_DATA) tmpscript
$( REZ) -append $( SCRIPT_R) -o tmpscript
$( OSACOMPILE) -o tmpscript $( SCRIPT_APPLESCRIPT)
2002-11-22 06:30:18 +03:00
$( CP) tmpscript/rsrc $( SCRIPT_COMPILED_RSRC)
2002-11-21 20:26:48 +03:00
$( RM) -f tmpscript
# Step 2 (can be done locally or remotely on MacOSX)
# Combine the data fork and resource fork, and set attributes.
$(SCRIPT_EXEC) : $( SCRIPT_DATA ) $( SCRIPT_COMPILED_RSRC )
rm -f $( SCRIPT_EXEC)
$( CP) $( SCRIPT_DATA) $( SCRIPT_EXEC)
2002-11-21 20:52:59 +03:00
if test ! -f $( SCRIPT_COMPILED_RSRC) ; then $( CP) $( srcdir) /$( SCRIPT_COMPILED_RSRC) $( SCRIPT_COMPILED_RSRC) ; fi
2002-11-21 20:26:48 +03:00
$( CP) $( SCRIPT_COMPILED_RSRC) $( SCRIPT_EXEC) /rsrc
$( SETFILE) -t "APPL" -c "aplt" $( SCRIPT_EXEC)
$(APP)/.build : bochs test_hfsplus $( SCRIPT_EXEC )
2001-09-27 06:00:37 +04:00
rm -f $( APP) /.build
$( MKDIR) -p $( APP)
$( MKDIR) -p $( APP) /Contents
$( CP) -f $( MACOSX_STUFF) /Info.plist $( APP) /Contents
2002-09-23 07:58:25 +04:00
$( CP) -f $( MACOSX_STUFF_SRCDIR) /pbdevelopment.plist $( APP) /Contents
2001-09-27 06:00:37 +04:00
echo -n "APPL????" > $( APP) /Contents/PkgInfo
2002-11-01 20:53:52 +03:00
$( MKDIR) -p $( APP) /Contents/$( APP_PLATFORM)
$( CP) bochs $( APP) /Contents/$( APP_PLATFORM)
2001-09-27 06:00:37 +04:00
$( MKDIR) -p $( APP) /Contents/Resources
2002-09-23 07:58:25 +04:00
$( REZ) $( REZ_ARGS) $( MACOSX_STUFF_SRCDIR) /bochs.r -o $( APP) /Contents/Resources/bochs.rsrc
$( CP) -f $( MACOSX_STUFF_SRCDIR) /bochs-icn.icns $( APP) /Contents/Resources
2002-11-21 20:26:48 +03:00
ls -ld $( APP) $( SCRIPT_EXEC) $( SCRIPT_EXEC) /rsrc
2001-09-27 06:00:37 +04:00
touch $( APP) /.build
2001-10-07 04:33:21 +04:00
2002-11-01 20:53:52 +03:00
$(APP)/.build_plugins : $( APP ) /.build bochs_plugins
rm -f $( APP) /.build_plugins
$( MKDIR) -p $( STANDALONE_LIBDIR) ;
list = ` cd gui && echo *.la` ; for i in $$ list; do $( LIBTOOL) cp gui/$$ i $( STANDALONE_LIBDIR) ; done ;
list = ` cd iodev && echo *.la` ; for i in $$ list; do $( LIBTOOL) cp iodev/$$ i $( STANDALONE_LIBDIR) ; done ;
$( LIBTOOL) --finish $( STANDALONE_LIBDIR) ;
touch $( APP) /.build_plugins
2006-11-05 13:41:56 +03:00
install_macosx : all download_dlx install_man @INSTALL_DOCBOOK_VAR @
2009-04-03 19:22:41 +04:00
-mkdir -p $( DESTDIR) $( sharedir)
2006-11-05 13:41:56 +03:00
for i in $( INSTALL_LIST_MACOSX) ; do if test -e $$ i; then $( CPMAC) -r $$ i $( DESTDIR) $( sharedir) ; else $( CPMAC) -r $( srcdir) /$$ i $( DESTDIR) $( sharedir) ; fi ; done
$( CPMAC) $( srcdir) /.bochsrc $( DESTDIR) $( sharedir) /bochsrc-sample.txt
-mkdir $( DESTDIR) $( sharedir) /keymaps
$( CPMAC) $( srcdir) /gui/keymaps/*.map $( DESTDIR) $( sharedir) /keymaps
cat $( DLXLINUX_TAR) | ( cd $( DESTDIR) $( sharedir) && tar xzvf -)
dlxrc = $( DESTDIR) $( sharedir) /dlxlinux/bochsrc.txt; mv " $$ dlxrc " " $$ dlxrc.orig " && sed < " $$ dlxrc.orig " 's/\/usr\/local\/bochs\/latest/../' > " $$ dlxrc " && rm -f " $$ dlxrc.orig "
mv $( srcdir) /README $( srcdir) /README.orig
cat $( srcdir) /build/macosx/README.macosx-binary $( srcdir) /README.orig > $( DESTDIR) $( sharedir) /README
rm -f $( DESTDIR) $( sharedir) /README.orig
$( CPMAC) $( SCRIPT_EXEC) $( DESTDIR) $( sharedir) /dlxlinux
# for i in $(TEXT_FILE_LIST); do mv $(srcdir)/$$i $(DESTDIR)$(sharedir)/$$i.txt; done
2002-11-22 09:33:46 +03:00
2002-12-21 17:31:30 +03:00
###########################################
2001-10-07 04:33:21 +04:00
# dependencies generated by
2002-09-17 00:23:38 +04:00
# gcc -MM -I. -Iinstrument/stubs *.cc | sed -e 's/\.cc/.@CPP_SUFFIX@/g' -e 's,cpu/,cpu/,g'
2001-10-07 04:33:21 +04:00
###########################################
2021-01-02 16:43:10 +03:00
bxdisasm.o : bxdisasm .@CPP_SUFFIX @ config .h cpu /decoder /instr .h
2021-02-17 19:53:40 +03:00
bxthread.o : bxthread .@CPP_SUFFIX @ bochs .h config .h osdep .h gui /paramtree .h logio .h \
2021-07-25 21:10:39 +03:00
instrument/stubs/instrument.h misc/bswap.h bxthread.h
2021-02-17 19:53:40 +03:00
config.o : config .@CPP_SUFFIX @ bochs .h config .h osdep .h gui /paramtree .h logio .h \
cpudb.h instrument/stubs/instrument.h misc/bswap.h bxversion.h \
iodev/iodev.h bochs.h plugin.h extplugin.h param_names.h pc_system.h \
bx_debug/debug.h config.h osdep.h memory/memory-bochs.h \
gui/siminterface.h gui/paramtree.h gui/gui.h iodev/hdimage/hdimage.h \
iodev/network/netmod.h iodev/sound/soundmod.h iodev/usb/usb_common.h \
param_names.h
2006-03-07 01:32:03 +03:00
crc.o : crc .@CPP_SUFFIX @ config .h
2021-02-17 19:53:40 +03:00
gdbstub.o : gdbstub .@CPP_SUFFIX @ bochs .h config .h osdep .h gui /paramtree .h logio .h \
2021-07-25 21:10:39 +03:00
instrument/stubs/instrument.h misc/bswap.h param_names.h \
2021-02-17 19:53:40 +03:00
cpu/cpu.h bx_debug/debug.h config.h osdep.h cpu/decoder/decoder.h \
cpu/i387.h cpu/fpu/softfloat.h cpu/fpu/tag_w.h cpu/fpu/status_w.h \
cpu/fpu/control_w.h cpu/crregs.h cpu/descriptor.h cpu/decoder/instr.h \
cpu/lazy_flags.h cpu/tlb.h cpu/icache.h cpu/apic.h cpu/xmm.h cpu/vmx.h \
cpu/cpuid.h cpu/stack.h cpu/access.h
logio.o : logio .@CPP_SUFFIX @ bochs .h config .h osdep .h gui /paramtree .h logio .h \
2021-07-25 21:10:39 +03:00
instrument/stubs/instrument.h misc/bswap.h gui/siminterface.h \
2021-02-17 19:53:40 +03:00
gui/paramtree.h pc_system.h bxthread.h cpu/cpu.h bx_debug/debug.h \
config.h osdep.h cpu/decoder/decoder.h cpu/i387.h cpu/fpu/softfloat.h \
2016-08-12 20:06:14 +03:00
cpu/fpu/tag_w.h cpu/fpu/status_w.h cpu/fpu/control_w.h cpu/crregs.h \
2017-10-20 00:27:25 +03:00
cpu/descriptor.h cpu/decoder/instr.h cpu/lazy_flags.h cpu/tlb.h \
2021-02-17 19:53:40 +03:00
cpu/icache.h cpu/apic.h cpu/xmm.h cpu/vmx.h cpu/cpuid.h cpu/access.h
2021-07-25 21:10:39 +03:00
main.o : main .@CPP_SUFFIX @ bochs .h config .h osdep .h gui /paramtree .h logio .h \
2021-02-17 19:53:40 +03:00
instrument/stubs/instrument.h misc/bswap.h bxversion.h param_names.h \
2021-03-18 22:50:12 +03:00
config.h cpu/cpu.h bx_debug/debug.h osdep.h \
2016-08-12 20:06:14 +03:00
cpu/decoder/decoder.h cpu/i387.h cpu/fpu/softfloat.h cpu/fpu/tag_w.h \
cpu/fpu/status_w.h cpu/fpu/control_w.h cpu/crregs.h cpu/descriptor.h \
2017-10-20 00:27:25 +03:00
cpu/decoder/instr.h cpu/lazy_flags.h cpu/tlb.h cpu/icache.h cpu/apic.h \
2021-02-17 19:53:40 +03:00
cpu/xmm.h cpu/vmx.h cpu/cpuid.h cpu/access.h iodev/iodev.h bochs.h \
plugin.h extplugin.h param_names.h pc_system.h memory/memory-bochs.h \
gui/siminterface.h gui/paramtree.h gui/gui.h iodev/hdimage/hdimage.h \
iodev/network/netmod.h iodev/sound/soundmod.h iodev/usb/usb_common.h
osdep.o : osdep .@CPP_SUFFIX @ bochs .h config .h osdep .h gui /paramtree .h logio .h \
2021-07-25 21:10:39 +03:00
instrument/stubs/instrument.h misc/bswap.h bxthread.h
2021-02-17 19:53:40 +03:00
pc_system.o : pc_system .@CPP_SUFFIX @ bochs .h config .h osdep .h gui /paramtree .h \
2021-07-25 21:10:39 +03:00
logio.h instrument/stubs/instrument.h misc/bswap.h cpu/cpu.h \
2021-02-17 19:53:40 +03:00
bx_debug/debug.h config.h osdep.h cpu/decoder/decoder.h cpu/i387.h \
2012-09-13 01:08:40 +04:00
cpu/fpu/softfloat.h cpu/fpu/tag_w.h cpu/fpu/status_w.h \
2016-08-12 20:06:14 +03:00
cpu/fpu/control_w.h cpu/crregs.h cpu/descriptor.h cpu/decoder/instr.h \
2017-10-20 00:27:25 +03:00
cpu/lazy_flags.h cpu/tlb.h cpu/icache.h cpu/apic.h cpu/xmm.h cpu/vmx.h \
2020-06-07 20:28:54 +03:00
cpu/cpuid.h cpu/access.h iodev/iodev.h bochs.h plugin.h extplugin.h \
2021-02-17 19:53:40 +03:00
param_names.h pc_system.h memory/memory-bochs.h gui/siminterface.h \
gui/paramtree.h gui/gui.h
plugin.o : plugin .@CPP_SUFFIX @ bochs .h config .h osdep .h gui /paramtree .h logio .h \
2021-07-25 21:10:39 +03:00
instrument/stubs/instrument.h misc/bswap.h iodev/iodev.h bochs.h \
2021-02-17 19:53:40 +03:00
plugin.h extplugin.h param_names.h pc_system.h bx_debug/debug.h config.h \
osdep.h memory/memory-bochs.h gui/siminterface.h gui/paramtree.h \
gui/gui.h plugin.h