1CFLAGS := -Wall -g 2 3CC ?= /YOUPATH/buildroot/output/rockchip_rk3326_64/host/bin/aarch64-buildroot-linux-gnu-gcc 4SYSROOT ?= --sysroot=/YOUPATH/buildroot/output/rockchip_rk3326_64/host/aarch64-buildroot-linux-gnu/sysroot 5 6all: clean rkwifibt_test 7 8OBJS := \ 9 test/main.o \ 10 test/rk_wifi_test.o \ 11 test/bt_test.o \ 12 test/rk_ble_app.o \ 13 test/softap/softap.o 14 15ifeq ($(ARCH), arm64) 16#ARCH=arm64 17CFLAGS += -lpthread -lasound -L lib64/ -lrkwifibt -I include/ 18else 19#ARCH=arm 20CFLAGS += -lpthread -lasound -L lib32/ -lrkwifibt -I include/ 21endif 22 23rkwifibt_test: $(OBJS) 24 $(CC) -o rkwifibt_test $(OBJS) --sysroot=$(SYSROOT) $(CFLAGS) -fPIC 25 26%.o: %.c 27 $(CC) $(CFLAGS) -c $< -o $@ 28 29clean: 30 rm -f $(OBJS) rkwifibt_test 31