Brian Waters | 13d9601 | 2017-12-08 16:53:31 -0600 | [diff] [blame] | 1 | OWRT_ENV_ROOT=/root/openwrt-env/openwrt |
| 2 | STAGING_UCLIBC_ROOT=$(OWRT_ENV_ROOT)/staging_dir/target-mipsel_uClibc-0.9.31 |
| 3 | STAGING_GCC_ROOT=$(OWRT_ENV_ROOT)/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.31 |
| 4 | |
| 5 | CFLAGS=-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 |
| 6 | LDFLAGS=-L$(STAGING_UCLIBC_ROOT)/usr/lib -L$(STAGING_UCLIBC_ROOT)/lib -L$(STAGING_GCC_ROOT)/usr/lib -L$(STAGING_GCC_ROOT)/lib |
| 7 | |
| 8 | GCC=mipsel-openwrt-linux-uclibc-gcc |
| 9 | PATH:=$(STAGING_GCC_ROOT)/bin/:$(PATH) |
| 10 | |
| 11 | testcase: testcase.o |
| 12 | $(GCC) $(LDFLAGS) -lpthread testcase.o -o testcase |
| 13 | |
| 14 | testcase.o: testcase.c |
| 15 | $(GCC) $(CFLAGS) -o testcase.o -c testcase.c |