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>audit2-merge1
parent
ec7209aed3
commit
9c1a7e0f79
|
@ -3,16 +3,14 @@
|
||||||
|
|
||||||
CC=cc
|
CC=cc
|
||||||
CFLAGS=-Wall -Wextra -Werror -O2 -pedantic
|
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
|
SRCS=dell_flash_unlock.c accessors.c
|
||||||
|
|
||||||
all: $(SRCS) accessors.h
|
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:
|
clean:
|
||||||
rm -f dell_flash_unlock
|
rm -f dell_flash_unlock
|
||||||
|
|
|
@ -21,16 +21,13 @@ around 2008 (E6400 era).
|
||||||
with that option set.
|
with that option set.
|
||||||
|
|
||||||
### OpenBSD/NetBSD/FreeBSD
|
### 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.
|
- On OpenBSD/NetBSD/FreeBSD, ensure you are booting with securelevel set to -1.
|
||||||
|
|
||||||
### General
|
### General
|
||||||
Make sure an AC adapter is plugged into your system
|
Make sure an AC adapter is plugged into your system
|
||||||
|
|
||||||
Run `make` (or `gmake` on BSD) to compile the utility, and then run
|
Run `make` to compile the utility, and then run `./dell_flash_unlock` with
|
||||||
`./dell_flash_unlock` with root/superuser permissions and follow the directions
|
root/superuser permissions and follow the directions it outputs.
|
||||||
it outputs.
|
|
||||||
|
|
||||||
## Confirmed supported devices
|
## Confirmed supported devices
|
||||||
- Latitude E6400, E6500
|
- Latitude E6400, E6500
|
||||||
|
|
Loading…
Reference in New Issue