• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-cqtcocoa誰得pythonphprubygameguibathyscaphec翻訳計画中(planning stage)omegatframeworktwittertestdomvb.netdirectxbtronarduinopreviewerゲームエンジン

Commit MetaInfo

Revisioneb13a2411a6f093212e56113a7de8a5226dd621c (tree)
Time2022-11-12 20:49:04
Authorphabrics <phabrics@phab...>
Commiterphabrics

Log Message

Changes to enable conditional compilation of host modules.

Change Summary

Incremental Difference

--- a/Makefile.am
+++ b/Makefile.am
@@ -11,7 +11,7 @@ endif
1111 tap-windows.h: tap-windows-def.h
1212 cp $< $@
1313
14-if USING_OPENVPN
14+if HAVE_OPENVPN
1515 SUBDIRS = . libopenvpn
1616 else
1717 SUBDIRS =
@@ -31,5 +31,9 @@ dist-hook:
3131 # so that future builds will track all module dependencies.
3232 # If new modules are added, "make modules" must be run to update this list in the source.
3333 modules-local:
34- rm -f ${top_srcdir}/tme/tme-plugins.txt
35- echo -n LDADD = > $(top_srcdir)/tme-preopen.txt
34+ @if test ! -e .modules; then \
35+ rm -f ${top_srcdir}/tme/tme-plugins.txt ${top_srcdir}/tme-hosts.txt ; \
36+ echo -n tme_preopen=> $(top_srcdir)/tme-preopen.txt ; \
37+ chmod +x tme-modules.sh ; \
38+ touch .modules ; \
39+ fi
--- a/bus/Makefile.am
+++ b/bus/Makefile.am
@@ -3,6 +3,5 @@
33
44 AUTOMAKE_OPTIONS = 1.4 gnu
55
6-SUBDIRS = @TME_BUS_SUBDIRS@
7-DIST_SUBDIRS = multibus sbus
6+SUBDIRS = multibus sbus
87
--- a/bus/multibus/Makefile.am
+++ b/bus/multibus/Makefile.am
@@ -9,7 +9,6 @@ pkglib_LTLIBRARIES = tme_bus_multibus.la
99 tme_bus_multibus_la_SOURCES = 3c400.c \
1010 sun-mie.c \
1111 sun-sc.c
12-tme_bus_multibus_la_LDFLAGS = -module -version-info 0:0:0
13-tme_bus_multibus_la_LIBADD = $(top_builddir)/generic/libtme-generic.la
12+tme_bus_multibus_la_LIBADD = $(TME_LIBS)
1413
1514 include $(top_srcdir)/modules
--- a/bus/sbus/Makefile.am
+++ b/bus/sbus/Makefile.am
@@ -8,7 +8,6 @@ AM_CPPFLAGS = -I$(top_srcdir) -I$(srcdir) -I$(top_srcdir)/lib -I. -D_TME_IMPL
88 pkglib_LTLIBRARIES = tme_bus_sbus.la
99 tme_bus_sbus_la_SOURCES = \
1010 sun-fbs4.c
11-tme_bus_sbus_la_LDFLAGS = -module -version-info 0:0:0
12-tme_bus_sbus_la_LIBADD = $(top_builddir)/machine/sun/libtme-machine-sun.la
11+tme_bus_sbus_la_LIBADD = $(top_builddir)/machine/sun/libtme-machine-sun.la $(TME_LIBS)
1312
1413 include $(top_srcdir)/modules
--- a/configure.ac
+++ b/configure.ac
@@ -34,7 +34,7 @@ dnl POSSIBILITY OF SUCH DAMAGE.
3434 dnl Checks that we are given a good source directory.
3535 AC_PREREQ([2.68])
3636 m4_include(version.m4)
37-AC_INIT([tme], [0.12rc7])
37+AC_INIT([tme], [0.12rc8])
3838 AC_CONFIG_SRCDIR([ic/m68k/m68k-impl.h])
3939 AC_CONFIG_MACRO_DIR([m4])
4040 AC_CANONICAL_TARGET
@@ -764,16 +764,7 @@ AC_CHECK_DECLS(
764764 )
765765 CFLAGS="${old_CFLAGS}"
766766
767-dnl Checks for GLIB.
768-AM_PATH_GLIB_2_0([], have_glib=yes, have_glib=no)
769-if test "x$have_glib" = xyes; then
770- AC_DEFINE(HAVE_GLIB, [], [Define if you are compiling with GLIB.])
771-fi
772-
773767 TME_FB_XLAT_DST=
774-dnl Checks for GTK.
775-AM_PATH_GTK_3_0([], have_gtk=yes, have_gtk=no)
776-AM_PATH_SDL2([], have_sdl=yes, have_sdl=no)
777768
778769 # if --with-tme-host-displays is given, characterize those given displays:
779770 AC_ARG_WITH(tme-host-displays,
@@ -782,70 +773,46 @@ AC_ARG_WITH(tme-host-displays,
782773
783774 AC_SUBST(TME_FB_XLAT_DST)
784775
785-tme_host_types="gtk rfb sdl tun bsd openvpn"
786-
787-for tme_host_type in ${tme_host_types}; do
788- eval enable_${tme_host_type}=no
789-done
776+TME_HOST_TYPES="gtk rfb sdl tun bsd openvpn"
777+AC_SUBST(TME_HOST_TYPES)
790778
791779 AC_ARG_ENABLE(hosts,
792-[ --enable-hosts=hosttypes enable hosts (default="${tme_host_types}")],
793- [tme_host_types=${enableval}], [enable_hosts=yes])
780+[ --enable-hosts=hosttypes enable hosts (default="$TME_HOST_TYPES")],
781+ [tme_enable_hosts=${enableval}], [enable_hosts=yes])
794782
795-if test "x${enable_hosts}" = xno; then
796- tme_host_types=
783+if test "x${enable_hosts}" = xyes; then
784+ tme_enable_hosts=$TME_HOST_TYPES
797785 fi
798786
799-for tme_host_type in ${tme_host_types}; do
787+for tme_host_type in ${tme_enable_hosts}; do
800788 eval enable_${tme_host_type}=yes
801789 done
802790
803791 dnl Start the list of display host support.
804-TME_DISPLAY_HOSTS=
805792 TME_FB_XLAT_DST="d32b32s0p32olml_r0xffff0000_g0xff00ff00_b0xff0000ff d24b32s0p32olml_r0xff0000_g0xff00_b0xff"
806793
807-if test "x$have_gtk" = xyes; then
808- if test "x${enable_gtk}" = xyes; then
809- TME_DISPLAY_HOSTS="gtk ${TME_DISPLAY_HOSTS}"
810- fi
811-# TME_FB_XLAT_DST="d32b32s0p32olml_r0xffff0000_g0xff00ff00_b0xff0000ff d24b32s0p32olml_r0xff0000_g0xff00_b0xff d16b16s0p32olml_r0xf800_g0x07e0_b0x001f d8b8s0p32olml_r0xff_g0xff_b0xff d1b1s0p32olml_r0x1_g0x1_b0x1"
812-fi
813-
814-if test "x$have_sdl" = xyes; then
815- if test "x${enable_sdl}" = xyes; then
816- TME_DISPLAY_HOSTS="sdl ${TME_DISPLAY_HOSTS}"
817- fi
818-fi
819-
820-AS_IF([test "x${enable_rfb}" = xyes], [
821- PKG_CHECK_MODULES([RFB], [libvncclient libvncserver], [TME_DISPLAY_HOSTS="rfb ${TME_DISPLAY_HOSTS}"], AC_DEFINE([HAVE_RFB], [0], [No RFB]))
822-])
823-
824-dnl The list of display host support is finished.
825-AC_SUBST(TME_DISPLAY_HOSTS)
794+dnl Checks for GLIB.
795+AM_PATH_GLIB_2_0([], [have_glib=$enable_glib], [])
826796
827-AC_MSG_RESULT($TME_DISPLAY_HOSTS)
797+dnl Checks for display type support
798+AM_PATH_GTK_3_0([], [have_gtk=$enable_gtk], [])
799+AM_PATH_SDL2([], [have_sdl=$enable_sdl], [])
800+PKG_CHECK_MODULES([RFB], [libvncclient libvncserver], [have_rfb=$enable_rfb], [])
828801
829802 dnl Start the list of ethernet host support.
830-TME_ETH_HOSTS=
831-
832803 AM_CONDITIONAL([USE_TAP_WINDOWS], [test "x${enable_openvpn}" = xyes && test "x${have_tap_header}" = x && test "x${WIN32}" != x])
833-AM_CONDITIONAL([USING_OPENVPN], [test "x${enable_openvpn}" = xyes && test "x${have_tap_header}" = xyes || test "x${WIN32}" != x])
804+
834805 if test "x${enable_openvpn}" = xyes && test "x${have_tap_header}" = xyes || test "x${WIN32}" != x; then
835- TME_ETH_HOSTS="openvpn ${TME_ETH_HOSTS}"
806+ have_openvpn=yes
836807 AC_DEFINE([OPENVPN_VERSION_RESOURCE], [PRODUCT_VERSION_RESOURCE], [Version in windows resource format])
837808 fi
809+AM_CONDITIONAL([HAVE_OPENVPN], [test "x${have_openvpn}" = xyes])
838810
839811 AC_CHECK_HEADERS([linux/if_tun.h net/if_tap.h net/tap/if_tap.h net/if_tun.h],
840- [if test "x${enable_tun}" = xyes; then
841- TME_ETH_HOSTS="tun ${TME_ETH_HOSTS}"
842- fi])
812+ [have_tun=$enable_tun])
843813
844814 AC_CHECK_HEADERS([linux/filter.h net/bpf.h])
845815
846-dnl Checks for host support.
847-AC_MSG_CHECKING([for host support types])
848-
849816 AC_EGREP_CPP(found_BPFVERSION,
850817 [
851818 #ifdef HAVE_LINUX_FILTER_H
@@ -857,18 +824,23 @@ AC_EGREP_CPP(found_BPFVERSION,
857824 found_BPFVERSION
858825 #endif
859826 ],
860-[if test "x${enable_bsd}" = xyes; then
861- TME_ETH_HOSTS="bsd ${TME_ETH_HOSTS}"
862- fi])
827+[have_bsd=$enable_bsd])
863828
864-if test "x${TME_ETH_HOSTS}" != x; then
865- TME_ETH_HOSTS="${TME_ETH_HOSTS}"
866-fi
829+for tme_host in $TME_HOST_TYPES; do
830+ if eval test "x\$have_${tme_host}" = xyes; then
831+ TME_HOSTS="-dlopen \$(tme_host_${tme_host})/tme_host_${tme_host}.la ${TME_HOSTS}"
832+ TME_HOSTS_DIRS="\$(tme_host_${tme_host}) ${TME_HOSTS_DIRS}"
833+ fi
834+done
835+
836+dnl Checks for host support.
837+AC_MSG_CHECKING([for host support types])
867838
868839 dnl The list of ethernet host support is finished.
869-AC_SUBST(TME_ETH_HOSTS)
840+AC_SUBST(TME_HOSTS)
841+AC_SUBST(TME_HOSTS_DIRS)
870842
871-AC_MSG_RESULT($TME_ETH_HOSTS)
843+AC_MSG_RESULT($TME_HOSTS)
872844
873845 AC_SYS_POSIX_TERMIOS
874846
@@ -958,111 +930,10 @@ AM_CONDITIONAL([THREADS_SJLJ], [test "x${tme_thread_types}" = xsjlj])
958930 AC_MSG_RESULT($tme_thread_types)
959931
960932 dnl Configures for the system(s) to emulate.
961-systems=all
962-if echo " ${systems} " | grep ' all ' > /dev/null 2>&1; then
963- systems="sun2 sun3 sun4 sunultra1"
964- bus_size_max=64
965- recode_size_guest_max=64
966-fi
967-TME_MACHINE_SUBDIRS=
968-TME_IC_SUBDIRS=ieee754
969-TME_ICS=
970-TME_SERIAL_SUBDIRS=
971-TME_SERIALS=
972-TME_BUS_SUBDIRS=
973-TME_FB_XLAT_SRC=
974-for system in $systems; do
975-
976- # dispatch on the machine type to get more machines, ICs, and
977- # buses to compile:
978- case ${system} in
979-
980- # the sun2:
981- sun2)
982- machines="sun sun2"
983- ics="m68k am9513 mm58167 z8530 i825x6"
984- buses="multibus"
985- fb_xlats="1152x900d1b1s0p32om"
986- ;;
987-
988- # the sun3:
989- sun3)
990- machines="sun sun3"
991- ics="m68k isil7170 z8530 i825x6 ieee754 ncr5380"
992- buses="multibus"
993- fb_xlats="1152x900d1b1s0p32om 1152x900d8b8s0p32ommi8 1152x900d1b1s0p32omccmi8"
994- ;;
995-
996- # the sun4:
997- sun4)
998- machines="sun sun4"
999- ics="sparc isil7170 z8530 am7930 am7990 ieee754 ncr53c9x mk48txx lsi64854 nec765"
1000- buses="sbus"
1001- fb_xlats="1152x900d1b1s0p32om 1152x900d8b8s0p32ommi8 1152x900d1b1s0p32omccmi8"
1002- ;;
1003-
1004- # the sun Ultra-1:
1005- sunultra1)
1006- machines="sun sun4u"
1007- ics="sparc stp22xx z8530 am7990 ieee754 ncr53c9x ncr89c105 mk48txx lsi64854 nec765 stp2024 ad184x"
1008- buses="sbus"
1009- fb_xlats="1152x900d1b1s0p32om 1152x900d8b8s0p32ommi8 1152x900d1b1s0p32omccmi8"
1010- ;;
1011-
1012- *)
1013- AC_MSG_ERROR([don't know how to emulate ${machine}])
1014- ;;
1015- esac
1016-
1017- # add in the new machines, ICs, serials, and buses to compile:
1018- for machine in $machines; do
1019- if echo " ${TME_MACHINE_SUBDIRS} " | grep " ${machine} " > /dev/null 2>&1; then :; else
1020- TME_MACHINE_SUBDIRS="${TME_MACHINE_SUBDIRS} ${machine}"
1021- fi
1022- done
1023- for ic in $ics; do
1024- if test -d $srcdir/ic/$ic; then
1025- if echo " ${TME_IC_SUBDIRS} " | grep " ${ic} " > /dev/null 2>&1; then :; else
1026- TME_IC_SUBDIRS="${TME_IC_SUBDIRS} ${ic}"
1027- fi
1028- else
1029- ic="tme_ic_${ic}.la"
1030- if echo " ${TME_ICS} " | grep " ${ic} " > /dev/null 2>&1; then :; else
1031- TME_ICS="${TME_ICS} ${ic}"
1032- fi
1033- fi
1034- done
1035- for serial in $serials; do
1036- if test -d $srcdir/serial/$serial; then
1037- if echo " ${TME_SERIAL_SUBDIRS} " | grep " ${serial} " > /dev/null 2>&1; then :; else
1038- TME_SERIAL_SUBDIRS="${TME_SERIAL_SUBDIRS} ${serial}"
1039- fi
1040- else
1041- serial="tme_serial_${serial}.la"
1042- if echo " ${TME_SERIALS} " | grep " ${serial} " > /dev/null 2>&1; then :; else
1043- TME_SERIALS="${TME_SERIALS} ${serial}"
1044- fi
1045- fi
1046- done
1047- for bus in $buses; do
1048- if echo " ${TME_BUS_SUBDIRS} " | grep " ${bus} " > /dev/null 2>&1; then :; else
1049- TME_BUS_SUBDIRS="${TME_BUS_SUBDIRS} ${bus}"
1050- fi
1051- done
1052-
1053- # add in the new frame buffer translations to compile:
1054- for fb_xlat in $fb_xlats; do
1055- if echo " ${TME_FB_XLAT_SRC} " | grep " ${fb_xlat} " > /dev/null 2>&1; then :; else
1056- TME_FB_XLAT_SRC="${TME_FB_XLAT_SRC} ${fb_xlat}"
1057- fi
1058- done
1059-done
1060-AC_SUBST(TME_MACHINE_SUBDIRS)
1061-AC_SUBST(TME_IC_SUBDIRS)
1062-AC_SUBST(TME_ICS)
1063-AC_SUBST(TME_SERIAL_SUBDIRS)
1064-AC_SUBST(TME_SERIALS)
1065-AC_SUBST(TME_BUS_SUBDIRS)
933+bus_size_max=64
934+recode_size_guest_max=64
935+
936+TME_FB_XLAT_SRC="1152x900d1b1s0p32om 1152x900d8b8s0p32ommi8 1152x900d1b1s0p32omccmi8"
1066937 AC_SUBST(TME_FB_XLAT_SRC)
1067938
1068939 dnl Checks for X11.
@@ -1572,6 +1443,7 @@ bus_size_max="$bus_size_max"
15721443
15731444 dnl Writes files.
15741445 AC_CONFIG_FILES([Makefile
1446+ tme-modules.sh
15751447 tme/Makefile
15761448 tme/ic/Makefile
15771449 tme/machine/Makefile
@@ -1612,6 +1484,7 @@ AC_CONFIG_FILES([Makefile
16121484 serial/Makefile
16131485 scsi/Makefile
16141486 generic/Makefile
1487+ generic/bus/Makefile
16151488 tmesh/Makefile
16161489 tools/Makefile])
16171490 AC_OUTPUT
--- a/generic/Makefile.am
+++ b/generic/Makefile.am
@@ -53,9 +53,4 @@ fb-xlat-auto.c: %.c: %.sh
5353 $(SHELL) $< src $(TME_FB_XLAT_SRC) dst $(TME_FB_XLAT_DST) > $@
5454 endif
5555
56-pkglib_LTLIBRARIES = tme_generic.la
57-tme_generic_la_SOURCES = bus-el.c
58-tme_generic_la_LDFLAGS = -module -version-info 0:0:0
59-tme_generic_la_LIBADD = libtme-generic.la
60-
61-include $(top_srcdir)/modules
56+SUBDIRS = . bus
--- /dev/null
+++ b/generic/bus/Makefile.am
@@ -0,0 +1,14 @@
1+## Process this file with automake to produce Makefile.in
2+# Makefile.am for The Machine Emulator generic/:
3+
4+AUTOMAKE_OPTIONS = 1.4 gnu
5+
6+AUTOM4TE = $(SHELL) $(top_srcdir)/missing --run autom4te
7+
8+AM_CPPFLAGS = -I$(top_srcdir) -I$(srcdir) -I$(top_srcdir)/lib -I. -D_TME_IMPL -DLIBTME_GENERIC_BUILD
9+
10+pkglib_LTLIBRARIES = tme_generic.la
11+tme_generic_la_SOURCES = bus-el.c
12+tme_generic_la_LIBADD = $(TME_LIBS)
13+
14+include $(top_srcdir)/modules
--- a/host/Makefile.am
+++ b/host/Makefile.am
@@ -11,8 +11,7 @@ tme_host_posix_la_SOURCES = posix-memory.c \
1111 posix-tape.c \
1212 posix-serial.c
1313
14-tme_host_posix_la_LDFLAGS = -module -version-info 0:0:0
15-tme_host_posix_la_LIBADD = $(top_builddir)/generic/libtme-generic.la
14+tme_host_posix_la_LIBADD = $(TME_LIBS)
1615
1716 include $(top_srcdir)/modules
1817
--- a/host/display/Makefile.am
+++ b/host/display/Makefile.am
@@ -7,7 +7,7 @@ AM_CPPFLAGS = -I$(top_srcdir) -I$(srcdir) -I$(top_srcdir)/lib -I. -D_TME_IMPL $(
77 lib_LTLIBRARIES = libtme-display.la
88 libtme_display_la_SOURCES = display-mouse.c display-keyboard.c display.c display.h
99 libtme_display_la_LDFLAGS = -version-info 0:0:0
10-libtme_display_la_LIBADD = $(top_builddir)/generic/libtme-generic.la $(GTK_LIBS)
10+libtme_display_la_LIBADD = $(GTK_LIBS) $(TME_LIBS)
1111
1212 EXTRA_DIST = keymap-make.pl keymap-def.h
1313
@@ -23,5 +23,4 @@ endif
2323
2424 include $(top_srcdir)/modules
2525
26-SUBDIRS = . @TME_DISPLAY_HOSTS@
27-DIST_SUBDIRS = gtk rfb sdl
26+DIST_SUBDIRS=gtk rfb sdl
--- a/host/display/gtk/Makefile.am
+++ b/host/display/gtk/Makefile.am
@@ -7,7 +7,6 @@ AM_CPPFLAGS = -I$(top_srcdir) -I$(srcdir) -I$(top_srcdir)/lib -I$(srcdir)/.. -I.
77
88 pkglib_LTLIBRARIES = tme_host_gtk.la
99 tme_host_gtk_la_SOURCES = gtk-mouse.c gtk-keyboard.c gtk-display.c gtk-display.h
10-tme_host_gtk_la_LDFLAGS = -module -version-info 0:0:0
11-tme_host_gtk_la_LIBADD = ../libtme-display.la $(GTK_LIBS)
10+tme_host_gtk_la_LIBADD = ../libtme-display.la $(GTK_LIBS) $(TME_LIBS)
1211
1312 include $(top_srcdir)/modules
--- a/host/display/rfb/Makefile.am
+++ b/host/display/rfb/Makefile.am
@@ -7,7 +7,6 @@ AM_CPPFLAGS = -I$(top_srcdir) -I$(srcdir) -I$(top_srcdir)/lib -I$(srcdir)/.. -I.
77
88 pkglib_LTLIBRARIES = tme_host_rfb.la
99 tme_host_rfb_la_SOURCES = rfb-display.c
10-tme_host_rfb_la_LDFLAGS = -module -version-info 0:0:0
11-tme_host_rfb_la_LIBADD = ../libtme-display.la $(RFB_LIBS)
10+tme_host_rfb_la_LIBADD = ../libtme-display.la $(RFB_LIBS) $(TME_LIBS)
1211
1312 include $(top_srcdir)/modules
--- a/host/display/sdl/Makefile.am
+++ b/host/display/sdl/Makefile.am
@@ -10,7 +10,6 @@ LDADD = ../libtme-display.la $(RFB_LIBS) $(SDL_LIBS)
1010
1111 pkglib_LTLIBRARIES = tme_host_sdl.la
1212 tme_host_sdl_la_SOURCES = sdl-display.c
13-tme_host_sdl_la_LDFLAGS = -module -version-info 0:0:0
14-tme_host_sdl_la_LIBADD = ../libtme-display.la $(SDL_LIBS)
13+tme_host_sdl_la_LIBADD = ../libtme-display.la $(SDL_LIBS) $(TME_LIBS)
1514
1615 include $(top_srcdir)/modules
--- a/host/eth/Makefile.am
+++ b/host/eth/Makefile.am
@@ -7,9 +7,8 @@ AM_CPPFLAGS = -I$(top_srcdir) -I$(srcdir) -I$(top_srcdir)/lib -I. -D_TME_IMPL
77 lib_LTLIBRARIES = libtme-eth.la
88 libtme_eth_la_SOURCES = eth-impl.c eth-if.h
99 libtme_eth_la_LDFLAGS = -version-info 0:0:0
10-libtme_eth_la_LIBADD = $(top_builddir)/generic/libtme-generic.la
10+libtme_eth_la_LIBADD = $(TME_LIBS)
1111
1212 include $(top_srcdir)/modules
1313
14-SUBDIRS = . @TME_ETH_HOSTS@
15-DIST_SUBDIRS = bsd tun openvpn
14+DIST_SUBDIRS=bsd openvpn tun
--- a/host/eth/bsd/Makefile.am
+++ b/host/eth/bsd/Makefile.am
@@ -7,7 +7,6 @@ AM_CPPFLAGS = -I$(top_srcdir) -I$(srcdir) -I$(top_srcdir)/lib -I$(srcdir)/.. -I.
77
88 pkglib_LTLIBRARIES = tme_host_bsd.la
99 tme_host_bsd_la_SOURCES = bsd-bpf.c
10-tme_host_bsd_la_LDFLAGS = -module -version-info 0:0:0
11-tme_host_bsd_la_LIBADD = ../libtme-eth.la
10+tme_host_bsd_la_LIBADD = ../libtme-eth.la $(TME_LIBS)
1211
1312 include $(top_srcdir)/modules
--- a/host/eth/openvpn/Makefile.am
+++ b/host/eth/openvpn/Makefile.am
@@ -9,7 +9,10 @@ pkglib_LTLIBRARIES = tme_host_openvpn.la
99 tme_host_openvpn_la_SOURCES = \
1010 openvpn-link.c \
1111 openvpn-tap.c
12-tme_host_openvpn_la_LIBADD = ../libtme-eth.la
13-tme_host_openvpn_la_LDFLAGS = -module -version-info 0:0:0
12+tme_host_openvpn_la_LIBADD = ../libtme-eth.la $(TME_LIBS)
13+
14+if WIN32
15+tme_host_openvpn_la_LIBADD += -lgdi32 -lws2_32 -lwininet -lcrypt32 -liphlpapi -lwinmm
16+endif
1417
1518 include $(top_srcdir)/modules
--- a/host/eth/tun/Makefile.am
+++ b/host/eth/tun/Makefile.am
@@ -7,7 +7,6 @@ AM_CPPFLAGS = -I$(top_srcdir) -I$(srcdir) -I$(srcdir)/.. -I$(top_srcdir)/lib -I.
77
88 pkglib_LTLIBRARIES = tme_host_tun.la
99 tme_host_tun_la_SOURCES = tun-tap.c
10-tme_host_tun_la_LDFLAGS = -module -version-info 0:0:0
11-tme_host_tun_la_LIBADD = ../libtme-eth.la $(NATLIBS)
10+tme_host_tun_la_LIBADD = ../libtme-eth.la $(NATLIBS) $(TME_LIBS)
1211
1312 include $(top_srcdir)/modules
--- a/ic/Makefile.am
+++ b/ic/Makefile.am
@@ -5,11 +5,9 @@ AUTOMAKE_OPTIONS = 1.4 gnu
55
66 AM_CPPFLAGS = -I$(top_srcdir) -I$(srcdir) -I$(top_srcdir)/lib -I. -D_TME_IMPL
77
8-SUBDIRS = @TME_IC_SUBDIRS@
9-DIST_SUBDIRS = m68k ieee754 sparc stp22xx
8+SUBDIRS = ieee754 m68k sparc stp22xx
109
11-pkglib_LTLIBRARIES = @TME_ICS@
12-EXTRA_LTLIBRARIES = tme_ic_am9513.la \
10+pkglib_LTLIBRARIES = tme_ic_am9513.la \
1311 tme_ic_z8530.la \
1412 tme_ic_i825x6.la \
1513 tme_ic_isil7170.la \
@@ -26,63 +24,48 @@ EXTRA_LTLIBRARIES = tme_ic_am9513.la \
2624 tme_ic_mm58167.la
2725
2826 tme_ic_am9513_la_SOURCES = am9513.c
29-tme_ic_am9513_la_LDFLAGS = -rpath $(pkglibdir) -module -version-info 0:0:0
30-tme_ic_am9513_la_LIBADD = $(top_builddir)/generic/libtme-generic.la
27+tme_ic_am9513_la_LIBADD = $(TME_LIBS)
3128
3229 tme_ic_z8530_la_SOURCES = z8530.c z8530reg.h
33-tme_ic_z8530_la_LDFLAGS = -rpath $(pkglibdir) -module -version-info 0:0:0
34-tme_ic_z8530_la_LIBADD = $(top_builddir)/generic/libtme-generic.la
30+tme_ic_z8530_la_LIBADD = $(TME_LIBS)
3531
3632 tme_ic_mm58167_la_SOURCES = mm58167.c
37-tme_ic_mm58167_la_LDFLAGS = -rpath $(pkglibdir) -module -version-info 0:0:0
38-tme_ic_mm58167_la_LIBADD = $(top_builddir)/generic/libtme-generic.la
33+tme_ic_mm58167_la_LIBADD = $(TME_LIBS)
3934
4035 tme_ic_i825x6_la_SOURCES = i825x6.c i825x6reg.h
41-tme_ic_i825x6_la_LDFLAGS = -rpath $(pkglibdir) -module -version-info 0:0:0
42-tme_ic_i825x6_la_LIBADD = $(top_builddir)/generic/libtme-generic.la
36+tme_ic_i825x6_la_LIBADD = $(TME_LIBS)
4337
4438 tme_ic_isil7170_la_SOURCES = isil7170.c
45-tme_ic_isil7170_la_LDFLAGS = -rpath $(pkglibdir) -module -version-info 0:0:0
46-tme_ic_isil7170_la_LIBADD = $(top_builddir)/generic/libtme-generic.la
39+tme_ic_isil7170_la_LIBADD = $(TME_LIBS)
4740
4841 tme_ic_ncr5380_la_SOURCES = ncr5380.c
49-tme_ic_ncr5380_la_LDFLAGS = -rpath $(pkglibdir) -module -version-info 0:0:0
50-tme_ic_ncr5380_la_LIBADD = $(top_builddir)/generic/libtme-generic.la
42+tme_ic_ncr5380_la_LIBADD = $(TME_LIBS)
5143
5244 tme_ic_ncr53c9x_la_SOURCES = ncr53c9x.c
53-tme_ic_ncr53c9x_la_LDFLAGS = -rpath $(pkglibdir) -module -version-info 0:0:0
54-tme_ic_ncr53c9x_la_LIBADD = $(top_builddir)/generic/libtme-generic.la
45+tme_ic_ncr53c9x_la_LIBADD = $(TME_LIBS)
5546
5647 tme_ic_ncr89c105_la_SOURCES = ncr89c105.c
57-tme_ic_ncr89c105_la_LDFLAGS = -rpath $(pkglibdir) -module -version-info 0:0:0
58-tme_ic_ncr89c105_la_LIBADD = $(top_builddir)/generic/libtme-generic.la
48+tme_ic_ncr89c105_la_LIBADD = $(TME_LIBS)
5949
6050 tme_ic_stp2024_la_SOURCES = stp2024.c
61-tme_ic_stp2024_la_LDFLAGS = -rpath $(pkglibdir) -module -version-info 0:0:0
62-tme_ic_stp2024_la_LIBADD = $(top_builddir)/generic/libtme-generic.la
51+tme_ic_stp2024_la_LIBADD = $(TME_LIBS)
6352
6453 tme_ic_ad184x_la_SOURCES = ad184x.c
65-tme_ic_ad184x_la_LDFLAGS = -rpath $(pkglibdir) -module -version-info 0:0:0
66-tme_ic_ad184x_la_LIBADD = $(top_builddir)/generic/libtme-generic.la
54+tme_ic_ad184x_la_LIBADD = $(TME_LIBS)
6755
6856 tme_ic_mk48txx_la_SOURCES = mk48txx.c
69-tme_ic_mk48txx_la_LDFLAGS = -rpath $(pkglibdir) -module -version-info 0:0:0
70-tme_ic_mk48txx_la_LIBADD = $(top_builddir)/generic/libtme-generic.la
57+tme_ic_mk48txx_la_LIBADD = $(TME_LIBS)
7158
7259 tme_ic_nec765_la_SOURCES = nec765.c
73-tme_ic_nec765_la_LDFLAGS = -rpath $(pkglibdir) -module -version-info 0:0:0
74-tme_ic_nec765_la_LIBADD = $(top_builddir)/generic/libtme-generic.la
60+tme_ic_nec765_la_LIBADD = $(TME_LIBS)
7561
7662 tme_ic_am7930_la_SOURCES = am7930.c
77-tme_ic_am7930_la_LDFLAGS = -rpath $(pkglibdir) -module -version-info 0:0:0
78-tme_ic_am7930_la_LIBADD = $(top_builddir)/generic/libtme-generic.la
63+tme_ic_am7930_la_LIBADD = $(TME_LIBS)
7964
8065 tme_ic_am7990_la_SOURCES = am7990.c
81-tme_ic_am7990_la_LDFLAGS = -rpath $(pkglibdir) -module -version-info 0:0:0
82-tme_ic_am7990_la_LIBADD = $(top_builddir)/generic/libtme-generic.la
66+tme_ic_am7990_la_LIBADD = $(TME_LIBS)
8367
8468 tme_ic_lsi64854_la_SOURCES = lsi64854.c
85-tme_ic_lsi64854_la_LDFLAGS = -rpath $(pkglibdir) -module -version-info 0:0:0
86-tme_ic_lsi64854_la_LIBADD = $(top_builddir)/generic/libtme-generic.la
69+tme_ic_lsi64854_la_LIBADD = $(TME_LIBS)
8770
8871 include $(top_srcdir)/modules
--- a/ic/ieee754/Makefile.am
+++ b/ic/ieee754/Makefile.am
@@ -13,7 +13,7 @@ tmeicinclude_HEADERS = ieee754-auto.h ieee754-ops-auto.h
1313 lib_LTLIBRARIES = libtme-ieee754.la
1414 libtme_ieee754_la_SOURCES = ieee754-ops-auto.c ieee754-misc.c softfloat-tme.c
1515 libtme_ieee754_la_LDFLAGS = -lm -version-info 0:0:0
16-libtme_ieee754_la_LIBADD = $(top_builddir)/generic/libtme-generic.la
16+libtme_ieee754_la_LIBADD = $(TME_LIBS)
1717
1818 AM_CFLAGS = @CFLAGS_NO_STRICT_ALIASING@
1919
@@ -43,3 +43,4 @@ ieee754-ops-auto.h: ieee754-ops-auto.sh ieee754-precision.sh
4343 ieee754-ops-auto.c: ieee754-ops-auto.sh ieee754-precision.sh
4444 $(SHELL) $< > $@
4545
46+include $(top_srcdir)/modules
--- a/ic/m68k/Makefile.am
+++ b/ic/m68k/Makefile.am
@@ -14,8 +14,7 @@ tme_ic_m68k_la_SOURCES = m68k-opmap.c \
1414 m68010.c \
1515 m68020.c \
1616 m6888x.c
17-tme_ic_m68k_la_LDFLAGS = -module -version-info 0:0:0
18-tme_ic_m68k_la_LIBADD = ../ieee754/libtme-ieee754.la
17+tme_ic_m68k_la_LIBADD = ../ieee754/libtme-ieee754.la $(TME_LIBS)
1918
2019 noinst_SCRIPTS = m68k-misc-auto.sh \
2120 m68k-insns-auto.sh \
--- a/ic/sparc/Makefile.am
+++ b/ic/sparc/Makefile.am
@@ -17,8 +17,7 @@ tme_ic_sparc_la_SOURCES = \
1717 stp103x.c \
1818 cy7c601.c \
1919 mb86900.c
20-tme_ic_sparc_la_LDFLAGS = -module -version-info 0:0:0
21-tme_ic_sparc_la_LIBADD = ../ieee754/libtme-ieee754.la
20+tme_ic_sparc_la_LIBADD = ../ieee754/libtme-ieee754.la $(TME_LIBS)
2221 noinst_SCRIPTS = sparc-misc-auto.sh \
2322 sparc-insns-auto.sh \
2423 sparc-fpu-auto.sh \
--- a/ic/stp22xx/Makefile.am
+++ b/ic/stp22xx/Makefile.am
@@ -16,8 +16,8 @@ tme_ic_stp22xx_la_SOURCES = \
1616 stp222x-iommu.c \
1717 stp222x-stc.c \
1818 stp22xx.c
19-tme_ic_stp22xx_la_LDFLAGS = -rpath $(pkglibdir) -module -version-info 0:0:0
20-tme_ic_stp22xx_la_LIBADD = $(top_builddir)/generic/libtme-generic.la
19+tme_ic_stp22xx_la_LIBADD = $(TME_LIBS)
20+
2121 EXTRA_DIST = stp222x-impl.h \
2222 stp22xx-impl.h
2323
--- a/libtme/Makefile.am
+++ b/libtme/Makefile.am
@@ -38,7 +38,7 @@ libtme_la_SOURCES += threads-sjlj.c
3838 endif
3939 libtme_la_LDFLAGS = -version-info 0:0:0
4040 libtme_la_LIBADD = $(LIBLTDL) $(LTLIBOBJS)
41-if USING_OPENVPN
41+if HAVE_OPENVPN
4242 libtme_la_LIBADD += $(top_builddir)/libopenvpn/libopenvpn.la
4343 endif
4444 if THREADS_GLIB
--- a/machine/Makefile.am
+++ b/machine/Makefile.am
@@ -3,6 +3,5 @@
33
44 AUTOMAKE_OPTIONS = 1.4 gnu
55
6-SUBDIRS = @TME_MACHINE_SUBDIRS@
7-DIST_SUBDIRS = sun sun2 sun3 sun4 sun4u
6+SUBDIRS = sun sun2 sun3 sun4 sun4u
87
--- a/machine/sun/Makefile.am
+++ b/machine/sun/Makefile.am
@@ -14,7 +14,7 @@ libtme_machine_sun_la_SOURCES = sun-mmu.c \
1414 sun-si.c \
1515 sun-obie.c
1616 libtme_machine_sun_la_LDFLAGS = -version-info 0:0:0
17-libtme_machine_sun_la_LIBADD = $(top_builddir)/generic/libtme-generic.la
17+libtme_machine_sun_la_LIBADD = $(TME_LIBS)
1818
1919 bin_SCRIPTS = tme-sun-idprom tme-sun-eeprom
2020
@@ -31,3 +31,4 @@ tme-sun-idprom: tme-sun-idprom.pl
3131 tme-sun-eeprom: tme-sun-eeprom.pl $(top_srcdir)/tools/tme-binary-struct.pl.in
3232 cat $(top_srcdir)/tools/tme-binary-struct.pl.in $(srcdir)/tme-sun-eeprom.pl | \
3333 sed -e s%/usr/pkg/bin/perl%$(PERL)% > $@
34+include $(top_srcdir)/modules
--- a/machine/sun2/Makefile.am
+++ b/machine/sun2/Makefile.am
@@ -11,8 +11,8 @@ tme_machine_sun2_la_SOURCES = \
1111 sun2-mmu.c \
1212 sun2-control.c \
1313 sun2-impl.h
14-tme_machine_sun2_la_LDFLAGS = -module -version-info 0:0:0
15-tme_machine_sun2_la_LIBADD = ../sun/libtme-machine-sun.la
14+
15+tme_machine_sun2_la_LIBADD = ../sun/libtme-machine-sun.la $(TME_LIBS)
1616
1717 examplesdir = $(pkgdatadir)/examples
1818 dist_examples_DATA = SUN2-MULTIBUS
--- a/machine/sun3/Makefile.am
+++ b/machine/sun3/Makefile.am
@@ -11,8 +11,8 @@ tme_machine_sun3_la_SOURCES = \
1111 sun3-mmu.c \
1212 sun3-control.c \
1313 sun3-impl.h
14-tme_machine_sun3_la_LDFLAGS = -module -version-info 0:0:0
15-tme_machine_sun3_la_LIBADD = ../sun/libtme-machine-sun.la
14+
15+tme_machine_sun3_la_LIBADD = ../sun/libtme-machine-sun.la $(TME_LIBS)
1616
1717 examplesdir = $(pkgdatadir)/examples
1818 dist_examples_DATA = SUN3-CARRERA sun3-carrera-eeprom.txt
--- a/machine/sun4/Makefile.am
+++ b/machine/sun4/Makefile.am
@@ -15,8 +15,8 @@ tme_machine_sun4_la_SOURCES = \
1515 sun44c-control.c \
1616 sun44c-memerr.c \
1717 sun4-impl.h
18-tme_machine_sun4_la_LDFLAGS = -module -version-info 0:0:0
19-tme_machine_sun4_la_LIBADD = ../sun/libtme-machine-sun.la
18+
19+tme_machine_sun4_la_LIBADD = ../sun/libtme-machine-sun.la $(TME_LIBS)
2020
2121 examplesdir = $(pkgdatadir)/examples
2222 dist_examples_DATA = SUN4-75
--- a/modules
+++ b/modules
@@ -54,16 +54,6 @@
5454 # this directory was originally just for include files and to make
5555 # #include <tme/FOO.h> work right when building:
5656 modules-local:
57- @echo updating tme modules list..
58- @grep TME_ELEMENT_NEW_DECL $(srcdir)/*.c | \
59- sed -e 's%.*TME_ELEMENT_NEW_DECL(\(.*\)).*%\1%' \
60- >> $(top_srcdir)/tme/tme-plugins.txt
61- @grep TME_ELEMENT_SUB_NEW_DECL $(srcdir)/*.c | \
62- sed -e 's%.*TME_ELEMENT_SUB_NEW_DECL(\(.*\),\(.*\)).*%\1_\2 \1 \2%' \
63- >> $(top_srcdir)/tme/tme-plugins.txt
64- @grep TME_ELEMENT_X_NEW_DECL $(srcdir)/*.c | \
65- sed -e 's%.*TME_ELEMENT_X_NEW_DECL(\(.*\),\(.*\),\(.*\)).*%\1\3 \1\2 \3%' \
66- >> $(top_srcdir)/tme/tme-plugins.txt
6757
6858 #
6959 # next, when building statically, either for debugging purposes or
@@ -85,14 +75,8 @@ modules-local:
8575 # @TME_PREOPEN@ is then used on the program's link command line.
8676 #
8777 # Note: this works differently now - please see comment in top Makefile for modules target
88- @if test "x$(pkglib_LTLIBRARIES)" != x; then \
89- for module in $(pkglib_LTLIBRARIES); do \
90- echo $$module ; \
91- echo " \\" >> $(top_srcdir)/tme-preopen.txt ; \
92- echo -ne "\t-dlopen ../$(subdir)/$$module" >> $(top_srcdir)/tme-preopen.txt ; \
93- done ; \
94- fi
95-
78+ $(top_builddir)/tme-modules.sh $(subdir) $(top_srcdir) $(pkglib_LTLIBRARIES)
79+
9680 # additionally, libtool, at least through version 1.5, has a
9781 # limitation in that the pseudo-library (the .la file) must be present
9882 # even for a preloaded module. if we aren't debugging, everything is
@@ -106,3 +90,5 @@ modules-local:
10690 # module.c can find the uninstalled tme-plugins.txt file, and libtool
10791 # will want to look in this directory for .la files, so we simply copy
10892 # all of the .la files into that same directory:
93+AM_LDFLAGS = -module -version-info 0:0:0
94+TME_LIBS = $(top_builddir)/generic/libtme-generic.la $(top_builddir)/libtme/libtme.la
--- a/scsi/Makefile.am
+++ b/scsi/Makefile.am
@@ -23,7 +23,6 @@ tme_scsi_la_SOURCES = \
2323 scsi-msg.c \
2424 scsi-device.c \
2525 scsi-bus.c
26-tme_scsi_la_LDFLAGS = -rpath $(pkglibdir) -module -version-info 0:0:0
27-tme_scsi_la_LIBADD = $(top_builddir)/generic/libtme-generic.la
26+tme_scsi_la_LIBADD = $(TME_LIBS)
2827
2928 include $(top_srcdir)/modules
--- a/serial/Makefile.am
+++ b/serial/Makefile.am
@@ -18,7 +18,6 @@ tme_serial_kb_la_SOURCES = \
1818 serial-ms.h \
1919 serial-ms.c \
2020 ms-mssystems.c
21-tme_serial_kb_la_LDFLAGS = -rpath $(pkglibdir) -module -version-info 0:0:0
22-tme_serial_kb_la_LIBADD = $(top_builddir)/generic/libtme-generic.la
21+tme_serial_kb_la_LIBADD = $(TME_LIBS)
2322
2423 include $(top_srcdir)/modules
--- /dev/null
+++ b/tme-hosts.txt
@@ -0,0 +1,6 @@
1+tme_host_gtk=../host/display/gtk
2+tme_host_rfb=../host/display/rfb
3+tme_host_sdl=../host/display/sdl
4+tme_host_tun=../host/eth/tun
5+tme_host_bsd=../host/eth/bsd
6+tme_host_openvpn=../host/eth/openvpn
--- /dev/null
+++ b/tme-modules.sh.in
@@ -0,0 +1,39 @@
1+#!/bin/sh
2+
3+subdir=$1
4+topdir=$2
5+srcdir=$2/$1
6+
7+if test -e .modules; then exit; fi
8+touch .modules
9+
10+echo updating tme modules list..
11+grep TME_ELEMENT_NEW_DECL $srcdir/*.c |
12+ sed -e 's%.*TME_ELEMENT_NEW_DECL(\(.*\)).*%\1%' >> $topdir/tme/tme-plugins.txt
13+grep TME_ELEMENT_SUB_NEW_DECL $srcdir/*.c |
14+ sed -e 's%.*TME_ELEMENT_SUB_NEW_DECL(\(.*\),\(.*\)).*%\1_\2 \1 \2%' >> $topdir/tme/tme-plugins.txt
15+grep TME_ELEMENT_X_NEW_DECL $srcdir/*.c |
16+ sed -e 's%.*TME_ELEMENT_X_NEW_DECL(\(.*\),\(.*\),\(.*\)).*%\1\3 \1\2 \3%' >> $topdir/tme/tme-plugins.txt
17+
18+for num; do
19+ if test $num = $1; then continue; fi
20+ host=
21+ for tme_host in @TME_HOST_TYPES@; do
22+ if test $num = $2; then
23+ if test -d $tme_host; then
24+ cd $tme_host && make modules
25+ cd -
26+ fi
27+ else
28+ if test $num = "tme_host_${tme_host}.la"; then
29+ echo "tme_host_${tme_host}=../${subdir}" >> $topdir/tme-hosts.txt
30+ host=yes
31+ break
32+ fi
33+ fi
34+ done
35+ if test $num = $2; then continue; fi
36+ if test "x${host}" = x; then
37+ echo -n "-dlopen ../${subdir}/$num " >> $topdir/tme-preopen.txt
38+ fi
39+done
--- a/tme-preopen.txt
+++ b/tme-preopen.txt
@@ -1,34 +1 @@
1-LDADD = \
2- -dlopen ../generic/tme_generic.la \
3- -dlopen ../ic/m68k/tme_ic_m68k.la \
4- -dlopen ../ic/sparc/tme_ic_sparc.la \
5- -dlopen ../ic/stp22xx/tme_ic_stp22xx.la \
6- -dlopen ../ic/tme_ic_am9513.la \
7- -dlopen ../ic/tme_ic_mm58167.la \
8- -dlopen ../ic/tme_ic_z8530.la \
9- -dlopen ../ic/tme_ic_i825x6.la \
10- -dlopen ../ic/tme_ic_isil7170.la \
11- -dlopen ../ic/tme_ic_ncr5380.la \
12- -dlopen ../ic/tme_ic_am7930.la \
13- -dlopen ../ic/tme_ic_am7990.la \
14- -dlopen ../ic/tme_ic_ncr53c9x.la \
15- -dlopen ../ic/tme_ic_mk48txx.la \
16- -dlopen ../ic/tme_ic_lsi64854.la \
17- -dlopen ../ic/tme_ic_nec765.la \
18- -dlopen ../ic/tme_ic_ncr89c105.la \
19- -dlopen ../ic/tme_ic_stp2024.la \
20- -dlopen ../ic/tme_ic_ad184x.la \
21- -dlopen ../machine/sun2/tme_machine_sun2.la \
22- -dlopen ../machine/sun3/tme_machine_sun3.la \
23- -dlopen ../machine/sun4/tme_machine_sun4.la \
24- -dlopen ../host/display/rfb/tme_host_rfb.la \
25- -dlopen ../host/display/sdl/tme_host_sdl.la \
26- -dlopen ../host/display/gtk/tme_host_gtk.la \
27- -dlopen ../host/eth/bsd/tme_host_bsd.la \
28- -dlopen ../host/eth/tun/tme_host_tun.la \
29- -dlopen ../host/eth/openvpn/tme_host_openvpn.la \
30- -dlopen ../host/tme_host_posix.la \
31- -dlopen ../bus/multibus/tme_bus_multibus.la \
32- -dlopen ../bus/sbus/tme_bus_sbus.la \
33- -dlopen ../serial/tme_serial_kb.la \
34- -dlopen ../scsi/tme_scsi.la
\ No newline at end of file
1+tme_preopen=-dlopen ../generic/bus/tme_generic.la -dlopen ../ic/m68k/tme_ic_m68k.la -dlopen ../ic/sparc/tme_ic_sparc.la -dlopen ../ic/stp22xx/tme_ic_stp22xx.la -dlopen ../ic/tme_ic_am9513.la -dlopen ../ic/tme_ic_z8530.la -dlopen ../ic/tme_ic_i825x6.la -dlopen ../ic/tme_ic_isil7170.la -dlopen ../ic/tme_ic_ncr5380.la -dlopen ../ic/tme_ic_ncr53c9x.la -dlopen ../ic/tme_ic_ncr89c105.la -dlopen ../ic/tme_ic_stp2024.la -dlopen ../ic/tme_ic_ad184x.la -dlopen ../ic/tme_ic_mk48txx.la -dlopen ../ic/tme_ic_nec765.la -dlopen ../ic/tme_ic_am7930.la -dlopen ../ic/tme_ic_am7990.la -dlopen ../ic/tme_ic_lsi64854.la -dlopen ../ic/tme_ic_mm58167.la -dlopen ../machine/sun2/tme_machine_sun2.la -dlopen ../machine/sun3/tme_machine_sun3.la -dlopen ../machine/sun4/tme_machine_sun4.la -dlopen ../host/tme_host_posix.la -dlopen ../bus/multibus/tme_bus_multibus.la -dlopen ../bus/sbus/tme_bus_sbus.la -dlopen ../serial/tme_serial_kb.la -dlopen ../scsi/tme_scsi.la
\ No newline at end of file
--- a/tme/tme-plugins.txt
+++ b/tme/tme-plugins.txt
@@ -42,11 +42,18 @@ tme_machine_sun4_fdc tme_machine_sun4 fdc
4242 tme_machine_sun4_oclock tme_machine_sun4 oclock
4343 tme_machine_sun4_clock tme_machine_sun4 clock
4444 tme_machine_sun4_zs tme_machine_sun4 zs
45+tme_host_gtk_display tme_host_gtk display
46+tme_host_gtk_display tme_host_gtk display
47+tme_host_rfb_display tme_host_rfb display
4548 tme_host_rfb_display tme_host_rfb display
4649 tme_host_sdl_display tme_host_sdl display
47-tme_host_gtk_display tme_host_gtk display
48-tme_host_bsd_bpf tme_host_bsd bpf
50+tme_host_sdl_display tme_host_sdl display
4951 tme_host_tun_tap tme_host_tun tap
52+tme_host_tun_tap tme_host_tun tap
53+tme_host_bsd_bpf tme_host_bsd bpf
54+tme_host_bsd_bpf tme_host_bsd bpf
55+tme_host_openvpn_tun_tap tme_host_openvpn tun_tap
56+tme_host_openvpn_socket_link tme_host_openvpn socket_link
5057 tme_host_openvpn_socket_link tme_host_openvpn socket_link
5158 tme_host_openvpn_socket_server tme_host_openvpn_socket server
5259 tme_host_openvpn_tun_tap tme_host_openvpn tun_tap
--- a/tmesh/Makefile.am
+++ b/tmesh/Makefile.am
@@ -5,7 +5,7 @@ AUTOMAKE_OPTIONS = 1.4 gnu
55
66 AM_CPPFLAGS = -I$(top_srcdir) -I$(srcdir) -I$(top_srcdir)/lib -I. -D_TME_IMPL
77
8-if USING_OPENVPN
8+if HAVE_OPENVPN
99 AM_CPPFLAGS += -DTME_OPENVPN
1010 endif
1111
@@ -19,9 +19,13 @@ libtmesh_la_SOURCES = \
1919 libtmesh_la_LIBADD = $(top_builddir)/libtme/libtme.la
2020
2121 bin_PROGRAMS = tmesh
22-tmesh_LDADD = libtmesh.la $(LDADD)
22+tmesh_LDADD = libtmesh.la $(tme_preopen) @TME_HOSTS@
2323 tmesh_LDFLAGS = -dlpreopen force -dlopen self
24-include $(top_srcdir)/tme-preopen.txt
2524
2625 install-exec-hook:
2726 $(SETCAP) $(DESTDIR)$(bindir)/$(TGTPFX)tmesh$(EXEEXT)
27+
28+include $(top_srcdir)/tme-hosts.txt
29+include $(top_srcdir)/tme-preopen.txt
30+
31+SUBDIRS = @TME_HOSTS_DIRS@