Fixing Makefils bugs and changing headers way.
This commit is contained in:
parent
b757ce34ec
commit
cb419be11e
|
|
@ -8,8 +8,8 @@ CORE_SOURCES := \
|
|||
|
||||
# Compiler and flags
|
||||
CORE_CC = gcc
|
||||
#CORE_CFLAGS = -std=c17 -pedantic -O3 -fPIC -DASSET_FILENAME=$(ASSET_OUTPUT) $(shell pkg-config --cflags sdl2 SDL2_image) # RELEASE
|
||||
CORE_CFLAGS = -std=c17 --pedantic -g -fPIC -DASSET_FILENAME=$(BUILD_DIR)/$(ASSET_OUTPUT) $(shell pkg-config --cflags sdl2 SDL2_image) \
|
||||
#CORE_CFLAGS = --std=c17 --pedantic -O3 -DASSET_FILE_NAME=\"$(ASSET_OUTPUT)\" $(shell pkg-config --cflags sdl2) # RELEASE
|
||||
CORE_CFLAGS = --std=c17 --pedantic -O1 -g -DASSET_FILE_NAME=\"$(ASSET_OUTPUT)\" $(shell pkg-config --cflags sdl2) \
|
||||
-Wall -Wno-missing-braces -Wextra -Wno-missing-field-initializers \
|
||||
-Wformat=2 -Wswitch-default -Wswitch-enum -Wcast-align \
|
||||
-Wpointer-arith -Wbad-function-cast -Wstrict-overflow=5 \
|
||||
|
|
@ -19,6 +19,8 @@ CORE_CFLAGS = -std=c17 --pedantic -g -fPIC -DASSET_FILENAME=$(BUILD_DIR)/$(ASSET
|
|||
-Wold-style-definition # DEVELOPEMENT
|
||||
|
||||
CORE_INCLUDE_DIRS = $(CORE_DIR)/headers
|
||||
CORE_INCLUDE_DIRS := $(addprefix -I, $(CORE_INCLUDE_DIRS))
|
||||
|
||||
CORE_AR = ar
|
||||
CORE_ARFLAGS =
|
||||
|
||||
|
|
@ -53,7 +55,7 @@ $(BUILD_DIR)/$(CORE_DIR)/%.o: $(CORE_DIR)/%.c
|
|||
$(eval CURRENT_CORE_FILE := $(shell echo $$(($(CURRENT_CORE_FILE)+1))))
|
||||
$(eval PERCENTAGE := $(shell echo $$(($(CURRENT_CORE_FILE)*100/$(TOTAL_CORE_FILES)))))
|
||||
@echo -e "[$(PERCENTAGE)%] $(GREEN)Building C object $@$(RESET)"
|
||||
$(Q)$(CORE_CC) $(CORE_CFLAGS) $(CORE_INCLUDE_DIRS:%=-I%) -MMD -MP -c $< -o $@
|
||||
$(Q)$(CORE_CC) $(CORE_CFLAGS) $(CORE_INCLUDE_DIRS) -MMD -MP -c $< -o $@
|
||||
|
||||
# Print ending message
|
||||
core_end: $(CORE_OUTPUT)
|
||||
|
|
|
|||
Loading…
Reference in New Issue