blob: 696fec9117d027cd2bc77d34a48a4bffef1df813 [file] [log] [blame]
Jeremy Kerre440a402016-03-17 16:34:14 +08001sbin_PROGRAMS = obmc-console-server
2bin_PROGRAMS = obmc-console-client
Jeremy Kerra58cf442016-03-16 12:09:00 +08003
Andrew Jeffery9836e2b2020-02-11 12:12:07 +10304obmcconsoledir = $(sysconfdir)/obmc-console
5obmcconsole_DATA = conf/server.ttyVUART0.conf
6
Andrew Jefferyfdf1a712020-02-28 11:52:48 +10307if WITH_UDEV
8udevrulesddir = $(udevdir)/rules.d
9udevrulesd_DATA = conf/80-obmc-console-uart.rules
10endif
11
Andrew Jeffery9836e2b2020-02-11 12:12:07 +103012if WITH_SYSTEMD
13systemdsystemunit_DATA = conf/obmc-console@.service \
Jonathan Domancc075302023-03-31 10:20:48 -070014 conf/obmc-console@.socket \
Andrew Jeffery9836e2b2020-02-11 12:12:07 +103015 conf/obmc-console-ssh@.service
16
17if ENABLE_CONCURRENT_SERVERS
18obmcconsole_DATA += conf/client.2200.conf
19else
20systemdsystemunit_DATA += conf/obmc-console-ssh.socket
21sshservicedir = $(systemdsystemunitdir)/obmc-console-ssh@.service.d
22sshservice_DATA = conf/obmc-console-ssh@.service.d/use-socket.conf
23endif
24endif
Jeremy Kerrd66195c2016-03-16 17:24:51 +080025
Jeremy Kerre440a402016-03-17 16:34:14 +080026obmc_console_server_CPPFLAGS = \
27 -DLOCALSTATEDIR=\"$(localstatedir)\" \
28 -DSYSCONFDIR=\"$(sysconfdir)\"
Jeremy Kerrdf94dc12016-03-16 12:19:49 +080029
Jeremy Kerre440a402016-03-17 16:34:14 +080030obmc_console_server_SOURCES = \
Jeremy Kerra58cf442016-03-16 12:09:00 +080031 console-server.c \
32 console-server.h \
33 util.c \
Jeremy Kerrc9775ce2017-02-07 16:25:34 +080034 ringbuffer.c \
Jeremy Kerrd66195c2016-03-16 17:24:51 +080035 config.c \
Jeremy Kerra58cf442016-03-16 12:09:00 +080036 log-handler.c \
Jeremy Kerr0cff6522016-03-18 09:57:01 +080037 socket-handler.c \
Jeremy Kerrbc1e8932016-04-28 12:27:30 +080038 tty-handler.c \
Jeremy Kerr0cff6522016-03-18 09:57:01 +080039 console-socket.c
Jeremy Kerra58cf442016-03-16 12:09:00 +080040
Johnathan Mantey1cecc5d2019-02-28 15:01:46 -080041obmc_console_server_LDFLAGS = $(SYSTEMD_LIBS) -lrt
Cheng C Yangf9c8f6c2019-03-04 18:39:52 +080042obmc_console_server_CFLAGS = $(SYSTEMD_CFLAGS)
43
Andrew Jeffery71e7a242020-02-12 22:58:16 +103044obmc_console_client_CPPFLAGS = \
45 -DSYSCONFDIR=\"$(sysconfdir)\"
46
Jeremy Kerre440a402016-03-17 16:34:14 +080047obmc_console_client_SOURCES = \
Jeremy Kerra58cf442016-03-16 12:09:00 +080048 console-client.c \
49 console-server.h \
Jeremy Kerr0cff6522016-03-18 09:57:01 +080050 console-socket.c \
Andrew Jeffery71e7a242020-02-12 22:58:16 +103051 config.c \
Jeremy Kerra58cf442016-03-16 12:09:00 +080052 util.c
Jeremy Kerr6c8d7812016-03-17 15:05:45 +080053
Jeremy Kerrc9775ce2017-02-07 16:25:34 +080054SUBDIRS = test