1 # Copyright (C) 2002 MandrakeSoft S.A.
6 # http://www.linux-mandrake.com/
7 # http://www.mandrakesoft.com/
9 # This library is free software; you can redistribute it and/or
10 # modify it under the terms of the GNU Lesser General Public
11 # License as published by the Free Software Foundation; either
12 # version 2 of the License, or (at your option) any later version.
14 # This library is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 # Lesser General Public License for more details.
19 # You should have received a copy of the GNU Lesser General Public
20 # License along with this library; if not, write to the Free Software
21 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 ####################################################
24 # NOTE: To be compatibile with nmake (microsoft vc++) please follow
25 # the following rules:
26 # use $(VAR) not ${VAR}
29 exec_prefix = @
exec_prefix@
34 plugdir
= @
libdir@
/bochs
/plugins
35 datarootdir
= @datarootdir@
37 man1dir = $(mandir)/man1
38 man5dir = $(mandir)/man5
39 docdir
= $(datarootdir
)/doc
/bochs
40 sharedir
= $(datarootdir
)/bochs
42 top_srcdir
= $(srcdir)
47 VER_STRING
=@VER_STRING@
48 REL_STRING
=@REL_STRING@
49 MAN_PAGE_1_LIST
=bochs bximage bxcommit bochs-dlx
50 MAN_PAGE_5_LIST
=bochsrc
51 INSTALL_LIST_SHARE
=bios
/BIOS-bochs-
* bios
/VGABIOS
* @INSTALL_LIST_FOR_PLATFORM@
52 INSTALL_LIST_DOC
=CHANGES COPYING README TODO
53 INSTALL_LIST_BIN
=bochs@EXE@ bximage@EXE@ bxcommit@EXE@
54 INSTALL_LIST_BIN_OPTIONAL
=bochsdbg@EXE@
55 INSTALL_LIST_WIN32
=$(INSTALL_LIST_SHARE
) $(INSTALL_LIST_DOC
) $(INSTALL_LIST_BIN
) $(INSTALL_LIST_BIN_OPTIONAL
) niclist@EXE@
56 INSTALL_LIST_MACOSX
=$(INSTALL_LIST_SHARE
) $(INSTALL_LIST_DOC
) bochs.scpt
57 # for win32 and macosx, these files get renamed to *.txt in install process
58 TEXT_FILE_LIST
=README CHANGES COPYING TODO VGABIOS-elpin-LICENSE VGABIOS-lgpl-README
64 DLXLINUX_TAR
=dlxlinux4.
tar.gz
65 DLXLINUX_TAR_URL
=http
://bochs.sourceforge.net
/guestos
/$(DLXLINUX_TAR
)
66 DLXLINUX_ROMFILE
=BIOS-bochs-latest
74 # the GZIP variable is reserved by gzip program
94 CFLAGS
= @CFLAGS@ @GUI_CFLAGS@
$(MCH_CFLAGS
) $(FLA_FLAGS
) @DEFINE_PLUGIN_PATH@
-DBX_SHARE_PATH
='"$(sharedir)"'
95 CXXFLAGS
= @CXXFLAGS@ @GUI_CXXFLAGS@
$(MCH_CFLAGS
) $(FLA_FLAGS
) @DEFINE_PLUGIN_PATH@
-DBX_SHARE_PATH
='"$(sharedir)"'
99 # To compile with readline:
100 # linux needs just -lreadline
101 # solaris needs -lreadline -lcurses
103 X_PRE_LIBS
= @X_PRE_LIBS@
105 GUI_LINK_OPTS_X
= $(X_LIBS
) $(X_PRE_LIBS
) -lX11
$(XPM_LIB
)
106 GUI_LINK_OPTS_SDL
= `sdl-config --cflags --libs`
107 GUI_LINK_OPTS_SVGA
= -lvga
-lvgagl
108 GUI_LINK_OPTS_BEOS
= -lbe
109 GUI_LINK_OPTS_RFB
= @RFB_LIBS@
110 GUI_LINK_OPTS_AMIGAOS
=
111 GUI_LINK_OPTS_WIN32
= -luser32
-lgdi32
-lcomdlg32
-lcomctl32
-lwsock32
-lshell32
112 GUI_LINK_OPTS_WIN32_VCPP
= user32.lib gdi32.lib winmm.lib \
113 comdlg32.lib comctl32.lib wsock32.lib advapi32.lib shell32.lib
114 GUI_LINK_OPTS_MACOS
=
115 GUI_LINK_OPTS_CARBON
= -framework Carbon
116 GUI_LINK_OPTS_NOGUI
=
117 GUI_LINK_OPTS_TERM
= @GUI_LINK_OPTS_TERM@
118 GUI_LINK_OPTS_WX
= @GUI_LINK_OPTS_WX@
119 GUI_LINK_OPTS
= @GUI_LINK_OPTS@ @DEVICE_LINK_OPTS@
122 CFLAGS_CONSOLE
= @CFLAGS@
$(MCH_CFLAGS
) $(FLA_FLAGS
)
123 CXXFLAGS_CONSOLE
= @CXXFLAGS@
$(MCH_CFLAGS
) $(FLA_FLAGS
)
124 BXIMAGE_LINK_OPTS
= @BXIMAGE_LINK_OPTS@
126 BX_INCDIRS
= -I.
-I
$(srcdir)/.
-I@INSTRUMENT_DIR@
-I
$(srcdir)/@INSTRUMENT_DIR@
128 #SUBDIRS = iodev bx_debug
130 #all install uninstall: config.h#
131 # for subdir in $(SUBDIRS); do #
132 # echo making $@ in $$subdir; #
133 # (cd $$subdir && $(MAKE) $(MDEFINES) $@) || exit 1; #
138 # gnu flags for clean up
139 #CFLAGS = -ansi -O -g -Wunused -Wuninitialized
153 EXTERN_ENVIRONMENT_OBJS
= \
159 DEBUGGER_LIB
= bx_debug
/libdebug.a
160 DISASM_LIB
= disasm
/libdisasm.a
161 INSTRUMENT_LIB
= @INSTRUMENT_DIR@
/libinstrument.a
162 FPU_LIB
= fpu
/libfpu.a
163 READLINE_LIB
= @READLINE_LIB@
164 EXTRA_LINK_OPTS
= @EXTRA_LINK_OPTS@
166 GDBSTUB_OBJS
= gdbstub.o
168 BX_OBJS
= @NONINLINE_VAR@
170 BX_INCLUDES
= bochs.h config.h osdep.h
174 $(CXX
) @DASH@c
$(BX_INCDIRS
) $(CXXFLAGS
) @CXXFP@
$< @OFP@
$@
176 $(CC
) @DASH@c
$(BX_INCDIRS
) $(CFLAGS
) $(FPU_FLAGS
) $< @OFP@
$@
179 all: @PRIMARY_TARGET@ @PLUGIN_TARGET@ bximage@EXE@ bxcommit@EXE@ @BUILD_DOCBOOK_VAR@
181 @EXTERNAL_DEPENDENCY@
183 bochs@EXE@
: @IODEV_LIB_VAR@ @DEBUGGER_VAR@ \
184 cpu
/libcpu.a memory
/libmemory.a gui
/libgui.a \
185 @DISASM_VAR@ @INSTRUMENT_VAR@
$(BX_OBJS
) \
186 $(SIMX86_OBJS
) @FPU_VAR@ @GDBSTUB_VAR@ @PLUGIN_VAR@
187 @LINK@ @EXPORT_DYNAMIC@
$(BX_OBJS
) $(SIMX86_OBJS
) \
188 iodev
/libiodev.a cpu
/libcpu.a memory
/libmemory.a gui
/libgui.a \
189 @DEBUGGER_VAR@ @DISASM_VAR@ @INSTRUMENT_VAR@ @PLUGIN_VAR@ \
190 @GDBSTUB_VAR@ @FPU_VAR@ \
191 @NONPLUGIN_GUI_LINK_OPTS@ \
193 $(SIMX86_LINK_FLAGS
) \
198 # Special make target for cygwin/mingw using dlltool instead of
199 # libtool. This creates a .DEF file, and exports file, an import library,
200 # and then links bochs.exe with the exports file.
201 .win32_dll_plugin_target
: @IODEV_LIB_VAR@ @DEBUGGER_VAR@ \
202 cpu
/libcpu.a memory
/libmemory.a gui
/libgui.a \
203 @DISASM_VAR@ @INSTRUMENT_VAR@
$(BX_OBJS
) \
204 $(SIMX86_OBJS
) @FPU_VAR@ @GDBSTUB_VAR@ @PLUGIN_VAR@
205 $(DLLTOOL
) --export-all-symbols
--output-def bochs.def \
206 $(BX_OBJS
) $(SIMX86_OBJS
) \
207 @IODEV_LIB_VAR@ cpu
/libcpu.a memory
/libmemory.a gui
/libgui.a \
208 @DEBUGGER_VAR@ @DISASM_VAR@ @INSTRUMENT_VAR@ @PLUGIN_VAR@ \
209 @GDBSTUB_VAR@ @FPU_VAR@
210 $(DLLTOOL
) --dllname bochs.exe
--def bochs.def
--output-lib dllexports.a
211 $(DLLTOOL
) --dllname bochs.exe
--output-exp bochs.exp
--def bochs.def
212 $(CXX
) -o bochs.exe
$(CXXFLAGS
) $(LDFLAGS
) -export-dynamic \
213 $(BX_OBJS
) bochs.exp
$(SIMX86_OBJS
) \
214 @IODEV_LIB_VAR@ cpu
/libcpu.a memory
/libmemory.a gui
/libgui.a \
215 @DEBUGGER_VAR@ @DISASM_VAR@ @INSTRUMENT_VAR@ @PLUGIN_VAR@ \
216 @GDBSTUB_VAR@ @FPU_VAR@ \
219 $(SIMX86_LINK_FLAGS
) \
223 touch .win32_dll_plugin_target
226 cd gui
&& $(MAKE
) plugins
227 cd iodev
&& $(MAKE
) plugins
229 bximage@EXE@
: misc
/bximage.o
230 @LINK_CONSOLE@
$(BXIMAGE_LINK_OPTS
) misc
/bximage.o
232 bxcommit@EXE@
: misc
/bxcommit.o
233 @LINK_CONSOLE@ misc
/bxcommit.o
235 niclist@EXE@
: misc
/niclist.o
236 @LINK_CONSOLE@ misc
/niclist.o
238 # compile with console CXXFLAGS, not gui CXXFLAGS
239 misc
/bximage.o
: $(srcdir)/misc
/bximage.c
$(srcdir)/iodev
/hdimage.h
240 $(CC
) @DASH@c
$(BX_INCDIRS
) $(CFLAGS_CONSOLE
) $(srcdir)/misc
/bximage.c @OFP@
$@
242 misc
/bxcommit.o
: $(srcdir)/misc
/bxcommit.c
$(srcdir)/iodev
/hdimage.h
243 $(CC
) @DASH@c
$(BX_INCDIRS
) $(CFLAGS_CONSOLE
) $(srcdir)/misc
/bxcommit.c @OFP@
$@
245 misc
/niclist.o
: $(srcdir)/misc
/niclist.c
246 $(CC
) @DASH@c
$(BX_INCDIRS
) $(CFLAGS_CONSOLE
) $(srcdir)/misc
/niclist.c @OFP@
$@
248 $(BX_OBJS
): $(BX_INCLUDES
)
252 echo
'/////////////////////////////////////////////////////////////////////////' > bxversion.h
253 echo
'// $$Id: Makefile.in,v 1.186 2007/10/21 22:07:20 sshwarts Exp $$' >> bxversion.h
254 echo
'/////////////////////////////////////////////////////////////////////////' >> bxversion.h
255 echo
'// This file is generated by "make bxversion.h"' >> bxversion.h
256 echo
"#define VER_STRING \"$(VER_STRING)\"" >> bxversion.h
257 echo
"#define REL_STRING \"$(REL_STRING)\"" >> bxversion.h
260 cd iodev @COMMAND_SEPARATOR@
261 $(MAKE
) $(MDEFINES
) libiodev.a
264 bx_debug
/libdebug.a
::
265 cd bx_debug @COMMAND_SEPARATOR@
266 $(MAKE
) $(MDEFINES
) libdebug.a
270 cd cpu @COMMAND_SEPARATOR@
271 $(MAKE
) $(MDEFINES
) libcpu.a
275 cd memory @COMMAND_SEPARATOR@
276 $(MAKE
) $(MDEFINES
) libmemory.a
280 cd gui @COMMAND_SEPARATOR@
281 $(MAKE
) $(MDEFINES
) libgui.a
285 cd disasm @COMMAND_SEPARATOR@
286 $(MAKE
) $(MDEFINES
) libdisasm.a
289 @INSTRUMENT_DIR@
/libinstrument.a
::
290 cd @INSTRUMENT_DIR@ @COMMAND_SEPARATOR@
291 $(MAKE
) $(MDEFINES
) libinstrument.a
295 cd fpu @COMMAND_SEPARATOR@
296 $(MAKE
) $(MDEFINES
) libfpu.a
301 ar rv libbochs.a
$(EXTERN_ENVIRONMENT_OBJS
)
304 libbochs_cpu.a
: @DEBUGGER_VAR@
$(BX_OBJS
)
305 -rm -f libbochs_cpu.a
306 ar rv libbochs_cpu.a
$(BX_OBJS
)
307 $(RANLIB
) libbochs_cpu.a
309 # for wxWidgets port, on win32 platform
310 wxbochs_resources.o
: wxbochs.rc
311 windres
$(srcdir)/wxbochs.rc
-o
$@
--include-dir
=`@WX_CONFIG@ --prefix`/include
314 win32res.o
: win32res.rc
315 $(RC_CMD
)$@
$(srcdir)/win32res.rc
317 #####################################################################
318 # Install target for all platforms.
319 #####################################################################
321 install: all @INSTALL_TARGET@
323 #####################################################################
324 # Install target for win32
326 # This is intended to be run in cygwin, since it has better scripting
328 #####################################################################
330 install_win32
: download_dlx @INSTALL_DOCBOOK_VAR@
332 cp obj-release
/*.exe .
333 for i in
$(INSTALL_LIST_WIN32
); do if
test -f
$$i; then cp
$$i $(prefix); else cp
$(srcdir)/$$i $(prefix); fi
; done
334 cp
$(srcdir)/misc
/sb16
/sb16ctrl.example
$(prefix)/sb16ctrl.txt
335 cp
$(srcdir)/misc
/sb16
/sb16ctrl.exe
$(prefix)
336 #cat $(srcdir)/build/win32/DOC-win32.htm | $(SED) -e 's/@VERSION@/$(VERSION)/g' > $(prefix)/DOC-win32.htm
337 cp
$(srcdir)/.bochsrc
$(prefix)/bochsrc-sample.txt
338 -mkdir
$(prefix)/keymaps
339 cp
$(srcdir)/gui
/keymaps
/*.map
$(prefix)/keymaps
340 cat
$(DLXLINUX_TAR
) |
(cd
$(prefix) && tar xzvf
-)
341 echo
'..\bochs' > $(prefix)/dlxlinux
/start.bat
342 dlxrc
=$(prefix)/dlxlinux
/bochsrc.txt
; mv
$$dlxrc $$dlxrc.orig
&& sed
< $$dlxrc.orig
's/\/usr\/local\/bochs\/latest/../' > $$dlxrc && rm -f
$$dlxrc.orig
343 mv
$(prefix)/README
$(prefix)/README.orig
344 cat
$(srcdir)/build
/win32
/README.win32-binary
$(prefix)/README.orig
> $(prefix)/README
345 rm -f
$(prefix)/README.orig
346 for i in
$(TEXT_FILE_LIST
); do mv
$(prefix)/$$i $(prefix)/$$i.txt
; done
347 cd
$(prefix); $(UNIX2DOS
) *.txt
*/*.txt
348 cd
$(prefix); NAME
=`pwd|$(SED) 's/.*\///'`; (cd ..
; $(ZIP
) $$NAME.zip
-r
$$NAME); ls
-l ..
/$$NAME.zip
350 #####################################################################
351 # install target for unix
352 #####################################################################
354 install_unix
: install_bin @INSTALL_PLUGINS_VAR@ install_man install_share install_doc @INSTALL_DOCBOOK_VAR@
357 for i in
$(DESTDIR
)$(bindir); do mkdir
-p
$$i && test -d
$$i && test -w
$$i; done
358 for i in
$(INSTALL_LIST_BIN
); do if
test -f
$$i; then
install $$i $(DESTDIR
)$(bindir); else install $(srcdir)/$$i $(DESTDIR
)$(bindir); fi
; done
359 -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
361 install_libtool_plugins
::
362 for i in
$(DESTDIR
)$(plugdir
); do mkdir
-p
$$i && test -d
$$i && test -w
$$i; done
363 list
=`cd gui && echo *.la`; for i in
$$list; do
$(LIBTOOL
) --mode
=install install gui
/$$i $(DESTDIR
)$(plugdir
); done
364 list
=`cd iodev && echo *.la`; for i in
$$list; do
$(LIBTOOL
) --mode
=install install iodev
/$$i $(DESTDIR
)$(plugdir
); done
365 $(LIBTOOL
) --finish
$(DESTDIR
)$(plugdir
)
367 install_dll_plugins
::
368 for i in
$(DESTDIR
)$(plugdir
); do mkdir
-p
$$i && test -d
$$i && test -w
$$i; done
369 list
=`cd gui && echo *.dll`; for i in
$$list; do cp gui
/$$i $(DESTDIR
)$(plugdir
); done
370 list
=`cd iodev && echo *.dll`; for i in
$$list; do cp iodev
/$$i $(DESTDIR
)$(plugdir
); done
373 for i in
$(DESTDIR
)$(sharedir
); do mkdir
-p
$$i && test -d
$$i && test -w
$$i; done
374 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
375 -mkdir
$(DESTDIR
)$(sharedir
)/keymaps
376 for i in
$(srcdir)/gui
/keymaps
/*.map
; do
install -m
644 $$i $(DESTDIR
)$(sharedir
)/keymaps
/; done
379 for i in
$(DESTDIR
)$(docdir
); do mkdir
-p
$$i && test -d
$$i && test -w
$$i; done
380 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
381 $(RM
) -f
$(DESTDIR
)$(docdir
)/README
382 $(CAT
) $(srcdir)/build
/linux
/README.linux-binary
$(srcdir)/README
> $(DESTDIR
)$(docdir
)/README
383 install -m
644 $(srcdir)/.bochsrc
$(DESTDIR
)$(docdir
)/bochsrc-sample.txt
390 cd doc
/docbook
; make dl_docs
392 install_docbook
: build_docbook
393 cd doc
/docbook
; make
install
396 -mkdir
-p
$(DESTDIR
)$(man1dir)
397 -mkdir
-p
$(DESTDIR
)$(man5dir)
398 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
399 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
401 download_dlx
: $(DLXLINUX_TAR
)
404 $(RM
) -f
$(DLXLINUX_TAR
)
405 $(WGET
) $(DLXLINUX_TAR_URL
)
406 test -f
$(DLXLINUX_TAR
)
408 unpack_dlx
: $(DLXLINUX_TAR
)
410 $(GUNZIP
) -c
$(DLXLINUX_TAR
) |
$(TAR
) -xvf
-
412 (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
)
415 $(RM
) -rf
$(DESTDIR
)$(sharedir
)/dlxlinux
416 cp
-r dlxlinux
$(DESTDIR
)$(sharedir
)/dlxlinux
417 $(CHMOD
) 755 $(DESTDIR
)$(sharedir
)/dlxlinux
418 $(GZIP_BIN
) $(DESTDIR
)$(sharedir
)/dlxlinux
/hd10meg.img
419 $(CHMOD
) 644 $(DESTDIR
)$(sharedir
)/dlxlinux
/*
420 for i in bochs-dlx
; do cp
$(srcdir)/build
/linux
/$$i $(DESTDIR
)$(bindir)/$$i; $(CHMOD
) 755 $(DESTDIR
)$(bindir)/$$i; done
423 $(RM
) -rf
$(DESTDIR
)$(sharedir
)
424 $(RM
) -rf
$(DESTDIR
)$(docdir
)
425 $(RM
) -rf
$(DESTDIR
)$(libdir)/bochs
426 for i in bochs bximage bxcommit bochs-dlx
; do
rm -f
$(DESTDIR
)$(bindir)/$$i; done
427 for i in
$(MAN_PAGE_1_LIST
); do
$(RM
) -f
$(man1dir)/$$i.1.gz
; done
428 for i in
$(MAN_PAGE_5_LIST
); do
$(RM
) -f
$(man5dir)/$$i.5.gz
; done
430 V6WORKSPACE_ZIP
=build
/win32
/workspace.zip
431 V6WORKSPACE_FILES
=bochs.dsw bochs.dsp bochs.opt cpu
/cpu.dsp \
432 memory
/memory.dsp iodev
/iodev.dsp instrument
/stubs
/stubs.dsp \
433 gui
/gui.dsp fpu
/fpu.dsp disasm
/disasm.dsp bx_debug
/bx_debug.dsp \
434 misc
/niclist.dsp bximage.dsp bxcommit.dsp
437 zip
$(V6WORKSPACE_ZIP
) $(V6WORKSPACE_FILES
)
440 # the win32_snap target is used to create a ZIP of bochs sources configured
441 # for VC++. This ZIP is stuck on the website every once in a while to make
442 # it easier for VC++ users to compile bochs. First, you should
443 # run "sh .conf.win32-vcpp" to configure the source code, then do
444 # "make win32_snap" to unzip the workspace files and create the ZIP.
447 unzip
$(V6WORKSPACE_ZIP
)
448 $(SHELL
) .
/build
/win32
/cc2cpp
450 $(SHELL
) .
/build
/win32
/cpp2cc
453 NAME
=`pwd|$(SED) 's/.*\///'`; (cd ..
; $(RM
) -f
$$NAME.zip
; tar cf
- $$NAME |
$(GZIP_BIN
) > $$NAME.
tar.gz
); ls
-l ..
/$$NAME.
tar.gz
456 NAME
=`pwd|$(SED) 's/.*\///'`; (cd ..
; $(RM
) -f
$$NAME.zip
; $(ZIP
) $$NAME.zip
-r
$$NAME -x \
*CVS\
* -x \
*.cvsignore
); ls
-l ..
/$$NAME.zip
462 @RMCOMMAND@ bochs.exe
464 @RMCOMMAND@ bximage.exe
466 @RMCOMMAND@ bxcommit.exe
468 @RMCOMMAND@ niclist.exe
469 @RMCOMMAND@ bochs.out
470 @RMCOMMAND@ bochsout.txt
471 @RMCOMMAND@ bochs.exp
472 @RMCOMMAND@ bochs.def
473 @RMCOMMAND@ bochs.scpt
474 @RMCOMMAND@
-rf bochs.app
475 @RMCOMMAND@
-rf .libs
476 @RMCOMMAND@ .win32_dll_plugin_target
478 local-dist-clean
: clean
479 @RMCOMMAND@ config.h config.status config.log config.cache
480 @RMCOMMAND@ .dummy
`find . -name '*.dsp' -o -name '*.dsw' -o -name '*.opt' -o -name '.DS_Store'`
481 @RMCOMMAND@ bxversion.h build
/linux
/bochs-dlx _rpm_top
*.rpm
482 @RMCOMMAND@ build
/win32
/nsis
/Makefile build
/win32
/nsis
/bochs.nsi
483 @RMCOMMAND@ build
/macosx
/Info.plist build
/macosx
/script_compiled.rsrc
485 @RMCOMMAND@ ltdlconf.h
488 cd iodev @COMMAND_SEPARATOR@
491 cd bx_debug @COMMAND_SEPARATOR@
494 cd cpu @COMMAND_SEPARATOR@
497 cd memory @COMMAND_SEPARATOR@
500 cd gui @COMMAND_SEPARATOR@
503 cd disasm @COMMAND_SEPARATOR@
506 cd @INSTRUMENT_DIR@ @COMMAND_SEPARATOR@
509 cd misc @COMMAND_SEPARATOR@
512 cd fpu @COMMAND_SEPARATOR@
515 cd doc
/docbook @COMMAND_SEPARATOR@
518 cd host
/linux
/pcidev @COMMAND_SEPARATOR@
522 dist-clean
: local-dist-clean
523 cd iodev @COMMAND_SEPARATOR@
526 cd bx_debug @COMMAND_SEPARATOR@
529 cd bios @COMMAND_SEPARATOR@
532 cd cpu @COMMAND_SEPARATOR@
535 cd memory @COMMAND_SEPARATOR@
538 cd gui @COMMAND_SEPARATOR@
541 cd disasm @COMMAND_SEPARATOR@
544 cd @INSTRUMENT_DIR@ @COMMAND_SEPARATOR@
547 cd misc @COMMAND_SEPARATOR@
550 cd fpu @COMMAND_SEPARATOR@
553 cd doc
/docbook @COMMAND_SEPARATOR@
556 cd host
/linux
/pcidev @COMMAND_SEPARATOR@
561 ###########################################
562 # Build app on MacOS X
563 ###########################################
564 MACOSX_STUFF
=build
/macosx
565 MACOSX_STUFF_SRCDIR
=$(srcdir)/$(MACOSX_STUFF
)
568 SCRIPT_EXEC
=bochs.scpt
569 SCRIPT_DATA
=$(MACOSX_STUFF_SRCDIR
)/script.data
570 SCRIPT_R
=$(MACOSX_STUFF_SRCDIR
)/script.r
571 SCRIPT_APPLESCRIPT
=$(MACOSX_STUFF_SRCDIR
)/bochs.applescript
572 SCRIPT_COMPILED_RSRC
=$(MACOSX_STUFF
)/script_compiled.rsrc
573 REZ
=/Developer
/Tools
/Rez
574 CPMAC
=/Developer
/Tools
/CpMac
575 RINCLUDES
=/System
/Library
/Frameworks
/Carbon.framework
/Libraries
/RIncludes
576 REZ_ARGS
=-append
-i
$RINCLUDES -d SystemSevenOrLater
=1 -useDF
577 STANDALONE_LIBDIR
=`pwd`/$(APP
)/Contents
/$(APP_PLATFORM
)/lib
578 OSACOMPILE
=/usr
/bin
/osacompile
579 SETFILE
=/Developer
/Tools
/Setfile
581 # On a MacOS X machine, you run rez, osacompile, and setfile to
582 # produce the script executable, which has both a data fork and a
583 # resource fork. Ideally, we would just recompile the whole
584 # executable at build time, but unfortunately this cannot be done on
585 # the SF compile farm through an ssh connection because osacompile
586 # needs to be run locally for some reason. Solution: If the script
587 # sources are changed, rebuild the executable on a MacOSX machine,
588 # split it into its data and resource forks and check them into CVS
589 # as separate files. Then at release time, all that's left to do is
590 # put the data and resource forks back together to make a working script.
591 # (This can be done through ssh.)
594 # 1. script.r: resources for the script
595 # 2. script.data: binary data for the script
596 # 3. bochs.applescript: the source of the script
598 # NOTE: All of this will fail if you aren't building on an HFS+
599 # filesystem! On the SF compile farm building in your user directory
600 # will fail, while doing the build in /tmp will work ok.
602 # check if this filesystem supports resource forks at all
604 $(RM
) -rf test_hfsplus
605 echo data
> test_hfsplus
606 # if you get "Not a directory", then this filesystem doesn't support resources
607 echo resource
> test_hfsplus
/rsrc
609 $(RM
) -rf test_hfsplus
611 # Step 1 (must be done locally on MacOSX, only when sources change)
612 # Compile and pull out just the resource fork. The resource fork is
613 # checked into CVS as script_compiled.rsrc. Note that we don't need
614 # to check in the data fork of tmpscript because it is identical to the
615 # script.data input file.
616 $(SCRIPT_COMPILED_RSRC
): $(SCRIPT_R
) $(SCRIPT_APPLESCRIPT
)
618 $(CP
) -f
$(SCRIPT_DATA
) tmpscript
619 $(REZ
) -append
$(SCRIPT_R
) -o tmpscript
620 $(OSACOMPILE
) -o tmpscript
$(SCRIPT_APPLESCRIPT
)
621 $(CP
) tmpscript
/rsrc
$(SCRIPT_COMPILED_RSRC
)
624 # Step 2 (can be done locally or remotely on MacOSX)
625 # Combine the data fork and resource fork, and set attributes.
626 $(SCRIPT_EXEC
): $(SCRIPT_DATA
) $(SCRIPT_COMPILED_RSRC
)
628 $(CP
) $(SCRIPT_DATA
) $(SCRIPT_EXEC
)
629 if
test ! -f
$(SCRIPT_COMPILED_RSRC
); then
$(CP
) $(srcdir)/$(SCRIPT_COMPILED_RSRC
) $(SCRIPT_COMPILED_RSRC
); fi
630 $(CP
) $(SCRIPT_COMPILED_RSRC
) $(SCRIPT_EXEC
)/rsrc
631 $(SETFILE
) -t
"APPL" -c
"aplt" $(SCRIPT_EXEC
)
633 $(APP
)/.build
: bochs test_hfsplus
$(SCRIPT_EXEC
)
636 $(MKDIR
) -p
$(APP
)/Contents
637 $(CP
) -f
$(MACOSX_STUFF
)/Info.plist
$(APP
)/Contents
638 $(CP
) -f
$(MACOSX_STUFF_SRCDIR
)/pbdevelopment.plist
$(APP
)/Contents
639 echo
-n
"APPL????" > $(APP
)/Contents
/PkgInfo
640 $(MKDIR
) -p
$(APP
)/Contents
/$(APP_PLATFORM
)
641 $(CP
) bochs
$(APP
)/Contents
/$(APP_PLATFORM
)
642 $(MKDIR
) -p
$(APP
)/Contents
/Resources
643 $(REZ
) $(REZ_ARGS
) $(MACOSX_STUFF_SRCDIR
)/bochs.r
-o
$(APP
)/Contents
/Resources
/bochs.rsrc
644 $(CP
) -f
$(MACOSX_STUFF_SRCDIR
)/bochs-icn.icns
$(APP
)/Contents
/Resources
645 ls
-ld $(APP
) $(SCRIPT_EXEC
) $(SCRIPT_EXEC
)/rsrc
648 $(APP
)/.build_plugins
: $(APP
)/.build bochs_plugins
649 rm -f
$(APP
)/.build_plugins
650 $(MKDIR
) -p
$(STANDALONE_LIBDIR
);
651 list
=`cd gui && echo *.la`; for i in
$$list; do
$(LIBTOOL
) cp gui
/$$i $(STANDALONE_LIBDIR
); done
;
652 list
=`cd iodev && echo *.la`; for i in
$$list; do
$(LIBTOOL
) cp iodev
/$$i $(STANDALONE_LIBDIR
); done
;
653 $(LIBTOOL
) --finish
$(STANDALONE_LIBDIR
);
654 touch
$(APP
)/.build_plugins
656 install_macosx
: all download_dlx install_man @INSTALL_DOCBOOK_VAR@
657 -mkdir
-p
$(DESTDIR
)$(prefix)
658 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
659 $(CPMAC
) $(srcdir)/.bochsrc
$(DESTDIR
)$(sharedir
)/bochsrc-sample.txt
660 -mkdir
$(DESTDIR
)$(sharedir
)/keymaps
661 $(CPMAC
) $(srcdir)/gui
/keymaps
/*.map
$(DESTDIR
)$(sharedir
)/keymaps
662 cat
$(DLXLINUX_TAR
) |
(cd
$(DESTDIR
)$(sharedir
) && tar xzvf
-)
663 dlxrc
=$(DESTDIR
)$(sharedir
)/dlxlinux
/bochsrc.txt
; mv
"$$dlxrc" "$$dlxrc.orig" && sed
< "$$dlxrc.orig" 's/\/usr\/local\/bochs\/latest/../' > "$$dlxrc" && rm -f
"$$dlxrc.orig"
664 mv
$(srcdir)/README
$(srcdir)/README.orig
665 cat
$(srcdir)/build
/macosx
/README.macosx-binary
$(srcdir)/README.orig
> $(DESTDIR
)$(sharedir
)/README
666 rm -f
$(DESTDIR
)$(sharedir
)/README.orig
667 $(CPMAC
) $(SCRIPT_EXEC
) $(DESTDIR
)$(sharedir
)/dlxlinux
668 # for i in $(TEXT_FILE_LIST); do mv $(srcdir)/$$i $(DESTDIR)$(sharedir)/$$i.txt; done
670 ###########################################
672 # Build the binary normally, then copy the resource attributes.
673 ###########################################
674 .bochs_beos_target
: bochs@EXE@
675 unzip
$(srcdir)/build
/beos
/resource.zip
676 copyattr
-t ICON BeBochs.rsrc bochs
677 copyattr
-t MICN BeBochs.rsrc bochs
679 ###########################################
680 # dependencies generated by
681 # gcc -MM -I. -Iinstrument/stubs *.cc | sed -e 's/\.cc/.@CPP_SUFFIX@/g' -e 's,cpu/,cpu/,g'
682 ###########################################
683 config.o
: config.@CPP_SUFFIX@ bochs.h config.h osdep.h bx_debug
/debug.h .
/config.h \
684 .
/osdep.h bxversion.h gui
/siminterface.h memory
/memory.h pc_system.h \
685 plugin.h extplugin.h gui
/gui.h gui
/textconfig.h .
/config.h gui
/keymap.h \
686 instrument
/stubs
/instrument.h iodev
/iodev.h .
/bochs.h .
/iodev
/pci.h \
687 .
/iodev
/pci2isa.h .
/iodev
/pci_ide.h .
/iodev
/pcivga.h .
/iodev
/vga.h \
688 .
/iodev
/svga_cirrus.h .
/iodev
/biosdev.h .
/iodev
/cmos.h .
/iodev
/dma.h \
689 .
/iodev
/floppy.h .
/iodev
/harddrv.h .
/iodev
/keyboard.h \
690 .
/iodev
/parallel.h .
/iodev
/pic.h .
/config.h \
691 .
/iodev
/pit_wrap.h .
/bochs.h .
/iodev
/pit82c54.h .
/iodev
/virt_timer.h \
692 .
/iodev
/serial.h .
/iodev
/unmapped.h .
/iodev
/ne2k.h .
/iodev
/guest2host.h \
693 .
/iodev
/slowdown_timer.h .
/iodev
/extfpuirq.h .
/iodev
/gameport.h
694 crc.o
: crc.@CPP_SUFFIX@ config.h
695 gdbstub.o
: gdbstub.@CPP_SUFFIX@ bochs.h config.h osdep.h bx_debug
/debug.h \
696 .
/config.h .
/osdep.h bxversion.h gui
/siminterface.h memory
/memory.h \
697 pc_system.h plugin.h extplugin.h gui
/gui.h gui
/textconfig.h .
/config.h \
698 gui
/keymap.h instrument
/stubs
/instrument.h iodev
/iodev.h .
/bochs.h \
699 .
/iodev
/pci.h .
/iodev
/pci2isa.h .
/iodev
/pci_ide.h .
/iodev
/pcivga.h \
700 .
/iodev
/vga.h .
/iodev
/svga_cirrus.h .
/iodev
/biosdev.h .
/iodev
/cmos.h \
701 .
/iodev
/dma.h .
/iodev
/floppy.h .
/iodev
/harddrv.h .
/iodev
/keyboard.h \
702 .
/iodev
/parallel.h .
/iodev
/pic.h .
/config.h \
703 .
/iodev
/pit_wrap.h .
/bochs.h .
/iodev
/pit82c54.h .
/iodev
/virt_timer.h \
704 .
/iodev
/serial.h .
/iodev
/unmapped.h .
/iodev
/ne2k.h .
/iodev
/guest2host.h \
705 .
/iodev
/slowdown_timer.h .
/iodev
/extfpuirq.h .
/iodev
/gameport.h
706 load32bitOShack.o
: load32bitOShack.@CPP_SUFFIX@ bochs.h config.h osdep.h \
707 bx_debug
/debug.h .
/config.h .
/osdep.h bxversion.h gui
/siminterface.h \
708 memory
/memory.h pc_system.h plugin.h extplugin.h gui
/gui.h \
709 gui
/textconfig.h .
/config.h gui
/keymap.h instrument
/stubs
/instrument.h \
710 cpu
/cpu.h cpu
/crregs.h .
/cpu
/lazy_flags.h .
/disasm
/disasm.h \
711 .
/config.h cpu
/descriptor.h cpu
/icache.h iodev
/iodev.h .
/bochs.h \
712 .
/iodev
/pci.h .
/iodev
/pci2isa.h .
/iodev
/pci_ide.h .
/iodev
/pcivga.h \
713 .
/iodev
/vga.h .
/iodev
/svga_cirrus.h .
/iodev
/biosdev.h .
/iodev
/cmos.h \
714 .
/iodev
/dma.h .
/iodev
/floppy.h .
/iodev
/harddrv.h .
/iodev
/keyboard.h \
715 .
/iodev
/parallel.h .
/iodev
/pic.h .
/config.h \
716 .
/iodev
/pit_wrap.h .
/bochs.h .
/iodev
/pit82c54.h .
/iodev
/virt_timer.h \
717 .
/iodev
/serial.h .
/iodev
/unmapped.h .
/iodev
/ne2k.h .
/iodev
/guest2host.h \
718 .
/iodev
/slowdown_timer.h .
/iodev
/extfpuirq.h .
/iodev
/gameport.h
719 logio.o
: logio.@CPP_SUFFIX@ bochs.h config.h osdep.h bx_debug
/debug.h .
/config.h \
720 .
/osdep.h bxversion.h gui
/siminterface.h memory
/memory.h pc_system.h \
721 plugin.h extplugin.h gui
/gui.h gui
/textconfig.h .
/config.h gui
/keymap.h \
722 instrument
/stubs
/instrument.h cpu
/cpu.h cpu
/crregs.h .
/cpu
/lazy_flags.h \
723 .
/disasm
/disasm.h .
/config.h cpu
/descriptor.h \
724 cpu
/icache.h iodev
/iodev.h .
/bochs.h .
/iodev
/pci.h .
/iodev
/pci2isa.h \
725 .
/iodev
/pci_ide.h .
/iodev
/pcivga.h .
/iodev
/vga.h .
/iodev
/svga_cirrus.h \
726 .
/iodev
/biosdev.h .
/iodev
/cmos.h .
/iodev
/dma.h .
/iodev
/floppy.h \
727 .
/iodev
/harddrv.h .
/iodev
/keyboard.h .
/iodev
/parallel.h .
/iodev
/pic.h \
728 .
/config.h .
/iodev
/pit_wrap.h .
/bochs.h \
729 .
/iodev
/pit82c54.h .
/iodev
/virt_timer.h .
/iodev
/serial.h \
730 .
/iodev
/unmapped.h .
/iodev
/ne2k.h .
/iodev
/guest2host.h \
731 .
/iodev
/slowdown_timer.h .
/iodev
/extfpuirq.h .
/iodev
/gameport.h
732 main.o
: main.@CPP_SUFFIX@ bochs.h config.h osdep.h bx_debug
/debug.h .
/config.h \
733 .
/osdep.h bxversion.h gui
/siminterface.h memory
/memory.h pc_system.h \
734 plugin.h extplugin.h gui
/gui.h gui
/textconfig.h .
/config.h gui
/keymap.h \
735 instrument
/stubs
/instrument.h cpu
/cpu.h cpu
/crregs.h .
/cpu
/lazy_flags.h \
736 .
/disasm
/disasm.h .
/config.h cpu
/descriptor.h \
737 cpu
/icache.h iodev
/iodev.h .
/bochs.h .
/iodev
/pci.h .
/iodev
/pci2isa.h \
738 .
/iodev
/pci_ide.h .
/iodev
/pcivga.h .
/iodev
/vga.h .
/iodev
/svga_cirrus.h \
739 .
/iodev
/biosdev.h .
/iodev
/cmos.h .
/iodev
/dma.h .
/iodev
/floppy.h \
740 .
/iodev
/harddrv.h .
/iodev
/keyboard.h .
/iodev
/parallel.h .
/iodev
/pic.h \
741 .
/config.h .
/iodev
/pit_wrap.h .
/bochs.h \
742 .
/iodev
/pit82c54.h .
/iodev
/virt_timer.h .
/iodev
/serial.h \
743 .
/iodev
/unmapped.h .
/iodev
/ne2k.h .
/iodev
/guest2host.h \
744 .
/iodev
/slowdown_timer.h .
/iodev
/extfpuirq.h .
/iodev
/gameport.h
745 osdep.o
: osdep.@CPP_SUFFIX@ bochs.h config.h osdep.h bx_debug
/debug.h .
/config.h \
746 .
/osdep.h bxversion.h gui
/siminterface.h memory
/memory.h pc_system.h \
747 plugin.h extplugin.h gui
/gui.h gui
/textconfig.h .
/config.h gui
/keymap.h \
748 instrument
/stubs
/instrument.h
749 pc_system.o
: pc_system.@CPP_SUFFIX@ bochs.h config.h osdep.h bx_debug
/debug.h \
750 .
/config.h .
/osdep.h bxversion.h gui
/siminterface.h memory
/memory.h \
751 pc_system.h plugin.h extplugin.h gui
/gui.h gui
/textconfig.h .
/config.h \
752 gui
/keymap.h instrument
/stubs
/instrument.h cpu
/cpu.h cpu
/crregs.h .
/cpu
/lazy_flags.h \
753 .
/disasm
/disasm.h .
/config.h cpu
/descriptor.h \
754 cpu
/icache.h iodev
/iodev.h .
/bochs.h .
/iodev
/pci.h .
/iodev
/pci2isa.h \
755 .
/iodev
/pci_ide.h .
/iodev
/pcivga.h .
/iodev
/vga.h .
/iodev
/svga_cirrus.h \
756 .
/iodev
/biosdev.h .
/iodev
/cmos.h .
/iodev
/dma.h .
/iodev
/floppy.h \
757 .
/iodev
/harddrv.h .
/iodev
/keyboard.h .
/iodev
/parallel.h .
/iodev
/pic.h \
758 .
/config.h .
/iodev
/pit_wrap.h .
/bochs.h \
759 .
/iodev
/pit82c54.h .
/iodev
/virt_timer.h .
/iodev
/serial.h \
760 .
/iodev
/unmapped.h .
/iodev
/ne2k.h .
/iodev
/guest2host.h \
761 .
/iodev
/slowdown_timer.h .
/iodev
/extfpuirq.h .
/iodev
/gameport.h
762 plex86-interface.o
: plex86-interface.@CPP_SUFFIX@ bochs.h config.h osdep.h \
763 bx_debug
/debug.h .
/config.h .
/osdep.h bxversion.h gui
/siminterface.h \
764 memory
/memory.h pc_system.h plugin.h extplugin.h gui
/gui.h \
765 gui
/textconfig.h .
/config.h gui
/keymap.h instrument
/stubs
/instrument.h \
766 plex86-interface.h plex86
/plex86.h .
/config.h plex86
/descriptor.h
767 plugin.o
: plugin.@CPP_SUFFIX@ bochs.h config.h osdep.h bx_debug
/debug.h .
/config.h \
768 .
/osdep.h bxversion.h gui
/siminterface.h memory
/memory.h pc_system.h \
769 plugin.h extplugin.h gui
/gui.h gui
/textconfig.h .
/config.h gui
/keymap.h \
770 instrument
/stubs
/instrument.h iodev
/iodev.h .
/bochs.h .
/iodev
/pci.h \
771 .
/iodev
/pci2isa.h .
/iodev
/pci_ide.h .
/iodev
/pcivga.h .
/iodev
/vga.h \
772 .
/iodev
/svga_cirrus.h .
/iodev
/biosdev.h .
/iodev
/cmos.h .
/iodev
/dma.h \
773 .
/iodev
/floppy.h .
/iodev
/harddrv.h .
/iodev
/keyboard.h \
774 .
/iodev
/parallel.h .
/iodev
/pic.h .
/config.h \
775 .
/iodev
/pit_wrap.h .
/bochs.h .
/iodev
/pit82c54.h .
/iodev
/virt_timer.h \
776 .
/iodev
/serial.h .
/iodev
/unmapped.h .
/iodev
/ne2k.h .
/iodev
/guest2host.h \
777 .
/iodev
/slowdown_timer.h .
/iodev
/extfpuirq.h .
/iodev
/gameport.h