blob: 2ee97a27347181a705ba0e8ee49076a19c9aaffc [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 \
14 conf/obmc-console-ssh@.service
15
16if ENABLE_CONCURRENT_SERVERS
17obmcconsole_DATA += conf/client.2200.conf
18else
19systemdsystemunit_DATA += conf/obmc-console-ssh.socket
20sshservicedir = $(systemdsystemunitdir)/obmc-console-ssh@.service.d
21sshservice_DATA = conf/obmc-console-ssh@.service.d/use-socket.conf
22endif
23endif
Jeremy Kerrd66195c2016-03-16 17:24:51 +080024
Jeremy Kerre440a402016-03-17 16:34:14 +080025obmc_console_server_CPPFLAGS = \
26 -DLOCALSTATEDIR=\"$(localstatedir)\" \
27 -DSYSCONFDIR=\"$(sysconfdir)\"
Jeremy Kerrdf94dc12016-03-16 12:19:49 +080028
Jeremy Kerre440a402016-03-17 16:34:14 +080029obmc_console_server_SOURCES = \
Jeremy Kerra58cf442016-03-16 12:09:00 +080030 console-server.c \
31 console-server.h \
32 util.c \
Jeremy Kerrc9775ce2017-02-07 16:25:34 +080033 ringbuffer.c \
Jeremy Kerrd66195c2016-03-16 17:24:51 +080034 config.c \
Jeremy Kerra58cf442016-03-16 12:09:00 +080035 log-handler.c \
Jeremy Kerr0cff6522016-03-18 09:57:01 +080036 socket-handler.c \
Jeremy Kerrbc1e8932016-04-28 12:27:30 +080037 tty-handler.c \
Jeremy Kerr0cff6522016-03-18 09:57:01 +080038 console-socket.c
Jeremy Kerra58cf442016-03-16 12:09:00 +080039
Johnathan Mantey1cecc5d2019-02-28 15:01:46 -080040obmc_console_server_LDFLAGS = $(SYSTEMD_LIBS) -lrt
Cheng C Yangf9c8f6c2019-03-04 18:39:52 +080041obmc_console_server_CFLAGS = $(SYSTEMD_CFLAGS)
42
Andrew Jeffery71e7a242020-02-12 22:58:16 +103043obmc_console_client_CPPFLAGS = \
44 -DSYSCONFDIR=\"$(sysconfdir)\"
45
Jeremy Kerre440a402016-03-17 16:34:14 +080046obmc_console_client_SOURCES = \
Jeremy Kerra58cf442016-03-16 12:09:00 +080047 console-client.c \
48 console-server.h \
Jeremy Kerr0cff6522016-03-18 09:57:01 +080049 console-socket.c \
Andrew Jeffery71e7a242020-02-12 22:58:16 +103050 config.c \
Jeremy Kerra58cf442016-03-16 12:09:00 +080051 util.c
Jeremy Kerr6c8d7812016-03-17 15:05:45 +080052
Jeremy Kerrc9775ce2017-02-07 16:25:34 +080053SUBDIRS = test