Skip to content

Commit

Permalink
Also support macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
xyproto committed Jan 15, 2024
1 parent 53d60e6 commit 02cf4c1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
.PHONY: clean install test uninstall

CFLAGS ?= -std=c11 -O2 -pipe -fPIC -fno-plt -fstack-protector-strong -D_GNU_SOURCE -s -z norelro -Wall -Wextra -Wpedantic -Wfatal-errors
CFLAGS ?= -std=c11 -O2 -pipe -fPIC -fno-plt -fstack-protector-strong -D_GNU_SOURCE -z norelro -Wall -Wextra -Wpedantic -Wfatal-errors
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
CFLAGS := -std=c11 -O2 -pipe -fPIC -fstack-protector-strong -Wall -Wextra -Wpedantic -Wfatal-errors
endif

PREFIX ?= /usr
BINDIR ?= $(PREFIX)/bin
DESTDIR ?=
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

`xxd` is a utility that comes with ViM. This is a standalone fork of `xxd`, a slight modernization of the C code, a slight performance increase and a drop-in replacement for `xxd`. The target platform is Linux.

Tested on Arch Linux and macOS, where it builds, runs and all tests pass.

### What is it, and what can it do?

The `xxd` utility is a command-line program widely used in Unix-like systems for creating a hexadecimal dump of a given binary file. Essentially, it converts binary data into a human-readable hexadecimal format, often for the purpose of debugging or examining the underlying data structure of files. It displays each byte of the input data as a two-digit hexadecimal number, often accompanied by its ASCII equivalent, if printable. Additionally, `xxd` can reverse the process, taking a hexadecimal dump and converting it back into binary.
Expand Down

0 comments on commit 02cf4c1

Please sign in to comment.