revert between 56095 -> 55830 in arch
[AROS.git] / arch / ppc-chrp / boot / openfirmware / src / Makefile
blob446d6a92ed93bd9795db35d401ba46aaef285409
1 # $Id: Makefile 51 2008-03-20 15:51:17Z michalsc $
3 FILES := bootstrap of1275 support menu elf gpr
4 TARGETDIR := .obj
6 all: depend ../bin/bootloader
8 ../bin/bootloader: $(foreach f, $(FILES), $(TARGETDIR)/$(f).o)
9 @if [ ! -d ../bin ]; then mkdir ../bin; fi
10 @echo "Linking kernel"
11 @$(LD) -N -e bootstrap -T ldscript.lds -o $@ $(foreach f, $(FILES), $(TARGETDIR)/$(f).o)
14 # @$(STRIP) -R.note -R.comment --strip-unneeded "$@"
16 $(TARGETDIR)/%.o: %.c
17 @if [ ! -d "$(TARGETDIR)" ]; then mkdir .obj; fi
18 @echo -n "Compiling $< "
19 @if $(CC) $(CFLAGS) -DVERSION=\"`svn info --xml |grep revision=\" | head -n 1 | sed -e 's|[^"]*"||' -e 's|"[^"]*||'`\" $(INCLUDES) -c $< -o $@; then echo "done"; else echo "failed"; exit 1; fi
21 $(TARGETDIR)/%.d: %.c
22 @if [ ! -d $(TARGETDIR) ]; then mkdir $(TARGETDIR); fi
23 @echo "Make depend $<"
24 @$(CC) $(CFLAGS) -DVERSION=\"`svn info --xml |grep revision=\" | head -n 1 | sed -e 's|[^"]*"||' -e 's|"[^"]*||'`\" $(INCLUDES) -MM $< > $@.$$$$; \
25 sed 's#^.*\.o:#$(TARGETDIR)/&#' < $@.$$$$ | sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' > $@; rm -f $@.$$$$
27 clean:
28 -rm -rf $(TARGETDIR)
30 depend: $(foreach f, $(FILES), $(TARGETDIR)/$(f).d)
32 -include $(foreach f, $(FILES), $(TARGETDIR)/$(f).d)