Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Linux sfml-app to OSX using makefile  (Read 1699 times)

0 Members and 1 Guest are viewing this topic.

oopi

  • Newbie
  • *
  • Posts: 1
    • View Profile
Linux sfml-app to OSX using makefile
« 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?

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Linux sfml-app to OSX using makefile
« Reply #1 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.
SFML / OS X developer