2014-04-06 11:22:16 +04:00
|
|
|
# Copyright (C) 2012-2014 The Bochs Project
|
2012-01-14 16:36:32 +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
|
|
|
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
|
|
|
|
# Makefile for the iodev/usb component of bochs
|
|
|
|
|
|
|
|
|
|
|
|
@SUFFIX_LINE@
|
|
|
|
|
|
|
|
prefix = @prefix@
|
|
|
|
exec_prefix = @exec_prefix@
|
|
|
|
srcdir = @srcdir@
|
|
|
|
VPATH = @srcdir@
|
|
|
|
bindir = @bindir@
|
|
|
|
libdir = @libdir@
|
|
|
|
datarootdir = @datarootdir@
|
|
|
|
mandir = @mandir@
|
|
|
|
man1dir = $(mandir)/man1
|
|
|
|
man5dir = $(mandir)/man5
|
|
|
|
docdir = $(datarootdir)/doc/bochs
|
|
|
|
sharedir = $(datarootdir)/bochs
|
|
|
|
top_builddir = ..
|
|
|
|
top_srcdir = @top_srcdir@
|
|
|
|
|
2012-07-14 11:01:43 +04:00
|
|
|
SHELL = @SHELL@
|
2012-01-14 16:36:32 +04:00
|
|
|
|
|
|
|
@SET_MAKE@
|
|
|
|
|
|
|
|
CXX = @CXX@
|
|
|
|
CXXFLAGS = $(BX_INCDIRS) @CXXFLAGS@ @GUI_CXXFLAGS@
|
|
|
|
|
|
|
|
LDFLAGS = @LDFLAGS@
|
|
|
|
LIBS = @LIBS@
|
|
|
|
RANLIB = @RANLIB@
|
|
|
|
PLUGIN_PATH=@libdir@
|
|
|
|
top_builddir = ../..
|
|
|
|
LIBTOOL=@LIBTOOL@
|
Next step for plugin support with MSVC nmake: device plugins that need special
rules can be built now (keyboard, pit, gameport, serial, vga, svga_cirrus,
hdimage, netmod, soundmod, usb_common). The generated DLLs are usable with the
BOCHS.EXE built with the IDE, but the nmake won't work at all yet.
2014-04-21 22:43:22 +04:00
|
|
|
WIN32_DLL_IMPORT_LIBRARY=../../@WIN32_DLL_IMPORT_LIB@
|
2012-01-14 16:36:32 +04:00
|
|
|
|
|
|
|
USBDEV_OBJS = @USBDEV_OBJS@
|
|
|
|
SCSI_OBJS = @SCSI_OBJS@
|
|
|
|
|
2012-03-13 01:10:44 +04:00
|
|
|
BX_INCDIRS = -I.. -I../.. -I$(srcdir)/.. -I$(srcdir)/../.. -I../../@INSTRUMENT_DIR@ -I$(srcdir)/../../@INSTRUMENT_DIR@
|
2012-01-14 16:36:32 +04:00
|
|
|
LOCAL_CXXFLAGS = $(MCH_CFLAGS)
|
|
|
|
|
|
|
|
OBJS_THAT_CAN_BE_PLUGINS = \
|
2012-01-14 21:03:00 +04:00
|
|
|
@USBHC_OBJS@ \
|
2012-01-14 16:36:32 +04:00
|
|
|
@USBCORE_OBJ@
|
|
|
|
|
|
|
|
OBJS_THAT_SUPPORT_OTHER_PLUGINS = \
|
|
|
|
$(USBDEV_OBJS) \
|
|
|
|
$(SCSI_OBJS)
|
|
|
|
|
2012-01-14 21:03:00 +04:00
|
|
|
NONPLUGIN_OBJS = @IODEV_EXT_NON_PLUGIN_OBJS@
|
|
|
|
PLUGIN_OBJS = @IODEV_EXT_PLUGIN_OBJS@
|
2012-01-14 16:36:32 +04:00
|
|
|
|
|
|
|
all: libusb.a
|
|
|
|
|
2014-04-06 11:22:16 +04:00
|
|
|
plugins: @PLUGIN_TARGET_2@
|
|
|
|
|
|
|
|
plugins_gcc: $(PLUGIN_OBJS:@PLUGIN_LIBNAME_TRANSFORMATION@)
|
|
|
|
|
2014-04-27 11:46:33 +04:00
|
|
|
plugins_msvc: bx_usb_common.dll bx_usb_uhci.dll bx_usb_ohci.dll bx_usb_xhci.dll
|
2012-01-14 16:36:32 +04:00
|
|
|
|
|
|
|
libusb.a: $(NONPLUGIN_OBJS)
|
|
|
|
@RMCOMMAND@ libusb.a
|
|
|
|
@MAKELIB@ $(NONPLUGIN_OBJS)
|
2014-01-04 01:58:04 +04:00
|
|
|
$(RANLIB) libusb.a
|
2012-01-14 16:36:32 +04:00
|
|
|
|
|
|
|
# standard compile rule for C++ files
|
|
|
|
.@CPP_SUFFIX@.o:
|
|
|
|
$(CXX) @DASH@c $(CXXFLAGS) $(LOCAL_CXXFLAGS) @CXXFP@$< @OFP@$@
|
|
|
|
|
|
|
|
##### building plugins with libtool
|
|
|
|
%.lo: %.@CPP_SUFFIX@
|
2012-07-14 11:01:43 +04:00
|
|
|
$(LIBTOOL) --mode=compile --tag CXX $(CXX) -c $(CXXFLAGS) $(LOCAL_CXXFLAGS) $< -o $@
|
2012-01-14 16:36:32 +04:00
|
|
|
|
|
|
|
libbx_%.la: %.lo
|
2012-07-14 11:01:43 +04:00
|
|
|
$(LIBTOOL) --mode=link --tag CXX $(CXX) -module $< -o $@ -rpath $(PLUGIN_PATH)
|
2012-01-14 16:36:32 +04:00
|
|
|
|
|
|
|
# special link rules for plugins that require more than one object file
|
|
|
|
libbx_usb_common.la: usb_common.lo $(USBDEV_OBJS:.o=.lo) scsi_device.lo
|
2012-07-14 11:01:43 +04:00
|
|
|
$(LIBTOOL) --mode=link --tag CXX $(CXX) -module usb_common.lo $(USBDEV_OBJS:.o=.lo) scsi_device.lo -o libbx_usb_common.la -rpath $(PLUGIN_PATH)
|
2012-01-14 16:36:32 +04:00
|
|
|
|
2014-04-25 20:07:26 +04:00
|
|
|
#### building DLLs for win32 (Cygwin and MinGW/MSYS)
|
2012-01-14 16:36:32 +04:00
|
|
|
bx_%.dll: %.o
|
|
|
|
$(CXX) $(CXXFLAGS) -shared -o $@ $< $(WIN32_DLL_IMPORT_LIBRARY)
|
|
|
|
|
2014-04-25 20:07:26 +04:00
|
|
|
# special link rules for plugins with Cygwin, MinGW/MSYS and MSVC nmake
|
2012-01-14 16:36:32 +04:00
|
|
|
bx_usb_common.dll: usb_common.o $(USBDEV_OBJS) scsi_device.o
|
Next step for plugin support with MSVC nmake: device plugins that need special
rules can be built now (keyboard, pit, gameport, serial, vga, svga_cirrus,
hdimage, netmod, soundmod, usb_common). The generated DLLs are usable with the
BOCHS.EXE built with the IDE, but the nmake won't work at all yet.
2014-04-21 22:43:22 +04:00
|
|
|
@LINK_DLL@ usb_common.o $(USBDEV_OBJS) scsi_device.o $(WIN32_DLL_IMPORT_LIBRARY)
|
2012-01-14 16:36:32 +04:00
|
|
|
|
2014-04-27 11:46:33 +04:00
|
|
|
bx_usb_uhci.dll: usb_uhci.o
|
|
|
|
@LINK_DLL@ usb_uhci.o $(WIN32_DLL_IMPORT_LIBRARY)
|
|
|
|
|
|
|
|
bx_usb_ohci.dll: usb_ohci.o
|
|
|
|
@LINK_DLL@ usb_ohci.o $(WIN32_DLL_IMPORT_LIBRARY)
|
|
|
|
|
|
|
|
bx_usb_xhci.dll: usb_xhci.o
|
|
|
|
@LINK_DLL@ usb_xhci.o $(WIN32_DLL_IMPORT_LIBRARY)
|
|
|
|
|
2012-01-14 16:36:32 +04:00
|
|
|
##### end DLL section
|
|
|
|
|
|
|
|
clean:
|
2014-04-22 20:50:11 +04:00
|
|
|
@RMCOMMAND@ -rf .libs *.lo *.o *.la *.a *.dll *.exp *.lib
|
2012-01-14 16:36:32 +04:00
|
|
|
|
|
|
|
dist-clean: clean
|
|
|
|
@RMCOMMAND@ Makefile
|
|
|
|
|
|
|
|
###########################################
|
|
|
|
# dependencies generated by
|
|
|
|
# gcc -MM -I.. -I../.. -I../../instrument/stubs *.cc | sed -e 's/\.cc/.@CPP_SUFFIX@/g'
|
|
|
|
# gcc -MM -I.. -I../.. -I../../instrument/stubs *.cc | \
|
|
|
|
# sed -e 's/\.cc/.@CPP_SUFFIX@/g' -e 's/\.o:/.lo:/g'
|
|
|
|
#
|
|
|
|
# This means that every source file is listed twice, once with a .o rule
|
|
|
|
# and then again with an identical .lo rule. The .lo rules are used when
|
|
|
|
# building plugins.
|
|
|
|
###########################################
|
|
|
|
scsi_device.o: scsi_device.@CPP_SUFFIX@ ../iodev.h ../../bochs.h ../../config.h \
|
|
|
|
../../osdep.h ../../bx_debug/debug.h ../../config.h ../../osdep.h \
|
|
|
|
../../gui/siminterface.h ../../cpudb.h ../../gui/paramtree.h \
|
|
|
|
../../memory/memory.h ../../pc_system.h ../../gui/gui.h \
|
|
|
|
../../instrument/stubs/instrument.h ../../plugin.h ../../extplugin.h \
|
2013-12-17 23:57:40 +04:00
|
|
|
../../param_names.h ../hdimage/hdimage.h ../hdimage/cdrom.h \
|
2012-08-05 22:13:38 +04:00
|
|
|
scsi_device.h
|
2012-01-14 16:36:32 +04:00
|
|
|
usb_common.o: usb_common.@CPP_SUFFIX@ ../iodev.h ../../bochs.h ../../config.h \
|
|
|
|
../../osdep.h ../../bx_debug/debug.h ../../config.h ../../osdep.h \
|
|
|
|
../../gui/siminterface.h ../../cpudb.h ../../gui/paramtree.h \
|
|
|
|
../../memory/memory.h ../../pc_system.h ../../gui/gui.h \
|
|
|
|
../../instrument/stubs/instrument.h ../../plugin.h ../../extplugin.h \
|
2013-12-17 23:57:40 +04:00
|
|
|
../../param_names.h usb_common.h usb_hid.h usb_hub.h usb_msd.h \
|
|
|
|
usb_printer.h
|
2012-01-14 16:36:32 +04:00
|
|
|
usb_hid.o: usb_hid.@CPP_SUFFIX@ ../iodev.h ../../bochs.h ../../config.h \
|
|
|
|
../../osdep.h ../../bx_debug/debug.h ../../config.h ../../osdep.h \
|
|
|
|
../../gui/siminterface.h ../../cpudb.h ../../gui/paramtree.h \
|
|
|
|
../../memory/memory.h ../../pc_system.h ../../gui/gui.h \
|
|
|
|
../../instrument/stubs/instrument.h ../../plugin.h ../../extplugin.h \
|
2013-12-17 23:57:40 +04:00
|
|
|
../../param_names.h usb_common.h usb_hid.h
|
2012-01-14 16:36:32 +04:00
|
|
|
usb_hub.o: usb_hub.@CPP_SUFFIX@ ../iodev.h ../../bochs.h ../../config.h \
|
|
|
|
../../osdep.h ../../bx_debug/debug.h ../../config.h ../../osdep.h \
|
|
|
|
../../gui/siminterface.h ../../cpudb.h ../../gui/paramtree.h \
|
|
|
|
../../memory/memory.h ../../pc_system.h ../../gui/gui.h \
|
|
|
|
../../instrument/stubs/instrument.h ../../plugin.h ../../extplugin.h \
|
2013-12-17 23:57:40 +04:00
|
|
|
../../param_names.h usb_common.h usb_hub.h
|
2012-01-14 16:36:32 +04:00
|
|
|
usb_msd.o: usb_msd.@CPP_SUFFIX@ ../iodev.h ../../bochs.h ../../config.h \
|
|
|
|
../../osdep.h ../../bx_debug/debug.h ../../config.h ../../osdep.h \
|
|
|
|
../../gui/siminterface.h ../../cpudb.h ../../gui/paramtree.h \
|
|
|
|
../../memory/memory.h ../../pc_system.h ../../gui/gui.h \
|
|
|
|
../../instrument/stubs/instrument.h ../../plugin.h ../../extplugin.h \
|
2013-12-17 23:57:40 +04:00
|
|
|
../../param_names.h usb_common.h ../hdimage/cdrom.h ../hdimage/hdimage.h \
|
|
|
|
scsi_device.h usb_msd.h
|
2012-01-14 16:36:32 +04:00
|
|
|
usb_ohci.o: usb_ohci.@CPP_SUFFIX@ ../iodev.h ../../bochs.h ../../config.h \
|
|
|
|
../../osdep.h ../../bx_debug/debug.h ../../config.h ../../osdep.h \
|
|
|
|
../../gui/siminterface.h ../../cpudb.h ../../gui/paramtree.h \
|
|
|
|
../../memory/memory.h ../../pc_system.h ../../gui/gui.h \
|
|
|
|
../../instrument/stubs/instrument.h ../../plugin.h ../../extplugin.h \
|
2013-12-17 23:57:40 +04:00
|
|
|
../../param_names.h ../pci.h usb_common.h usb_ohci.h
|
2012-01-14 16:36:32 +04:00
|
|
|
usb_printer.o: usb_printer.@CPP_SUFFIX@ ../iodev.h ../../bochs.h ../../config.h \
|
|
|
|
../../osdep.h ../../bx_debug/debug.h ../../config.h ../../osdep.h \
|
|
|
|
../../gui/siminterface.h ../../cpudb.h ../../gui/paramtree.h \
|
|
|
|
../../memory/memory.h ../../pc_system.h ../../gui/gui.h \
|
|
|
|
../../instrument/stubs/instrument.h ../../plugin.h ../../extplugin.h \
|
2013-12-17 23:57:40 +04:00
|
|
|
../../param_names.h usb_common.h usb_printer.h
|
2012-01-14 16:36:32 +04:00
|
|
|
usb_uhci.o: usb_uhci.@CPP_SUFFIX@ ../iodev.h ../../bochs.h ../../config.h \
|
|
|
|
../../osdep.h ../../bx_debug/debug.h ../../config.h ../../osdep.h \
|
|
|
|
../../gui/siminterface.h ../../cpudb.h ../../gui/paramtree.h \
|
|
|
|
../../memory/memory.h ../../pc_system.h ../../gui/gui.h \
|
|
|
|
../../instrument/stubs/instrument.h ../../plugin.h ../../extplugin.h \
|
2013-12-17 23:57:40 +04:00
|
|
|
../../param_names.h ../pci.h usb_common.h usb_uhci.h
|
2012-01-14 16:36:32 +04:00
|
|
|
usb_xhci.o: usb_xhci.@CPP_SUFFIX@ ../iodev.h ../../bochs.h ../../config.h \
|
|
|
|
../../osdep.h ../../bx_debug/debug.h ../../config.h ../../osdep.h \
|
|
|
|
../../gui/siminterface.h ../../cpudb.h ../../gui/paramtree.h \
|
|
|
|
../../memory/memory.h ../../pc_system.h ../../gui/gui.h \
|
|
|
|
../../instrument/stubs/instrument.h ../../plugin.h ../../extplugin.h \
|
2013-12-17 23:57:40 +04:00
|
|
|
../../param_names.h ../pci.h usb_common.h usb_xhci.h
|
2012-01-14 16:36:32 +04:00
|
|
|
scsi_device.lo: scsi_device.@CPP_SUFFIX@ ../iodev.h ../../bochs.h ../../config.h \
|
|
|
|
../../osdep.h ../../bx_debug/debug.h ../../config.h ../../osdep.h \
|
|
|
|
../../gui/siminterface.h ../../cpudb.h ../../gui/paramtree.h \
|
|
|
|
../../memory/memory.h ../../pc_system.h ../../gui/gui.h \
|
|
|
|
../../instrument/stubs/instrument.h ../../plugin.h ../../extplugin.h \
|
2013-12-17 23:57:40 +04:00
|
|
|
../../param_names.h ../hdimage/hdimage.h ../hdimage/cdrom.h \
|
2012-08-05 22:13:38 +04:00
|
|
|
scsi_device.h
|
2012-01-14 16:36:32 +04:00
|
|
|
usb_common.lo: usb_common.@CPP_SUFFIX@ ../iodev.h ../../bochs.h ../../config.h \
|
|
|
|
../../osdep.h ../../bx_debug/debug.h ../../config.h ../../osdep.h \
|
|
|
|
../../gui/siminterface.h ../../cpudb.h ../../gui/paramtree.h \
|
|
|
|
../../memory/memory.h ../../pc_system.h ../../gui/gui.h \
|
|
|
|
../../instrument/stubs/instrument.h ../../plugin.h ../../extplugin.h \
|
2013-12-17 23:57:40 +04:00
|
|
|
../../param_names.h usb_common.h usb_hid.h usb_hub.h usb_msd.h \
|
|
|
|
usb_printer.h
|
2012-01-14 16:36:32 +04:00
|
|
|
usb_hid.lo: usb_hid.@CPP_SUFFIX@ ../iodev.h ../../bochs.h ../../config.h \
|
|
|
|
../../osdep.h ../../bx_debug/debug.h ../../config.h ../../osdep.h \
|
|
|
|
../../gui/siminterface.h ../../cpudb.h ../../gui/paramtree.h \
|
|
|
|
../../memory/memory.h ../../pc_system.h ../../gui/gui.h \
|
|
|
|
../../instrument/stubs/instrument.h ../../plugin.h ../../extplugin.h \
|
2013-12-17 23:57:40 +04:00
|
|
|
../../param_names.h usb_common.h usb_hid.h
|
2012-01-14 16:36:32 +04:00
|
|
|
usb_hub.lo: usb_hub.@CPP_SUFFIX@ ../iodev.h ../../bochs.h ../../config.h \
|
|
|
|
../../osdep.h ../../bx_debug/debug.h ../../config.h ../../osdep.h \
|
|
|
|
../../gui/siminterface.h ../../cpudb.h ../../gui/paramtree.h \
|
|
|
|
../../memory/memory.h ../../pc_system.h ../../gui/gui.h \
|
|
|
|
../../instrument/stubs/instrument.h ../../plugin.h ../../extplugin.h \
|
2013-12-17 23:57:40 +04:00
|
|
|
../../param_names.h usb_common.h usb_hub.h
|
2012-01-14 16:36:32 +04:00
|
|
|
usb_msd.lo: usb_msd.@CPP_SUFFIX@ ../iodev.h ../../bochs.h ../../config.h \
|
|
|
|
../../osdep.h ../../bx_debug/debug.h ../../config.h ../../osdep.h \
|
|
|
|
../../gui/siminterface.h ../../cpudb.h ../../gui/paramtree.h \
|
|
|
|
../../memory/memory.h ../../pc_system.h ../../gui/gui.h \
|
|
|
|
../../instrument/stubs/instrument.h ../../plugin.h ../../extplugin.h \
|
2013-12-17 23:57:40 +04:00
|
|
|
../../param_names.h usb_common.h ../hdimage/cdrom.h ../hdimage/hdimage.h \
|
|
|
|
scsi_device.h usb_msd.h
|
2012-01-14 16:36:32 +04:00
|
|
|
usb_ohci.lo: usb_ohci.@CPP_SUFFIX@ ../iodev.h ../../bochs.h ../../config.h \
|
|
|
|
../../osdep.h ../../bx_debug/debug.h ../../config.h ../../osdep.h \
|
|
|
|
../../gui/siminterface.h ../../cpudb.h ../../gui/paramtree.h \
|
|
|
|
../../memory/memory.h ../../pc_system.h ../../gui/gui.h \
|
|
|
|
../../instrument/stubs/instrument.h ../../plugin.h ../../extplugin.h \
|
2013-12-17 23:57:40 +04:00
|
|
|
../../param_names.h ../pci.h usb_common.h usb_ohci.h
|
2012-01-14 16:36:32 +04:00
|
|
|
usb_printer.lo: usb_printer.@CPP_SUFFIX@ ../iodev.h ../../bochs.h ../../config.h \
|
|
|
|
../../osdep.h ../../bx_debug/debug.h ../../config.h ../../osdep.h \
|
|
|
|
../../gui/siminterface.h ../../cpudb.h ../../gui/paramtree.h \
|
|
|
|
../../memory/memory.h ../../pc_system.h ../../gui/gui.h \
|
|
|
|
../../instrument/stubs/instrument.h ../../plugin.h ../../extplugin.h \
|
2013-12-17 23:57:40 +04:00
|
|
|
../../param_names.h usb_common.h usb_printer.h
|
2012-01-14 16:36:32 +04:00
|
|
|
usb_uhci.lo: usb_uhci.@CPP_SUFFIX@ ../iodev.h ../../bochs.h ../../config.h \
|
|
|
|
../../osdep.h ../../bx_debug/debug.h ../../config.h ../../osdep.h \
|
|
|
|
../../gui/siminterface.h ../../cpudb.h ../../gui/paramtree.h \
|
|
|
|
../../memory/memory.h ../../pc_system.h ../../gui/gui.h \
|
|
|
|
../../instrument/stubs/instrument.h ../../plugin.h ../../extplugin.h \
|
2013-12-17 23:57:40 +04:00
|
|
|
../../param_names.h ../pci.h usb_common.h usb_uhci.h
|
2012-01-14 16:36:32 +04:00
|
|
|
usb_xhci.lo: usb_xhci.@CPP_SUFFIX@ ../iodev.h ../../bochs.h ../../config.h \
|
|
|
|
../../osdep.h ../../bx_debug/debug.h ../../config.h ../../osdep.h \
|
|
|
|
../../gui/siminterface.h ../../cpudb.h ../../gui/paramtree.h \
|
|
|
|
../../memory/memory.h ../../pc_system.h ../../gui/gui.h \
|
|
|
|
../../instrument/stubs/instrument.h ../../plugin.h ../../extplugin.h \
|
2013-12-17 23:57:40 +04:00
|
|
|
../../param_names.h ../pci.h usb_common.h usb_xhci.h
|