122f6592bSBamvor Jian Zhang
222f6592bSBamvor Jian ZhangTEST_PROGS := gpio-mockup.sh
322f6592bSBamvor Jian ZhangTEST_FILES := gpio-mockup-sysfs.sh $(BINARIES)
422f6592bSBamvor Jian ZhangBINARIES := gpio-mockup-chardev
522f6592bSBamvor Jian Zhang
622f6592bSBamvor Jian Zhanginclude ../lib.mk
722f6592bSBamvor Jian Zhang
822f6592bSBamvor Jian Zhangall: $(BINARIES)
922f6592bSBamvor Jian Zhang
1022f6592bSBamvor Jian Zhangclean:
1122f6592bSBamvor Jian Zhang	$(RM) $(BINARIES)
1222f6592bSBamvor Jian Zhang
1322f6592bSBamvor Jian ZhangCFLAGS += -O2 -g -std=gnu99 -Wall -I../../../../usr/include/
1422f6592bSBamvor Jian ZhangLDLIBS += -lmount -I/usr/include/libmount
1522f6592bSBamvor Jian Zhang
1622f6592bSBamvor Jian Zhang$(BINARIES): ../../../gpio/gpio-utils.o ../../../../usr/include/linux/gpio.h
1722f6592bSBamvor Jian Zhang
1822f6592bSBamvor Jian Zhang../../../gpio/gpio-utils.o:
1922f6592bSBamvor Jian Zhang	make ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C ../../../gpio
2022f6592bSBamvor Jian Zhang
2122f6592bSBamvor Jian Zhang../../../../usr/include/linux/gpio.h:
2222f6592bSBamvor Jian Zhang	make -C ../../../.. headers_install INSTALL_HDR_PATH=$(shell pwd)/../../../../usr/
2322f6592bSBamvor Jian Zhang
24