blob: d13cc919d0d10911160dd16012e19bbad3b1556d [file] [log] [blame]
Brian Waters13d96012017-12-08 16:53:31 -06001OWRT_ENV_ROOT=/root/openwrt-env/openwrt
2STAGING_UCLIBC_ROOT=$(OWRT_ENV_ROOT)/staging_dir/target-mipsel_uClibc-0.9.31
3STAGING_GCC_ROOT=$(OWRT_ENV_ROOT)/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.31
4
5CFLAGS=-Os -pipe -mips32 -mtune=mips32 -funit-at-a-time -fhonour-copts -msoft-float -I$(STAGING_UCLIBC_ROOT)/usr/include -I$(STAGING_UCLIBC_ROOT)/include -I$(STAGING_GCC_ROOT)/usr/include -I$(STAGING_GCC_ROOT)/include
6LDFLAGS=-L$(STAGING_UCLIBC_ROOT)/usr/lib -L$(STAGING_UCLIBC_ROOT)/lib -L$(STAGING_GCC_ROOT)/usr/lib -L$(STAGING_GCC_ROOT)/lib
7
8GCC=mipsel-openwrt-linux-uclibc-gcc
9PATH:=$(STAGING_GCC_ROOT)/bin/:$(PATH)
10
11testcase: testcase.o
12 $(GCC) $(LDFLAGS) -lpthread testcase.o -o testcase
13
14testcase.o: testcase.c
15 $(GCC) $(CFLAGS) -o testcase.o -c testcase.c