mirror of
git://projects.qi-hardware.com/xburst-tools.git
synced 2024-11-01 16:25:20 +02:00
e140411424
This firmware is not meant to be executed on the host machine, so unset its executable bit. Noticed by lintian. While at it, teach stage1 builds to recover from interrupted builds by ensuring *stage1.bin are not present until all of the relevant commands have been run. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
41 lines
1.1 KiB
Makefile
41 lines
1.1 KiB
Makefile
#
|
|
# Authors: Wolfgang Spraul <wolfgang@sharism.cc>
|
|
#
|
|
# This program is free software; you can redistribute it and/or
|
|
# modify it under the terms of the GNU General Public License
|
|
# as published by the Free Software Foundation; either version
|
|
# 3 of the License, or (at your option) any later version.
|
|
#
|
|
|
|
ifeq ($(CROSS_COMPILE),)
|
|
$(error CROSS_COMPILE variable not set, should point to .../mipsel-openwrt-linux-)
|
|
endif
|
|
|
|
CFLAGS = -O2 -fno-unit-at-a-time -fno-zero-initialized-in-bss -mips32 -fno-pic \
|
|
-mno-abicalls -I$(INFLASH_SRC_PATH) -I$(XBURST_INCLUDE_PATH)
|
|
LDFLAGS = -nostdlib -EL -T target.ld
|
|
VPATH = ../target-common
|
|
|
|
OBJS = head.o stage1.o serial.o
|
|
|
|
all: stage1.bin
|
|
|
|
stage1.bin: stage1.elf
|
|
$(CROSS_COMPILE)objcopy -O binary $< $@+
|
|
$(CROSS_COMPILE)objdump -D $< > stage1.dump
|
|
$(CROSS_COMPILE)objdump -h $< > stage1.map
|
|
$(CROSS_COMPILE)nm -n $< > System.map
|
|
chmod -x $@+
|
|
mv -f $@+ $@
|
|
|
|
stage1.elf: $(OBJS)
|
|
$(CROSS_COMPILE)ld $(LDFLAGS) $(OBJS) -o $@
|
|
.c.o:
|
|
$(CROSS_COMPILE)gcc $(CFLAGS) -c $< -o $@
|
|
.S.o:
|
|
$(CROSS_COMPILE)gcc $(CFLAGS) -c $< -o $@
|
|
clean:
|
|
rm -f stage1.bin stage1.elf stage1.dump stage1.map
|
|
rm -f $(OBJS)
|
|
rm -f System.map
|