]> git.jsancho.org Git - lugaru.git/blobdiff - makefile
Use a crosstool compiler.
[lugaru.git] / makefile
index 90f109cdaedbadc13f587d22e657bfc725cb4360..f80119f61f935bb71bfe561d3e7a766505d4f372 100644 (file)
--- a/makefile
+++ b/makefile
@@ -16,11 +16,11 @@ LIBVORBISDIR := libvorbis-1.0.1
 
 EXE := $(RUNDIR)/lugaru-bin
 
-CXX := ccache g++
-CC := ccache gcc
+CXX := ccache /opt/crosstool/gcc-4.1.2-glibc-2.3.6/i686-unknown-linux-gnu/i686-unknown-linux-gnu/bin/g++
+CC := ccache /opt/crosstool/gcc-4.1.2-glibc-2.3.6/i686-unknown-linux-gnu/i686-unknown-linux-gnu/bin/gcc
 #CXX := g++
 #CC := gcc
-LD := g++
+LD := /opt/crosstool/gcc-4.1.2-glibc-2.3.6/i686-unknown-linux-gnu/i686-unknown-linux-gnu/bin/g++
 
 #OPT := -O0
 OPT := -O3 -fno-strict-aliasing -falign-loops=16 -fno-math-errno
@@ -263,21 +263,27 @@ OBJS := $(foreach f,$(OBJS),$(BINDIR)/$(f))
 all : $(EXE)
 
 $(BINDIR)/%.o : %.cpp
+       @mkdir -p $(dir $@)
        $(CXX) -o $@ $(CXXFLAGS) $<
 
 $(BINDIR)/%.o : %.CC
+       @mkdir -p $(dir $@)
        $(CXX) -x c++ -o $@ $(CXXFLAGS) $<
 
 $(BINDIR)/%.o : %.cc
+       @mkdir -p $(dir $@)
        $(CXX) -o $@ $(CXXFLAGS) $<
 
 $(BINDIR)/%.o : %.m
+       @mkdir -p $(dir $@)
        $(CC) -o $@ $(CFLAGS) $<
 
 $(BINDIR)/%.o : %.c
+       @mkdir -p $(dir $@)
        $(CC) -o $@ $(CFLAGS) $<
 
 $(EXE) : $(OBJS) $(APPOBJS)
+       @mkdir -p $(dir $@)
 ifeq ($(strip $(macosx)),true)
        ranlib $(SDLDIR)/lib/libSDLmain-osx.a
        ranlib $(FREETYPEDIR)/lib/libfreetype-osx.a