summaryrefslogtreecommitdiff
path: root/tests/examplefiles/vpath.mk
blob: a7f18fc3ca1bd4b71623199b1aa6f5c47cb3da41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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)