[dev] Accommodate macOS

This commit is contained in:
Anton Bronnikov 2023-04-26 11:20:13 +03:00
parent 401776f006
commit 44ede0f770
No known key found for this signature in database
GPG Key ID: E4D7F389D62E58B2
2 changed files with 18 additions and 10 deletions

12
.gitignore vendored
View File

@ -1,8 +1,10 @@
.DS_Store
test
.vscode
*.dSYM
*.o
testcpp
tests/test_2_serialized.txt
tests/test_2_serialized_pretty.txt
test_hash_collisions
build/**
test
test_hash_collisions
testcpp
tests/test_2_serialized_pretty.txt
tests/test_2_serialized.txt

View File

@ -1,8 +1,15 @@
CC = gcc
CFLAGS = -O0 -g -Wall -Wextra -Wno-deprecated-declarations -std=c89 -pedantic-errors -DTESTS_MAIN
UNAME := $(shell uname -s)
CPPC = g++
CPPFLAGS = -O0 -g -Wall -Wextra -Wno-deprecated-declarations -DTESTS_MAIN
ifeq ($(UNAME), Darwin)
CC := $(shell which gcc-12)
CPPC := $(shell which g++-12)
else
CC := $(shell which gcc)
CPPC := $(shell which g++)
endif
CFLAGS := -O0 -g -Wall -Wextra -Wno-deprecated-declarations -DTESTS_MAIN -std=c89 -pedantic-errors
CPPFLAGS := -O0 -g -Wall -Wextra -Wno-deprecated-declarations -DTESTS_MAIN
all: test testcpp test_hash_collisions
@ -21,4 +28,3 @@ test_hash_collisions: tests.c parson.c
clean:
rm -f test *.o