9 EXE := $(RUNDIR)/lugaru-bin
18 #OPT := -O3 -fno-strict-aliasing -falign-loops=16 -fno-math-errno
19 #OPT := -Os -fno-strict-aliasing
21 # always use this on the Mac, even in debug builds, since we aren't building
22 # a dylib at this point.
23 ifeq ($(strip $(macosx)),true)
24 OPT += -mdynamic-no-pic
38 CFLAGS := -g -c $(OPT) $(INCLUDES) $(DEFINES) -fsigned-char
41 ifeq ($(strip $(macosx)),true)
42 CFLAGS += -fpascal-strings -faltivec -fasm -force_cpusubtype_ALL -Wno-long-double -mdynamic-no-pic
43 CFLAGS += -DPLATFORM_BIGENDIAN=1 -DMACOSX=1 -DPLATFORM_MACOSX=1
44 LDFLAGS := -framework Cocoa -framework OpenGL -framework IOKit -framework CoreFoundation -framework Carbon
45 APPLDFLAGS := $(SDLDIR)/lib/libSDL-1.2.0.dylib $(SDLDIR)/lib/libSDLmain-osx.a
47 CFLAGS += -DPLATFORM_LINUX=1
48 #CFLAGS += -msse -mmmx
79 MacCompatibility.cpp \
87 OBJS := $(SRCS:.cpp=.o)
90 OBJS := $(foreach f,$(OBJS),$(BINDIR)/$(f))
91 SRCS := $(foreach f,$(SRCS),$(SRCDIR)/$(f))
98 $(BINDIR)/%.o : $(SRCDIR)/%.cpp
99 $(CXX) -o $@ $(CXXFLAGS) $<
101 $(BINDIR)/%.o : $(SRCDIR)/%.CC
102 $(CXX) -o $@ $(CXXFLAGS) $<
104 $(BINDIR)/%.o : $(SRCDIR)/%.m
105 $(CC) -o $@ $(CFLAGS) $<
107 $(BINDIR)/%.o : $(SRCDIR)/%.c
108 $(CC) -o $@ $(CFLAGS) $<
110 $(EXE) : $(OBJS) $(APPOBJS)
111 ifeq ($(strip $(macosx)),true)
112 ranlib $(SDLDIR)/lib/libSDLmain-osx.a
113 ranlib $(FREETYPEDIR)/lib/libfreetype-osx.a
115 $(LD) -o $@ $(APPLDFLAGS) $(LDFLAGS) $(OBJS) $(APPOBJS)
121 # end of makefile ...