Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check automatically Intel and Silicon MACS and minor fixes #85

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ override CFLAGS += \
-Wall \
-Wextra \
-Wno-incompatible-pointer-types \
-Wno-multichar \
-Wno-unused-variable \
-Wno-unused-but-set-variable \
-Wno-deprecated-non-prototype \
-Wno-multichar \
-Wno-unused-parameter \
-Wno-missing-field-initializers \
-I./$(INCDIR)
Expand All @@ -26,8 +28,18 @@ override LDFLAGS += # Nothing
### On macOS, include <argp.h> from Homebrew package `argp-standalone`
ifneq ($(OS),Windows_NT)
ifeq ($(shell uname -s),Darwin)
override CFLAGS += -I/usr/local/Cellar/argp-standalone/1.3/include/
override LDFLAGS += -L/usr/local/Cellar/argp-standalone/1.3/lib/ -largp
UNAME_M := $(shell uname -m)
ifeq ($(UNAME_M),arm64)
# Apple Silicon
ARGP_PREFIX := /opt/homebrew/opt/argp-standalone
else ifeq ($(UNAME_M),x86_64)
# Intel Macs
ARGP_PREFIX := /usr/local/opt/argp-standalone
else
$(error Unsupported architecture $(UNAME_M))
endif
override CFLAGS += -I$(ARGP_PREFIX)/include/
override LDFLAGS += -L$(ARGP_PREFIX)/lib/ -largp
endif
endif

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Documentation for versioned releases and as generated from the `main` branch
- On Ubuntu, ensure that the package `libc6-dev` is installed.

- On macOS, you can install just Argp via the [Homebrew](https://brew.sh)
package `argp-standalone`. The Makefile will handle this configuration
package `argp-standalone`, with command `brew install argp-standalone`. The Makefile will handle this configuration
automatically. If you acquire Argp any other way, such as by installing
glibc in its entirety, you may need to configure `CFLAGS` and `LDFLAGS` as
appropriate.
Expand Down
2 changes: 1 addition & 1 deletion include/drat/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
char* get_fopen_error_msg();
char* get_fseeko_error_msg();

int open_container__info_stream();
int open_container__info_stream(FILE* info_stream);
int open_container();
int close_container();
int end_of_container();
Expand Down