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
106dd89010SShuah Khanoverride define CLEAN
1122f6592bSBamvor Jian Zhang	$(RM) $(BINARIES)
126dd89010SShuah Khanendef
1322f6592bSBamvor Jian Zhang
1422f6592bSBamvor Jian ZhangCFLAGS += -O2 -g -std=gnu99 -Wall -I../../../../usr/include/
1522f6592bSBamvor Jian ZhangLDLIBS += -lmount -I/usr/include/libmount
1622f6592bSBamvor Jian Zhang
1722f6592bSBamvor Jian Zhang$(BINARIES): ../../../gpio/gpio-utils.o ../../../../usr/include/linux/gpio.h
1822f6592bSBamvor Jian Zhang
1922f6592bSBamvor Jian Zhang../../../gpio/gpio-utils.o:
2022f6592bSBamvor Jian Zhang	make ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C ../../../gpio
2122f6592bSBamvor Jian Zhang
2222f6592bSBamvor Jian Zhang../../../../usr/include/linux/gpio.h:
2322f6592bSBamvor Jian Zhang	make -C ../../../.. headers_install INSTALL_HDR_PATH=$(shell pwd)/../../../../usr/
2422f6592bSBamvor Jian Zhang
25