Skip to content

Commit

Permalink
samples: move timers example code from Documentation
Browse files Browse the repository at this point in the history
Move timers examples to samples and remove it from Documentation
Makefile. Create a new Makefile to build timers. It can be built
from top level directory or from timers directory:

Run make -C samples/timers or cd samples/timers; make

Acked-by: Jonathan Corbet <[email protected]>
Acked-by: Clemens Ladisch <[email protected]>
Signed-off-by: Shuah Khan <[email protected]>
  • Loading branch information
Shuah Khan committed Sep 23, 2016
1 parent 986b891 commit 155fe00
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Documentation/Makefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
subdir-y := accounting auxdisplay blackfin \
laptops pcmcia timers watchdog
laptops pcmcia watchdog
5 changes: 0 additions & 5 deletions Documentation/timers/Makefile

This file was deleted.

2 changes: 1 addition & 1 deletion Documentation/timers/hpet.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ arch/x86/kernel/hpet.c.

The driver provides a userspace API which resembles the API found in the
RTC driver framework. An example user space program is provided in
file:Documentation/timers/hpet_example.c
file:samples/timers/hpet_example.c
File renamed without changes.
15 changes: 15 additions & 0 deletions samples/timers/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
ifndef CROSS_COMPILE
uname_M := $(shell uname -m 2>/dev/null || echo not)
ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/x86/ -e s/x86_64/x86/)

ifeq ($(ARCH),x86)
CC := $(CROSS_COMPILE)gcc
PROGS := hpet_example

all: $(PROGS)

clean:
rm -fr $(PROGS)

endif
endif
File renamed without changes.

0 comments on commit 155fe00

Please sign in to comment.