1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-01 13:50:36 +00:00

Reorganize, add CFLAGS_EXTRA

This commit is contained in:
Matthew Kilgore 2022-05-11 02:12:59 -04:00
parent 11ec9237a3
commit 10d12eddb8

View file

@ -1,24 +1,29 @@
# The extra tag to put on ./internal/temp and qbx.o when multiple instances are involved
TEMP_ID ?=
# Disable implicit rules
MAKEFLAGS += --no-builtin-rules
# Extra flags go at the beginning
# OS defaults to Linux if not provided
ifndef OS
OS := lnx
endif
# The extra tag to put on ./internal/temp and qbx.o when multiple instances are involved
# This is blank for the 'normal' files
TEMP_ID ?=
# Extra flags go at the beginning of the library list
#
# This is important for libraries, since they could potentially be referencing
# things from our dependencies
CXXFLAGS += $(CXXFLAGS_EXTRA)
CXXLIBS += $(CXXLIBS_EXTRA)
# There are no C lib flags, those all go in CXXLIBS
CFLAGS += $(CFLAGS_EXTRA)
EXE_OBJS :=
EXE_LIBS :=
ifndef OS
OS := lnx
endif
ifeq ($(OS),lnx)
PATH_INTERNAL := ./internal
PATH_INTERNAL_SRC := $(PATH_INTERNAL)/source
@ -28,6 +33,9 @@ ifeq ($(OS),lnx)
RM := rm -fr
OBJCOPY := objcopy
FIXPATH = $1
# Check bitness by getting length of `long
# 64 bits on x86_64, 32 bits on x86
BITS := $(shell getconf LONG_BIT)
ifeq ($(BITS),)
@ -50,6 +58,8 @@ ifeq ($(OS),win)
ICON_OBJ := $(PATH_INTERNAL_TEMP)\icon.o
RM := del /Q
FIXPATH = $(subst /,\,$1)
# Check bitness by seeing which compiler we have
ifeq ($(wildcard $(PATH_INTERNAL_C)\c_compiler\i686-w64-mingw32),)
BITS := 64
else