#--------------------------------------------------------------------------------- # the prefix on the compiler executables #--------------------------------------------------------------------------------- PREFIX := powerpc-gekko- export CC := $(PREFIX)gcc export CXX := $(PREFIX)g++ export AR := $(PREFIX)ar export OBJCOPY := $(PREFIX)objcopy define adjustdepends cp $(DEPSDIR)/$*.d $(DEPSDIR)/$*.P; sed -e 's/#.*//' -e 's/^[^:]*: \+//' -e 's/^ *//' -e 's/ *\\$$//' -e '/^$$/ d' -e 's/$$/ :/' < $(DEPSDIR)/$*.P >> $(DEPSDIR)/$*.d; rm $(DEPSDIR)/$*.P endef #--------------------------------------------------------------------------------- %.a: #--------------------------------------------------------------------------------- @echo $(notdir $@) @rm -f $@ @$(AR) -rc $@ $^ #--------------------------------------------------------------------------------- %.o: %.cpp @echo $(notdir $<) @$(CXX) -MMD -MF $(DEPSDIR)/$*.d $(CXXFLAGS) -c $< -o $@ @$(adjustdepends) #--------------------------------------------------------------------------------- %.o: %.c @echo $(notdir $<) @$(CC) -MMD -MF $(DEPSDIR)/$*.d $(CFLAGS) -c $< -o $@ @$(adjustdepends) #--------------------------------------------------------------------------------- %.o: %.s @echo $(notdir $<) @$(CC) -MMD -MF $(DEPSDIR)/$*.d -x assembler-with-cpp $(ASFLAGS) -c $< -o $@ @$(adjustdepends) #--------------------------------------------------------------------------------- %.o: %.S @echo $(notdir $<) @$(CC) -MMD -MF $(DEPSDIR)/$*.d -x assembler-with-cpp $(ASFLAGS) -c $< -o $@ @$(adjustdepends) #--------------------------------------------------------------------------------- # canned command sequence for binary data #--------------------------------------------------------------------------------- define bin2o bin2s -a 32 $< | $(AS) -o $(@) echo "extern const u8" `(echo $( `(echo $(> `(echo $(> `(echo $(