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

change default compilation mode to release mode for C API #300

Closed
wants to merge 4 commits into from

Conversation

Kiyoshika
Copy link
Member

Originally I was trying to add a variable to determine which mode to use but Make is very annoying and convoluted sometimes that this just made things more complicated than they needed to be. Defaulting to release mode so when the user agent(s) build the bindings, they don't have to change the mode

@Kiyoshika Kiyoshika requested a review from a team December 2, 2023 16:44
@Kiyoshika Kiyoshika changed the title change default compilation to release for C API change default compilation mode to release mode for C API Dec 2, 2023
INCLUDE_DIR := include
SRC_DIR := src
CPPFLAGS := -I$(INCLUDE_DIR) -I$(INCLUDE_DIR)/nodes
CFLAGS_DEBUG := -std=c99 -g -Wall -Wextra -O0
CFLAGS_RELEASE := -std=c99 -Wall -Wextra -O2
CFLAGS := $(CFLAGS_DEBUG)
CC := gcc
TARGET_DIR := ../../target/debug
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After some testing we also need a way to change this to ../../target/release depending on the mode as well...

@Kiyoshika Kiyoshika marked this pull request as draft December 2, 2023 16:56
@Kiyoshika
Copy link
Member Author

Ah, my editor was adding random spaces and also make doesn't allow you to tab in conditionals when it's outside of a rule... the format is very picky but I figured it out now

@Kiyoshika Kiyoshika closed this Dec 2, 2023
@jaytaph jaytaph deleted the c-api-release-mode branch February 29, 2024 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants