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
36 CFLAGS := -w -g -c $(OPT) $(INCLUDES) $(DEFINES) -fsigned-char
38 ifeq ($(strip $(macosx)),true)
39 CFLAGS += -fpascal-strings -faltivec -fasm -force_cpusubtype_ALL -Wno-long-double -mdynamic-no-pic
40 CFLAGS += -DPLATFORM_BIGENDIAN=1 -DMACOSX=1 -DPLATFORM_MACOSX=1
41 LDFLAGS := -framework Cocoa -framework OpenGL -framework IOKit -framework CoreFoundation -framework Carbon
42 APPLDFLAGS := $(SDLDIR)/lib/libSDL-1.2.0.dylib $(SDLDIR)/lib/libSDLmain-osx.a
44 CFLAGS += -DPLATFORM_LINUX=1
45 #CFLAGS += -msse -mmmx
83 OBJS := $(SRCS:.cpp=.o)
86 OBJS := $(foreach f,$(OBJS),$(BINDIR)/$(f))
87 SRCS := $(foreach f,$(SRCS),$(SRCDIR)/$(f))
94 $(BINDIR)/%.o : $(SRCDIR)/%.cpp
95 $(CXX) -o $@ $(CXXFLAGS) $<
97 $(BINDIR)/%.o : $(SRCDIR)/%.CC
98 $(CXX) -o $@ $(CXXFLAGS) $<
100 $(BINDIR)/%.o : $(SRCDIR)/%.m
101 $(CC) -o $@ $(CFLAGS) $<
103 $(BINDIR)/%.o : $(SRCDIR)/%.c
104 $(CC) -o $@ $(CFLAGS) $<
106 $(EXE) : $(OBJS) $(APPOBJS)
107 ifeq ($(strip $(macosx)),true)
108 ranlib $(SDLDIR)/lib/libSDLmain-osx.a
109 ranlib $(FREETYPEDIR)/lib/libfreetype-osx.a
111 $(LD) -o $@ $(APPLDFLAGS) $(LDFLAGS) $(OBJS) $(APPOBJS)
117 # end of makefile ...