1
General discussions / Mac port is ready
« on: October 05, 2007, 09:12:35 am »
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
And I rename all the sfml libs with the lib prefix, for example, i rename sfml-window.a libsfml-window.a
Code: [Select]
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)