Bamvor Jian Zhang | 22f6592 | 2016-11-21 18:16:11 +0800 | [diff] [blame] | 1 | |
| 2 | TEST_PROGS := gpio-mockup.sh |
| 3 | TEST_FILES := gpio-mockup-sysfs.sh $(BINARIES) |
| 4 | BINARIES := gpio-mockup-chardev |
Shuah Khan | 51c6bd7 | 2017-04-21 18:01:51 -0600 | [diff] [blame] | 5 | EXTRA_PROGS := ../gpiogpio-event-mon ../gpiogpio-hammer ../gpiolsgpio |
| 6 | EXTRA_DIRS := ../gpioinclude/ |
| 7 | EXTRA_OBJS := ../gpiogpio-event-mon-in.o ../gpiogpio-event-mon.o |
| 8 | EXTRA_OBJS += ../gpiogpio-hammer-in.o ../gpiogpio-utils.o ../gpiolsgpio-in.o |
| 9 | EXTRA_OBJS += ../gpiolsgpio.o |
Bamvor Jian Zhang | 22f6592 | 2016-11-21 18:16:11 +0800 | [diff] [blame] | 10 | |
| 11 | include ../lib.mk |
| 12 | |
| 13 | all: $(BINARIES) |
| 14 | |
Shuah Khan | 6dd8901 | 2017-04-21 16:19:50 -0600 | [diff] [blame] | 15 | override define CLEAN |
Shuah Khan | 51c6bd7 | 2017-04-21 18:01:51 -0600 | [diff] [blame] | 16 | $(RM) $(BINARIES) $(EXTRA_PROGS) $(EXTRA_OBJS) |
| 17 | $(RM) -r $(EXTRA_DIRS) |
Shuah Khan | 6dd8901 | 2017-04-21 16:19:50 -0600 | [diff] [blame] | 18 | endef |
Bamvor Jian Zhang | 22f6592 | 2016-11-21 18:16:11 +0800 | [diff] [blame] | 19 | |
| 20 | CFLAGS += -O2 -g -std=gnu99 -Wall -I../../../../usr/include/ |
| 21 | LDLIBS += -lmount -I/usr/include/libmount |
| 22 | |
| 23 | $(BINARIES): ../../../gpio/gpio-utils.o ../../../../usr/include/linux/gpio.h |
| 24 | |
| 25 | ../../../gpio/gpio-utils.o: |
| 26 | make ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C ../../../gpio |
| 27 | |
| 28 | ../../../../usr/include/linux/gpio.h: |
| 29 | make -C ../../../.. headers_install INSTALL_HDR_PATH=$(shell pwd)/../../../../usr/ |
| 30 | |