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

make: assign config=player as default, fixes missing -O3 compiler optimization #265

Merged
merged 1 commit into from
Jan 24, 2025
Merged
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
15 changes: 10 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@
# it's better to keep these vars in slightly strong named vars for use through-out Makefile tho.

LUTRO_CONFIG ?= $(config)
LUTRO_CONFIG ?= player

# WANTS use ?= syntax to allow things to be provided on command line
# WANTS use ?= syntax to allow things to be provided via environment as well as via CLI
# NOTE: if you change these on the CLI then you MUST manually run clean!
# (this could be fixed with some clever make scripting, maybe later...)

Expand All @@ -36,6 +35,9 @@ HAVE_INOTIFY ?= 0
TRACE_ALLOCATION ?= 0
MMD := -MMD

ifeq ($(LUTRO_CONFIG),)
LUTRO_CONFIG = player
endif

ifeq ($(platform),)
platform = unix
Expand Down Expand Up @@ -456,20 +458,23 @@ DEFINES_PLAYER += -DLUTRO_ENABLE_ALERT=0
DEFINES_PLAYER += -DLUTRO_ENABLE_ASSERT_TOOL=0
DEFINES_PLAYER += -DLUTRO_ENABLE_ASSERT_DBG=0

ifeq ($(LUTRO_CONFIG), debug)
ifeq ($(LUTRO_CONFIG),debug)
DEFINES += $(DEFINES_DEBUG)
CFLAGS += -O0 -g
LUA_MYCFLAGS += -O0 -g -DLUA_USE_APICHECK
else ifeq ($(LUTRO_CONFIG), tool)
else ifeq ($(LUTRO_CONFIG),tool)
DEFINES += $(DEFINES_TOOL)
DEFINES += -DNDEBUG
CFLAGS += -O1 -g
LUA_MYCFLAGS += -O1 -g -DLUA_USE_APICHECK
else ifeq ($(LUTRO_CONFIG), player)
else ifeq ($(LUTRO_CONFIG),player)
DEFINES += $(DEFINES_PLAYER)
DEFINES += -DNDEBUG
CFLAGS += -O3 -g
LUA_MYCFLAGS += -O3 -g
else
$(info valid config targets are: debug, tool, player)
$(error invalid or unspecified config target: config=$(LUTRO_CONFIG))
endif

CORE_DIR := .
Expand Down
Loading