cbmk/util/dell-flash-unlock/Makefile
Nicholas Chin 9c1a7e0f79 dell-flash-unlock: Remove dependency on GNU Make
Use shell scripting in the recipe instead of GNU make's
conditional syntax. This allows the Makefile to work with
the default implementations of make on the BSDs.

Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
2024-05-03 01:47:38 +01:00

16 lines
397 B
Makefile

# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2023 Nicholas Chin
CC=cc
CFLAGS=-Wall -Wextra -Werror -O2 -pedantic
SRCS=dell_flash_unlock.c accessors.c
all: $(SRCS) accessors.h
CFLAGS="$(CFLAGS)"; \
if [ $$(uname) = OpenBSD ] || [ $$(uname) = NetBSD ]; then \
CFLAGS="$$CFLAGS -l$$(uname -p)"; \
fi; \
$(CC) $$CFLAGS $(SRCS) -o dell_flash_unlock
clean:
rm -f dell_flash_unlock