summaryrefslogtreecommitdiff
path: root/util/dell-flash-unlock
diff options
context:
space:
mode:
authorNicholas Chin <nic.c3.14@gmail.com>2024-05-01 21:39:13 -0600
committerNicholas Chin <nic.c3.14@gmail.com>2024-05-01 21:51:59 -0600
commita5cb63764b9984f8e99275b00bd9d5d974a88d1e (patch)
tree4a410eac78999093f3f39e2ccd4d1a9f4439bdf5 /util/dell-flash-unlock
parent4bf3da31c9c93169052bdab188ef95a0fec8b210 (diff)
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>
Diffstat (limited to 'util/dell-flash-unlock')
-rw-r--r--util/dell-flash-unlock/Makefile12
-rw-r--r--util/dell-flash-unlock/README.md7
2 files changed, 7 insertions, 12 deletions
diff --git a/util/dell-flash-unlock/Makefile b/util/dell-flash-unlock/Makefile
index aee07167..8528c10e 100644
--- a/util/dell-flash-unlock/Makefile
+++ b/util/dell-flash-unlock/Makefile
@@ -3,16 +3,14 @@
CC=cc
CFLAGS=-Wall -Wextra -Werror -O2 -pedantic
-ifeq ($(shell uname), OpenBSD)
- CFLAGS += -l$(shell uname -p)
-endif
-ifeq ($(shell uname), NetBSD)
- CFLAGS += -l$(shell uname -p)
-endif
SRCS=dell_flash_unlock.c accessors.c
all: $(SRCS) accessors.h
- $(CC) $(CFLAGS) $(SRCS) -o dell_flash_unlock
+ 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
diff --git a/util/dell-flash-unlock/README.md b/util/dell-flash-unlock/README.md
index e179e77c..7333f63e 100644
--- a/util/dell-flash-unlock/README.md
+++ b/util/dell-flash-unlock/README.md
@@ -21,16 +21,13 @@ around 2008 (E6400 era).
with that option set.
### OpenBSD/NetBSD/FreeBSD
-- The makefile is not currently compatible with POSIX make; install and use GNU
- Make (gmake) to build dell-flash-unlock instead of make
- On OpenBSD/NetBSD/FreeBSD, ensure you are booting with securelevel set to -1.
### General
Make sure an AC adapter is plugged into your system
-Run `make` (or `gmake` on BSD) to compile the utility, and then run
-`./dell_flash_unlock` with root/superuser permissions and follow the directions
-it outputs.
+Run `make` to compile the utility, and then run `./dell_flash_unlock` with
+root/superuser permissions and follow the directions it outputs.
## Confirmed supported devices
- Latitude E6400, E6500