Browse Source

Include CXXFLAGS in build command for target.

tags/v2.5.2
Andrew Belt 6 months ago
parent
commit
1fb9af25dc
2 changed files with 5 additions and 7 deletions
  1. +1
    -4
      compile.mk
  2. +4
    -3
      dep.mk

+ 1
- 4
compile.mk View File

@@ -23,7 +23,6 @@ CXXFLAGS += -std=c++11
# Define compiler/linker target if cross-compiling # Define compiler/linker target if cross-compiling
ifdef CROSS_COMPILE ifdef CROSS_COMPILE
FLAGS += --target=$(MACHINE) FLAGS += --target=$(MACHINE)
LDFLAGS += --target=$(MACHINE)
endif endif


# Architecture-independent flags # Architecture-independent flags
@@ -39,10 +38,8 @@ ifdef ARCH_LIN
endif endif
ifdef ARCH_MAC ifdef ARCH_MAC
CXXFLAGS += -stdlib=libc++ CXXFLAGS += -stdlib=libc++
LDFLAGS += -stdlib=libc++
MAC_SDK_FLAGS := -mmacosx-version-min=10.9 MAC_SDK_FLAGS := -mmacosx-version-min=10.9
FLAGS += $(MAC_SDK_FLAGS) FLAGS += $(MAC_SDK_FLAGS)
LDFLAGS += $(MAC_SDK_FLAGS)
endif endif
ifdef ARCH_WIN ifdef ARCH_WIN
FLAGS += -D_USE_MATH_DEFINES FLAGS += -D_USE_MATH_DEFINES
@@ -69,7 +66,7 @@ DEPENDENCIES := $(patsubst %, build/%.d, $(SOURCES))
# Final targets # Final targets


$(TARGET): $(OBJECTS) $(TARGET): $(OBJECTS)
$(CXX) -o $@ $^ $(LDFLAGS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^


-include $(DEPENDENCIES) -include $(DEPENDENCIES)




+ 4
- 3
dep.mk View File

@@ -13,7 +13,6 @@ DEP_FLAGS += -fPIC
# Define compiler/linker target if cross-compiling # Define compiler/linker target if cross-compiling
ifdef CROSS_COMPILE ifdef CROSS_COMPILE
DEP_FLAGS += --target=$(MACHINE) DEP_FLAGS += --target=$(MACHINE)
DEP_LDFLAGS += --target=$(MACHINE)
endif endif


ifdef ARCH_X64 ifdef ARCH_X64
@@ -25,12 +24,14 @@ endif


ifdef ARCH_MAC ifdef ARCH_MAC
DEP_MAC_SDK_FLAGS := -mmacosx-version-min=10.9 DEP_MAC_SDK_FLAGS := -mmacosx-version-min=10.9
DEP_FLAGS += $(DEP_MAC_SDK_FLAGS) -stdlib=libc++
DEP_LDFLAGS += $(DEP_MAC_SDK_FLAGS) -stdlib=libc++
DEP_FLAGS += $(DEP_MAC_SDK_FLAGS)
DEP_CXXFLAGS += -stdlib=libc++
DEP_LDFLAGS += -stdlib=libc++
endif endif


DEP_CFLAGS += $(DEP_FLAGS) DEP_CFLAGS += $(DEP_FLAGS)
DEP_CXXFLAGS += $(DEP_FLAGS) DEP_CXXFLAGS += $(DEP_FLAGS)
DEP_LDFLAGS += $(DEP_FLAGS)


# Commands # Commands
WGET := wget -c WGET := wget -c


Loading…
Cancel
Save