SFML community forums
General => General discussions => Topic started by: schmedly on September 11, 2007, 05:05:31 pm
-
For anyone interested, the Mac port of SFML is available in subversion.
Laurent has been waiting patiently to package up everything and he should have the distributables ready to go very soon.
-
How to compile the samples from the tutorials under mac os x with g++ ?
-
Finally, i used this makefile, maybe there is a better way...
And I rename all the sfml libs with the lib prefix, for example, i rename sfml-window.a libsfml-window.a
DEBUG=yes
CC = g++
ifeq ($(DEBUG),yes)
CFLAGS = -W -Wall -ansi -pedantic -g -I/Users/loulou/Dev/Games/SFML-1.1/include -I/Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include/
LDFLAGS = -L/Users/loulou/Dev/Games/SFML-1.1/lib -L"/System/Library/Frameworks/OpenGL.framework/Libraries" -lsfml-window-d -lsfml-system-d -lGL -lGLU
else
CFLAGS = -W -Wall -ansi -pedantic -I/Users/loulou/Dev/Games/SFML-1.1/include
LDFLAGS =
endif
FRAMEWORK = -framework OpenGL -framework Carbon -framework IOKit -framework AGL
EXEC = Zelda
SRC=$(wildcard *.cpp)
OBJ = $(SRC:.cpp=.o)
all : $(EXEC)
ifeq ($(DEBUG),yes)
@echo "Génération en mode debug"
else
@echo "Génération en modrelease"
endif
$(EXEC) : $(OBJ)
$(CC) $(FRAMEWORK) $(OBJ) -o $(EXEC) $(LDFLAGS)
%.o: %.cpp
$(CC) -o $@ -c $< $(CFLAGS)
clean:
@rm -rf *.o
mrproper: clean
@rm -rf $(EXEC)