# SPDX-License-Identifier: AGPL-3.0-only
CC      ?= gcc
CFLAGS  ?= -O2 -Wall -Wextra -Wno-unused-parameter
CPPFLAGS += -I../kernel

# Packages are arch-independent DKMS source packages that may be installed
# on a distro older than the one that built them, so the shipped binary is
# linked statically rather than against the build host's glibc.
STATIC  ?= 1
ifeq ($(STATIC),1)
LDFLAGS += -static
endif

all: scradlectl

scradlectl: scradlectl.c ../kernel/scradle_uapi.h
	$(CC) $(CFLAGS) $(CPPFLAGS) $< -o $@ $(LDFLAGS)

clean:
	rm -f scradlectl

.PHONY: all clean
