crashtest-r0ket/tools/reader/Makefile

34 lines
652 B
Makefile
Raw Normal View History

2012-05-31 15:23:18 +00:00
ifneq "$(TUPLE)" ""
PREFIX=$(TUPLE)-
ARCH=$(shell echo $(TUPLE)|sed 's/-.*//')
else
PREFIX=
ARCH=$(shell uname -m)
endif
CC = $(PREFIX)gcc
STRIP = $(PREFIX)strip
2012-05-30 18:49:40 +00:00
CFLAGS = -Wall -O2
EXE = obreader
FILES = obreader.c
2012-06-03 09:35:44 +00:00
$(ARCH)-$(EXE): $(FILES)
2012-05-31 15:23:18 +00:00
$(CC) $(CFLAGS) -o $@ $(FILES)
$(STRIP) $@
# Using OpenWRT crossbuild environment, see
# <URL:http://wiki.openwrt.org/doc/devel/crosscompile>
# for setup instructions.
WRT=~/r0ket/openwrt/trunk/staging_dir
2012-06-03 09:35:44 +00:00
STAGING_DIR=$(WRT)/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2
2012-05-31 15:23:18 +00:00
mips:
2012-06-03 09:35:44 +00:00
STAGING_DIR=$(STAGING_DIR) \
2012-05-31 15:23:18 +00:00
PATH=${PATH}:$(STAGING_DIR)/bin \
$(MAKE) TUPLE=mips-openwrt-linux
2012-05-30 18:49:40 +00:00
clean:
2012-05-31 15:23:18 +00:00
rm -f *-$(EXE)