From 2ed7dfe046395c9a5bd11f771fa5b0355a7155c8 Mon Sep 17 00:00:00 2001 From: niansa/tuxifan Date: Wed, 24 Feb 2021 18:40:14 +0100 Subject: [PATCH] Fixed compilation of .cpp files on systems other than windows (#34) * Fixed compilation of .cpp files on systems other than windows * FIxed C++ linking for platforms other than Windows * Links with C++ only if there are any C++ files --- Makefile | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index ab0dff3..0541ca0 100644 --- a/Makefile +++ b/Makefile @@ -282,10 +282,6 @@ endif GENERATED_C_FILES := $(BUILD_DIR)/assets/mario_anim_data.c $(BUILD_DIR)/assets/demo_data.c \ $(addprefix $(BUILD_DIR)/bin/,$(addsuffix _skybox.c,$(notdir $(basename $(wildcard textures/skyboxes/*.png))))) -ifeq ($(TARGET_WINDOWS),0) - CXX_FILES := -endif - ifneq ($(TARGET_N64),1) ULTRA_C_FILES := \ alBnkfNew.c \ @@ -430,10 +426,10 @@ ifneq ($(TARGET_WEB),1) else CC := emcc endif -ifeq ($(TARGET_WINDOWS),1) - LD := $(CXX) -else +ifeq ($(CXX_FILES),"") LD := $(CC) +else + LD := $(CXX) endif CPP := cpp -P OBJDUMP := objdump