Skip to content

Cross-platform support #4

@roh1th-s

Description

@roh1th-s

This project in its current state works exclusively on Windows. To make it more accessible, we need to support other platforms, starting with Linux and potentially extending to MacOS. This will likely require minor code modifications to accommodate OS-specific APIs and headers. Also, the Makefile provided is configured for Windows (MSYS2/MinGW) only - it needs to be extended to other platforms.

Make sure you can test build on the platforms you're adding support for.

  • Use conditional compilation (i.e with #ifdef etc) for OS specific stuff.
  • You need to link to different libraries depending on the platform, eg. -lGLU -lGL -lm is required on Linux.
  • The libraries provided in /lib were built for x64 Windows in an MSYS2 environment. You will need to obtain equivalent binaries for other platforms.
  • Support for Linux is essential, bonus points if you can get it to work on MacOS.
  • Helpful snippet for OS detection in a Makefile:
    ifeq ($(OS),Windows_NT) # OS is a preexisting environment variable on Windows
        OS = windows
    else
        UNAME := $(shell uname -s)
        ifeq ($(UNAME),Darwin)
      	  OS = macos
        else ifeq ($(UNAME),Linux)
      	  OS = linux
        else
      	  $(error OS not supported by this Makefile)
        endif
    endif

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions