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
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
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
....
nothing on samples/makefile because path to user/local/xxx is already there
HTH