rjw | 1f88458 | 2022-01-06 17:20:42 +0800 | [diff] [blame^] | 1 | # SPDX-License-Identifier: GPL-2.0 |
| 2 | all: |
| 3 | |
| 4 | all: ring virtio_ring_0_9 virtio_ring_poll virtio_ring_inorder ptr_ring noring |
| 5 | |
| 6 | CFLAGS += -Wall |
| 7 | CFLAGS += -pthread -O2 -ggdb -flto -fwhole-program |
| 8 | LDFLAGS += -pthread -O2 -ggdb -flto -fwhole-program |
| 9 | |
| 10 | main.o: main.c main.h |
| 11 | ring.o: ring.c main.h |
| 12 | ptr_ring.o: ptr_ring.c main.h ../../../include/linux/ptr_ring.h |
| 13 | virtio_ring_0_9.o: virtio_ring_0_9.c main.h |
| 14 | virtio_ring_poll.o: virtio_ring_poll.c virtio_ring_0_9.c main.h |
| 15 | virtio_ring_inorder.o: virtio_ring_inorder.c virtio_ring_0_9.c main.h |
| 16 | ring: ring.o main.o |
| 17 | virtio_ring_0_9: virtio_ring_0_9.o main.o |
| 18 | virtio_ring_poll: virtio_ring_poll.o main.o |
| 19 | virtio_ring_inorder: virtio_ring_inorder.o main.o |
| 20 | ptr_ring: ptr_ring.o main.o |
| 21 | noring: noring.o main.o |
| 22 | clean: |
| 23 | -rm main.o |
| 24 | -rm ring.o ring |
| 25 | -rm virtio_ring_0_9.o virtio_ring_0_9 |
| 26 | -rm virtio_ring_poll.o virtio_ring_poll |
| 27 | -rm virtio_ring_inorder.o virtio_ring_inorder |
| 28 | -rm ptr_ring.o ptr_ring |
| 29 | -rm noring.o noring |
| 30 | |
| 31 | .PHONY: all clean |