2023-07-05 13:57:36 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
2023-12-19 03:04:36 +00:00
|
|
|
VERSION := 2.4
|
2023-07-05 13:19:59 +00:00
|
|
|
$(info "Version: $(VERSION)")
|
|
|
|
|
|
|
|
CC := gcc
|
|
|
|
ifeq ($(CFLAGS),)
|
|
|
|
CFLAGS := -O3 -g -Wall -D_GNU_SOURCE \
|
|
|
|
-fstack-protector-all -fcf-protection \
|
|
|
|
-fstack-clash-protection
|
|
|
|
endif
|
|
|
|
CFLAGS += -fPIC -fplugin=annobin
|
|
|
|
LDFLAGS += -Wl,-z,now -Wl,-z,relro -pie
|
|
|
|
|
2023-12-19 03:04:36 +00:00
|
|
|
FILES := slub_cpu_partial_off \
|
2023-07-05 13:19:59 +00:00
|
|
|
rhel-rt.rules \
|
|
|
|
kernel-is-rt \
|
|
|
|
realtime-setup.sysconfig \
|
|
|
|
realtime-setup.systemd \
|
|
|
|
realtime.conf \
|
|
|
|
realtime-entsk.service \
|
|
|
|
realtime-setup.service \
|
|
|
|
realtime-setup.spec
|
|
|
|
|
2023-07-05 13:57:36 +00:00
|
|
|
EXT := bz2
|
|
|
|
TARBALL := realtime-setup-v$(VERSION).tar.$(EXT)
|
|
|
|
|
2023-07-05 13:19:59 +00:00
|
|
|
all: realtime-entsk
|
|
|
|
|
|
|
|
realtime-entsk: enable-netsocket-tstamp-static-key.c
|
|
|
|
$(CC) $(CFLAGS) -c enable-netsocket-tstamp-static-key.c
|
|
|
|
$(CC) $(LDFLAGS) -o realtime-entsk enable-netsocket-tstamp-static-key.o
|
|
|
|
|
|
|
|
clean:
|
2023-07-05 14:08:25 +00:00
|
|
|
rm -f *~ *.tar.$(EXT)
|
2023-07-05 13:19:59 +00:00
|
|
|
rm -rf rpm
|
|
|
|
rm -f realtime-entsk *.o
|
|
|
|
|
2023-12-19 03:04:36 +00:00
|
|
|
tarball:
|
|
|
|
rm -f *.tar.$(EXT)
|
2023-07-05 13:57:36 +00:00
|
|
|
git archive --format=tar --prefix=realtime-setup-v$(VERSION)/ HEAD | \
|
2023-07-05 14:08:25 +00:00
|
|
|
bzip2 >realtime-setup-v$(VERSION).tar.$(EXT)
|
2023-07-05 13:19:59 +00:00
|
|
|
|
|
|
|
install:
|
|
|
|
install -m 755 -D slub_cpu_partial_off $(DEST)/usr/bin/slub_cpu_partial_off
|
|
|
|
install -m 644 -D rhel-rt.rules $(DEST)/etc/udev/rules.d/99-rhel-rt.rules
|
|
|
|
install -m 755 -D kernel-is-rt $(DEST)/usr/sbin/kernel-is-rt
|
|
|
|
install -m 644 -D realtime-setup.sysconfig $(DEST)/etc/sysconfig/realtime-setup
|
|
|
|
install -m 755 -D realtime-setup.systemd $(DEST)/usr/bin/realtime-setup
|
|
|
|
install -m 644 -D realtime.conf $(DEST)/etc/security/limits.d/realtime.conf
|
|
|
|
install -m 644 -D realtime-entsk.service $(DEST)/usr/lib/systemd/system/realtime-entsk.service
|
|
|
|
install -m 755 -D -s realtime-entsk $(DEST)/usr/sbin/realtime-entsk
|
|
|
|
install -m 644 -D realtime-setup.service $(DEST)/usr/lib/systemd/system/realtime-setup.service
|