SFML community forums

Help => General => Topic started by: oopi on December 16, 2013, 03:05:11 pm

Title: Linux sfml-app to OSX using makefile
Post by: oopi on December 16, 2013, 03:05:11 pm
Hi everybody!

I participated to a project where we wrote game using SFML-2.1 in linux environment. While under deadlines I focused mainly on making things that helped to get the project to its destination, but now, past the deadlines, I would like to continue the development with my mac. I have got SFML working through xcode, but in our project we used makefiles and I would like to continue using them. So how should i modify the linux makefile to get things working in OSX?

Makefile:

CC=g++
CFLAGS=-c -std=c++0x -pedantic -Wall -Wextra -D_GLIBCXX_DEBUG -g
LDFLAGS=
SFML=-lsfml-audio -lsfml-graphics -lsfml-window -lsfml-system -lsfml-network
DIRS=-I .
SOURCES=...
MAIN=main.cc
TESTS=...
SOURCES_O=$(TMP:.cpp=.o)
MAIN_O=$(MAIN:.cc=.o)
TESTS_O=$(TESTS:.cc=.o)
EXECUTABLE=game
...


I tried different CFLAGS and things like SFML=-framework SFML -framework sfml-audio -framework sfml-system -framework sfml-window -framework sfml-graphics -framework sfml, but no luck yet. If you are an OSX user, could you share your makefile set up with SFML?
Title: Re: Linux sfml-app to OSX using makefile
Post by: Hiura on December 23, 2013, 05:06:43 pm
I tried different CFLAGS and things like SFML=-framework SFML -framework sfml-audio -framework sfml-system -framework sfml-window -framework sfml-graphics -framework sfml, but no luck yet.

It should work. But in your sample I don't see where $SFML is used..

You can also install the dylibs and it will work very similarly than on Linux.