Skip to content

Compiling on MacOS 15.5 is not possible with the supplied Makefile #8

@ralph303

Description

@ralph303

The supplied makefile doesn't work on MacOS, because SDL2 is not found.

Here is a corrected makefile, maybe you can modify your makefile to work both on Windows and MacOS:

CC = clang -Wall -std=c99
CFLAGS = -arch arm64 -I/opt/homebrew/include -I/opt/homebrew/include/SDL2
LDFLAGS = -L/opt/homebrew/lib -lSDL2 -lSDL2_net
EXE = u64view

all: $(EXE)

SOURCE=*.c

$(EXE): $(SOURCE)
        $(CC) $(CFLAGS) -O2 $(SOURCE) -o $(EXE) $(LDFLAGS)

clean:
        rm -f $(EXE) *.o

If you want to compile this tool on MacOS you need:

  • xcode installed (in Terminal: xcode-select --install)
  • SDL2 installed (brew install sdl2)
  • SDL2_NET installed (brew install sdl2_net)
  • Clone the repository (git clone https://github.com/DusteDdk/u64view.git) and change to its directory (cd u64view)

Then it should work to compile it using "make" with the modified Makefile.

Edit:
You need to use TAB instead of blanks in the Makefile!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions