]> git.ozlabs.org Git - yaboot.git/blobdiff - Makefile
Fix Cross-compile
[yaboot.git] / Makefile
index 91b8e7ab0c7951a389aa390a4c05a4db1015d928..2271944d330b9c81e36d420693d494dd3809deb6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@
 
 include Config
 
-VERSION = 1.3.6
+VERSION = 1.3.13
 # Debug mode (spam/verbose)
 DEBUG = 0
 # make install vars
@@ -28,9 +28,14 @@ KERNELADDR   = 0x01400000
 #
 CROSS = 
 
+CC             := $(CROSS)gcc
+LD             := $(CROSS)ld
+AS             := $(CROSS)as
+OBJCOPY                := $(CROSS)objcopy
+
 # The flags for the yaboot binary.
 #
-YBCFLAGS = -Os $(CFLAGS) -nostdinc -Wall -isystem `gcc -print-file-name=include` -fsigned-char
+YBCFLAGS = -Os $(CFLAGS) -nostdinc -Wall -isystem `$(CC) -print-file-name=include` -fsigned-char
 YBCFLAGS += -DVERSION=\"${VERSION}\"   #"
 YBCFLAGS += -DTEXTADDR=$(TEXTADDR) -DDEBUG=$(DEBUG)
 YBCFLAGS += -DMALLOCADDR=$(MALLOCADDR) -DMALLOCSIZE=$(MALLOCSIZE)
@@ -94,11 +99,6 @@ OBJS += second/fs_reiserfs.o
 endif
 
 # compilation
-CC             := $(CROSS)gcc
-LD             := $(CROSS)ld
-AS             := $(CROSS)as
-OBJCOPY                := $(CROSS)objcopy
-
 lgcc = `$(CC) -print-libgcc-file-name`
 
 all: yaboot addnote mkofboot
@@ -148,19 +148,25 @@ bindist: all
 
 clean:
        rm -f second/yaboot util/addnote util/elfextract $(OBJS)
-       find . -name '#*' | xargs rm -f
-       find . -name '.#*' | xargs rm -f
-       find . -name '*~' | xargs rm -f
-       find . -name '*.swp' | xargs rm -f
+       find . -not -path './\{arch\}*' -name '#*' | xargs rm -f
+       find . -not -path './\{arch\}*' -name '.#*' | xargs rm -f
+       find . -not -path './\{arch\}*' -name '*~' | xargs rm -f
+       find . -not -path './\{arch\}*' -name '*.swp' | xargs rm -f
+       find . -not -path './\{arch\}*' -name ',,*' | xargs rm -rf
        -gunzip man/*.gz
        rm -rf man.deb
-       chmod 755 ybin/ybin ybin/ofpath ybin/yabootconfig
-       chmod -R u+rwX,go=rX .
-       chmod a-w COPYING
 
 cleandocs:
        make -C doc clean
 
+## removes arch revision control crap, only to be called for making
+## release tarballs.  arch should have a export command like cvs...
+
+archclean:
+       rm -rf '{arch}'
+       find . -type d -name .arch-ids | xargs rm -rf
+       rm -f 0arch-timestamps0
+
 maintclean: clean cleandocs
 
 release: docs bindist clean