summaryrefslogtreecommitdiff
path: root/tests/examplefiles/vpath.mk
diff options
context:
space:
mode:
Diffstat (limited to 'tests/examplefiles/vpath.mk')
-rw-r--r--tests/examplefiles/vpath.mk16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/examplefiles/vpath.mk b/tests/examplefiles/vpath.mk
new file mode 100644
index 00000000..a7f18fc3
--- /dev/null
+++ b/tests/examplefiles/vpath.mk
@@ -0,0 +1,16 @@
+vpath %.c src
+vpath %.h header
+EXEC=hello
+SRC= hello.c main.c
+OBJ= $(SRC:.c=.o)
+
+all: $(EXEC)
+
+hello: $(OBJ)
+ $(CC) -o $@ $^ $(LDFLAGS)
+
+main.o: hello.h
+
+%.o: %.c
+ $(CC) -I header -o $@ \
+ -c $< $(CFLAGS)