From 1878e96232a96987b8a7335842ab94d7100e9b47 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Sun, 25 Mar 2018 10:58:34 -0400 Subject: [PATCH] Reorder SOURCE_OBJECTS --- compile.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compile.mk b/compile.mk index 58ddc082..22b4899f 100644 --- a/compile.mk +++ b/compile.mk @@ -43,13 +43,13 @@ CXXFLAGS += $(FLAGS) # Derive object files from sources and place them before user-defined objects -OBJECTS += $(patsubst %, build/%.o, $(SOURCES)) +SOURCE_OBJECTS := $(patsubst %, build/%.o, $(SOURCES)) DEPENDENCIES := $(patsubst %, build/%.d, $(SOURCES)) # Final targets -$(TARGET): $(OBJECTS) - $(CXX) -o $@ $(OBJECTS) $(LDFLAGS) +$(TARGET): $(SOURCE_OBJECTS) $(OBJECTS) + $(CXX) -o $@ $^ $(LDFLAGS) -include $(DEPENDENCIES)