Skip to content

Build not working on MacOSX with brew #71

Description

@KanedaFr

I was unable to make it works with -framework SDL2 using raw GCC
I don't know if it works with XCode but on CLI, no way to do it

To make it works with brew, i had to

  • brew install libpng
  • brew install sdl2
  • update src/Makefile
    ifeq ($(name),Darwin)
    INCPATH = ../include -I/usr/local/include/
    LIBS = -lpng -lz -lc
    BIN = libTilengine.dylib
    LDFLAGS = -dynamiclib $(shell /usr/local/bin/sdl2-config --libs)
    LIBPATH = /usr/local/lib/
    endif
    ....
    CFLAGS += -I$(INCPATH) $(shell /usr/local/bin/sdl2-config --cflags) -std=c99 -O2 -fpic -
    DLIB_EXPORTS
    ....
    $(BIN): $(OBJECTS)
    $(CC) -shared $(OBJECTS) -o $(BIN) $(LIBS) $(LDFLAGS) -fvisibility=hidden

nothing on samples/makefile because path to user/local/xxx is already there

HTH

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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