Browse Source

Add `EXTRA_FLAGS`, `EXTRA_CFLAGS`, `EXTRA_CXXFLAGS`, `EXTRA_LDFLAGS` to build system.

tags/v1.1.6
Andrew Belt 2 years ago
parent
commit
043401c3fc
1 changed files with 8 additions and 1 deletions
  1. +8
    -1
      compile.mk

+ 8
- 1
compile.mk View File

@@ -37,10 +37,17 @@ ifdef ARCH_WIN
CXXFLAGS += -Wsuggest-override
endif

# Allow *appending* rather than prepending to common flags.
# This is useful to force-redefine compiler settings instead of merely setting defaults that may be overwritten.
FLAGS += $(EXTRA_FLAGS)
CFLAGS += $(EXTRA_CFLAGS)
CXXFLAGS += $(EXTRA_CXXFLAGS)
LDFLAGS += $(EXTRA_LDFLAGS)

# Apply FLAGS to language-specific flags
CFLAGS += $(FLAGS)
CXXFLAGS += $(FLAGS)


# Derive object files from sources and place them before user-defined objects
OBJECTS := $(patsubst %, build/%.o, $(SOURCES)) $(OBJECTS)
OBJECTS += $(patsubst %, build/%.bin.o, $(BINARIES))


Loading…
Cancel
Save