clean up makefile

This commit is contained in:
Rokas Puzonas 2023-07-20 03:15:54 +03:00
parent 63627d9c7a
commit d9035d0eab

View File

@ -20,6 +20,9 @@ EXT :=
EMSDK_PATH := $(SUBMODULES_PATH)/emsdk
RAYLIB_PLATFORM := PLATFORM_DESKTOP
COMPILER_FLAGS += -I$(SUBMODULES_PATH)/raylib-cpp/include
COMPILER_FLAGS += -I$(SUBMODULES_PATH)/raylib/src
ifeq ($(OS), Windows_NT)
CXX ?= g++
THEN := &&
@ -67,9 +70,6 @@ ifeq ($(PLATFORM), web)
LIB_DEPENDENCIES += emsdk
endif
COMPILER_FLAGS += -I$(SUBMODULES_PATH)/raylib-cpp/include
COMPILER_FLAGS += -I$(SUBMODULES_PATH)/raylib/src
LINKER_FLAGS += -L$(RAYLIB_RELEASE_PATH)
MAIN_TARGET := $(BUILD_DIR)/$(EXECUTABLE)$(EXT)
@ -106,7 +106,6 @@ lib: submodules $(LIB_DEPENDENCIES)
emsdk: submodules
cd $(SUBMODULES_PATH)/emsdk $(THEN) ./emsdk install latest
cd $(SUBMODULES_PATH)/emsdk $(THEN) ./emsdk activate latest
# source $(SUBMODULES_PATH)/emsdk/emsdk_env.sh
# Link the program and create the executable
$(MAIN_TARGET): $(OBJECTS)
@ -118,7 +117,6 @@ endif
# Compile objects to the build directory
$(BUILD_DIR)/%.o: src/%.cpp Makefile
$(MKDIR) $(BUILD_DIR)
# \
$(CXX) -MMD -MP -c $(COMPILER_FLAGS) $< -o $@ $(CXXFLAGS) -D$(RAYLIB_PLATFORM)
# Run the executable