mirror of
https://github.com/PDP-10/klh10.git
synced 2026-01-11 23:52:54 +00:00
commit
fcf812e4d7
@ -6,7 +6,7 @@ script:
|
||||
- ./autogen.sh
|
||||
- mkdir tmp
|
||||
- cd tmp
|
||||
- ../configure
|
||||
- ../configure --enable-lights
|
||||
- make base-kl
|
||||
- cd ../run/dfkfb
|
||||
- ../../tmp/bld-kl/kn10-kl dfkfb.ini
|
||||
|
||||
42
configure.ac
42
configure.ac
@ -5,7 +5,7 @@ dnl This configure.ac script was created for Autoconf 2.69, but I
|
||||
dnl tried it with one as old as 2.61, and that seemed to work fine.
|
||||
|
||||
AC_PREREQ([2.69])
|
||||
AC_INIT([klh10], [2.0k-Rhialto], [https://github.com/PDP-10/klh10],
|
||||
AC_INIT([klh10], [2.0l], [https://github.com/PDP-10/klh10],
|
||||
[], [https://github.com/PDP-10/klh10])
|
||||
AC_CONFIG_SRCDIR([src/klh10.h])
|
||||
AC_CONFIG_HEADERS([src/config.h])
|
||||
@ -35,6 +35,25 @@ do
|
||||
done
|
||||
CFLAGS="$NEWCFLAGS -g3 -O3"
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# Check whether we want LIGHTS support
|
||||
# -------------------------------------------------------------------------
|
||||
|
||||
AC_ARG_ENABLE(lights,
|
||||
AS_HELP_STRING([--enable-lights],[enable Panda lights (which requires libusb-1.0)]))
|
||||
|
||||
case "${enable_lights}" in
|
||||
yes)
|
||||
AC_MSG_NOTICE([Compiling with Panda lights support])
|
||||
AC_DEFINE(KLH10_DEV_LITES, 1, [Set to 1 to enable Panda lights])
|
||||
need_libusb=yes
|
||||
;;
|
||||
no | "")
|
||||
AC_DEFINE(KLH10_DEV_LITES, 0, [Set to 0 to disable Panda lights])
|
||||
;;
|
||||
*) AC_MSG_ERROR([bad value ${enable_lights} for --enable-lights]) ;;
|
||||
esac
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# Check whether we want VDE support
|
||||
# -------------------------------------------------------------------------
|
||||
@ -81,7 +100,23 @@ AC_CHECK_FUNC([nanosleep],
|
||||
AC_CHECK_LIB([rt], [nanosleep])
|
||||
])
|
||||
|
||||
# -lsocket and -lpcap should go into NETLIBS
|
||||
case "${need_libusb}" in
|
||||
yes)
|
||||
# Check if libusb-1.0 is present, otherwise fail.
|
||||
# CPULIBS is for libraries only needed by the CPU, not by other programs.
|
||||
SAVE_LIBS="$LIBS"
|
||||
LIBS=""
|
||||
AC_CHECK_LIB([usb-1.0], [libusb_get_device_descriptor],
|
||||
[],
|
||||
[AC_MSG_ERROR([Lights require libusb-1.0, which I could not find.])]
|
||||
)
|
||||
CPULIBS="$LIBS"
|
||||
LIBS="$SAVE_LIBS"
|
||||
;;
|
||||
esac
|
||||
|
||||
# -lsocket, -lpcap and -lvdeplug should go into NETLIBS.
|
||||
# NETLIBS is for libraries only needed by programs doing networking.
|
||||
SAVE_LIBS="$LIBS"
|
||||
LIBS=""
|
||||
AC_CHECK_LIB([socket], [if_nameindex])
|
||||
@ -100,7 +135,7 @@ AC_CHECK_HEADERS([arpa/inet.h errno.h fcntl.h limits.h netinet/in.h sgtty.h \
|
||||
sys/socket.h sys/time.h termios.h unistd.h net/if_tun.h \
|
||||
linux/if_tun.h linux/if_packet.h net/if_tap.h sys/mtio.h \
|
||||
net/nit.h sys/dlpi.h net/if_dl.h net/if_types.h \
|
||||
libvdeplug.h])
|
||||
sys/io.h libvdeplug.h])
|
||||
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_INLINE
|
||||
@ -248,6 +283,7 @@ AC_SUBST([CPPFLAGS])
|
||||
AC_SUBST([DESTDIR])
|
||||
AC_SUBST([PREFIX])
|
||||
AC_SUBST([LIBS])
|
||||
AC_SUBST([CPULIBS])
|
||||
AC_SUBST([NETLIBS])
|
||||
AC_SUBST([MAKEFILE], [Makefile])
|
||||
AC_SUBST([CENVFLAGS])
|
||||
|
||||
@ -25,6 +25,7 @@ CFLAGS_LINT = -ansi -pedantic -Wall -Wshadow \
|
||||
-Wmissing-declarations -Wredundant-decls
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
CPULIBS = @CPULIBS@
|
||||
NETLIBS = @NETLIBS@
|
||||
|
||||
prefix = @prefix@
|
||||
|
||||
@ -54,7 +54,8 @@ CFLAGS_LINT ?=
|
||||
LINKER ?= $(CC)
|
||||
LDFLAGS ?=
|
||||
LDOUTF ?= -o
|
||||
LIBS := -lusb-1.0
|
||||
LIBS ?=
|
||||
CPULIBS ?=
|
||||
NETLIBS ?= -lpcap
|
||||
|
||||
# Variables specific to this makefile setup
|
||||
@ -108,6 +109,7 @@ showdefs:
|
||||
@echo "CPPFLAGS= $(CPPFLAGS)"
|
||||
@echo "LDFLAGS = $(LDFLAGS)"
|
||||
@echo "LIBS = $(LIBS)"
|
||||
@echo "CPULIBS = $(CPULIBS)"
|
||||
@echo "NETLIBS = $(NETLIBS)"
|
||||
@echo "CENVFLAGS = $(CENVFLAGS)"
|
||||
@echo "CONFFLAGS = $(CONFFLAGS)"
|
||||
@ -252,13 +254,13 @@ DINTFLAGS = \
|
||||
##
|
||||
|
||||
kn10-ks: $(OFILES_KS)
|
||||
$(LINKER) $(LDFLAGS) $(LDOUTF) kn10-ks $(OFILES_KS) $(LIBS)
|
||||
$(LINKER) $(LDFLAGS) $(LDOUTF) kn10-ks $(OFILES_KS) $(LIBS) $(CPULIBS)
|
||||
|
||||
kn10-ks-its: $(OFILES_KS)
|
||||
$(LINKER) $(LDFLAGS) $(LDOUTF) kn10-ks-its $(OFILES_KS) $(LIBS)
|
||||
$(LINKER) $(LDFLAGS) $(LDOUTF) kn10-ks-its $(OFILES_KS) $(LIBS) $(CPULIBS)
|
||||
|
||||
kn10-kl: $(OFILES_KL)
|
||||
$(LINKER) $(LDFLAGS) $(LDOUTF) kn10-kl $(OFILES_KL) $(LIBS)
|
||||
$(LINKER) $(LDFLAGS) $(LDOUTF) kn10-kl $(OFILES_KL) $(LIBS) $(CPULIBS)
|
||||
|
||||
|
||||
####################################################################
|
||||
@ -325,6 +327,7 @@ base-ks-its:
|
||||
"CPPFLAGS = $(CPPFLAGS)" \
|
||||
"LDFLAGS = $(LDFLAGS)" \
|
||||
"LIBS = $(LIBS)" \
|
||||
"CPULIBS = $(CPULIBS)" \
|
||||
"NETLIBS = $(NETLIBS)" \
|
||||
"CENVFLAGS = $(CENVFLAGS)" \
|
||||
"CONFFLAGS = \
|
||||
@ -355,6 +358,7 @@ base-ks:
|
||||
"CPPFLAGS = $(CPPFLAGS)" \
|
||||
"LDFLAGS = $(LDFLAGS)" \
|
||||
"LIBS = $(LIBS)" \
|
||||
"CPULIBS = $(CPULIBS)" \
|
||||
"NETLIBS = $(NETLIBS)" \
|
||||
"CENVFLAGS = $(CENVFLAGS)" \
|
||||
"CONFFLAGS = \
|
||||
@ -381,6 +385,7 @@ base-kl:
|
||||
"CPPFLAGS = $(CPPFLAGS)" \
|
||||
"LDFLAGS = $(LDFLAGS)" \
|
||||
"LIBS = $(LIBS)" \
|
||||
"CPULIBS = $(CPULIBS)" \
|
||||
"NETLIBS = $(NETLIBS)" \
|
||||
"CENVFLAGS = $(CENVFLAGS)" \
|
||||
"CONFFLAGS = \
|
||||
@ -434,6 +439,7 @@ lint-ks-its:
|
||||
"CPPFLAGS = $(CPPFLAGS)" \
|
||||
"LDFLAGS = $(LDFLAGS)" \
|
||||
"LIBS = $(LIBS)" \
|
||||
"CPULIBS = $(CPULIBS)" \
|
||||
"NETLIBS = $(NETLIBS)" \
|
||||
"CENVFLAGS = $(CENVFLAGS)" \
|
||||
"CONFFLAGS = $(CONFFLAGS) $(CONFFLAGS_AUX) $(CONFFLAGS_USR)"
|
||||
@ -446,6 +452,7 @@ lint-ks:
|
||||
"CPPFLAGS = $(CPPFLAGS)" \
|
||||
"LDFLAGS = $(LDFLAGS)" \
|
||||
"LIBS = $(LIBS)" \
|
||||
"CPULIBS = $(CPULIBS)" \
|
||||
"NETLIBS = $(NETLIBS)" \
|
||||
"CENVFLAGS = $(CENVFLAGS)" \
|
||||
"CONFFLAGS = $(CONFFLAGS) $(CONFFLAGS_AUX) $(CONFFLAGS_USR)"
|
||||
@ -458,6 +465,7 @@ lint-kl:
|
||||
"CPPFLAGS = $(CPPFLAGS)" \
|
||||
"LDFLAGS = $(LDFLAGS)" \
|
||||
"LIBS = $(LIBS)" \
|
||||
"CPULIBS = $(CPULIBS)" \
|
||||
"NETLIBS = $(NETLIBS)" \
|
||||
"CENVFLAGS = $(CENVFLAGS)" \
|
||||
"CONFFLAGS = $(CONFFLAGS) $(CONFFLAGS_AUX) $(CONFFLAGS_USR)"
|
||||
@ -480,6 +488,7 @@ port-ks:
|
||||
"CPPFLAGS = $(CPPFLAGS)" \
|
||||
"LDFLAGS = $(LDFLAGS)" \
|
||||
"LIBS = $(LIBS)" \
|
||||
"CPULIBS = $(CPULIBS)" \
|
||||
"NETLIBS = $(NETLIBS)" \
|
||||
"CENVFLAGS = $(CENVFLAGS)" \
|
||||
"CONFFLAGS = \
|
||||
@ -507,6 +516,7 @@ kl0i-sync:
|
||||
"CPPFLAGS = $(CPPFLAGS)" \
|
||||
"LDFLAGS = $(LDFLAGS)" \
|
||||
"LIBS = $(LIBS)" \
|
||||
"CPULIBS = $(CPULIBS)" \
|
||||
"NETLIBS = $(NETLIBS)" \
|
||||
"CENVFLAGS = $(CENVFLAGS)" \
|
||||
"CONFFLAGS = \
|
||||
@ -533,6 +543,7 @@ kl0i-rtmopt:
|
||||
"CPPFLAGS = $(CPPFLAGS)" \
|
||||
"LDFLAGS = $(LDFLAGS)" \
|
||||
"LIBS = $(LIBS)" \
|
||||
"CPULIBS = $(CPULIBS)" \
|
||||
"NETLIBS = $(NETLIBS)" \
|
||||
"CENVFLAGS = $(CENVFLAGS)" \
|
||||
"CONFFLAGS = \
|
||||
|
||||
@ -33,8 +33,19 @@ static int decosfcclossage;
|
||||
|
||||
#if KLH10_DEV_LITES /* Moby conditional for entire file */
|
||||
|
||||
#if HAVE_LIBUSB_1_0
|
||||
#include <libusb-1.0/libusb.h>
|
||||
#endif
|
||||
/*
|
||||
* For now, assume that having <sys/io.h> is equivalent to having
|
||||
* outb(). That may not be exactly true but it's the code we have.
|
||||
*/
|
||||
#ifdef HAVE_SYS_IO_H
|
||||
#include <sys/io.h>
|
||||
#else
|
||||
static inline int ioperm(int a, int b, int c) { return -1; }
|
||||
static inline void outb(int a, int b) {}
|
||||
#endif
|
||||
#include "dvlites.h"
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user