aboutsummaryrefslogtreecommitdiff
path: root/GNUmakefile
diff options
context:
space:
mode:
authorPaul Selkirk <paul@psgd.org>2016-06-02 14:01:39 -0400
committerPaul Selkirk <paul@psgd.org>2016-06-02 14:01:39 -0400
commitf94203f344a7eabba834702dd171ae6c5c01c729 (patch)
tree5706fa9a3fa55ba408abee5b3c874cc170f0de11 /GNUmakefile
parent63fd94a724893152592b5f318e7d98f2be0ede74 (diff)
Add RPC client daemon.
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile20
1 files changed, 15 insertions, 5 deletions
diff --git a/GNUmakefile b/GNUmakefile
index e0a569a..e92dd4f 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -51,7 +51,7 @@ PKEY2_OBJ = aes_keywrap.o modexp.o
# IO_BUS = eim | i2c | fmc
# eim: EIM bus from Novena
# i2c: older I2C bus from Novena
-# fmc: FMC bus from dev-bridge board
+# fmc: FMC bus from dev-bridge and alpha boards
IO_BUS ?= eim
ifeq (${IO_BUS},eim)
@@ -95,26 +95,29 @@ endif
#
# RPC_SERVER = yes
#
-# RPC_TRANSPORT = loopback | serial
+# RPC_TRANSPORT = loopback | serial | daemon
# loopback: communicate over loopback socket on Novena
# serial: communicate over USB in serial pass-through mode
+# daemon: communicate over USB via a daemon, to arbitrate multiple clients
-RPC_TRANSPORT ?= serial
+RPC_TRANSPORT ?= daemon
RPC_CLIENT_OBJ = rpc_api.o rpc_client.o xdr.o
ifeq (${RPC_TRANSPORT},loopback)
RPC_CLIENT_OBJ += rpc_client_loopback.o
else ifeq (${RPC_TRANSPORT},serial)
RPC_CLIENT_OBJ += rpc_client_serial.o slip.o
+else ifeq (${RPC_TRANSPORT},daemon)
+ RPC_CLIENT_OBJ += rpc_client_daemon.o
endif
RPC_DISPATCH_OBJ = rpc_hash.o rpc_misc.o rpc_pkey.o
-RPC_SERVER_OBJ = rpc_server.o xdr.o ${RPC_DISPATCH_OBJ}
+RPC_SERVER_OBJ = rpc_api.o rpc_server.o xdr.o ${RPC_DISPATCH_OBJ}
ifeq (${RPC_TRANSPORT},loopback)
RPC_SERVER_OBJ += rpc_server_loopback.o
else ifeq (${RPC_TRANSPORT},serial)
- RPC_SERVER_OBJ += rpc_server_serial.o rpc_serial.o slip.o
+ RPC_SERVER_OBJ += rpc_server_serial.o slip.o
endif
# Not building any of the RPC stuff, access FPGA cores directly.
@@ -186,6 +189,13 @@ server:
loopback:
${MAKE} RPC_CLIENT=remote RPC_SERVER=yes RPC_TRANSPORT=loopback
+daemon: cryptech_rpcd
+# ${MAKE} RPC_CLIENT=mixed RPC_TRANSPORT=daemon
+ ${MAKE} RPC_CLIENT=remote RPC_TRANSPORT=daemon
+
+cryptech_rpcd: daemon.o slip.o rpc_serial.o xdr.o
+ ${CC} ${CFLAGS} -o $@ $^ ${LDFLAGS}
+
${OBJ}: ${INC}
${LIB}: ${OBJ}