2022-05-12 13:08:51 +01:00
|
|
|
CC ?= gcc
|
2022-05-12 13:53:17 +01:00
|
|
|
CFLAGS_BENCH ?= -std=gnu99 -O3
|
2024-03-24 17:50:47 +00:00
|
|
|
LFLAGS_BENCH ?= -lpng $(LDFLAGS)
|
2022-05-12 13:53:17 +01:00
|
|
|
CFLAGS_CONV ?= -std=c99 -O3
|
2024-03-24 17:50:47 +00:00
|
|
|
LFLAGS_CONV ?= $(LDFLAGS)
|
2022-05-12 08:52:51 +01:00
|
|
|
|
2022-05-12 13:53:17 +01:00
|
|
|
TARGET_BENCH ?= qoibench
|
|
|
|
TARGET_CONV ?= qoiconv
|
2022-05-12 08:52:51 +01:00
|
|
|
|
2022-05-12 09:07:44 +01:00
|
|
|
all: $(TARGET_BENCH) $(TARGET_CONV)
|
|
|
|
|
|
|
|
bench: $(TARGET_BENCH)
|
2024-03-19 08:33:07 +00:00
|
|
|
$(TARGET_BENCH):$(TARGET_BENCH).c qoi.h
|
2022-11-16 15:52:39 +00:00
|
|
|
$(CC) $(CFLAGS_BENCH) $(CFLAGS) $(TARGET_BENCH).c -o $(TARGET_BENCH) $(LFLAGS_BENCH)
|
2022-05-12 08:52:51 +01:00
|
|
|
|
2022-05-12 09:07:44 +01:00
|
|
|
conv: $(TARGET_CONV)
|
2024-03-19 08:33:07 +00:00
|
|
|
$(TARGET_CONV):$(TARGET_CONV).c qoi.h
|
2024-03-24 17:50:47 +00:00
|
|
|
$(CC) $(CFLAGS_CONV) $(CFLAGS) $(TARGET_CONV).c -o $(TARGET_CONV) $(LFLAGS_CONV)
|
2022-05-12 08:52:51 +01:00
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
2022-05-12 13:08:51 +01:00
|
|
|
$(RM) $(TARGET_BENCH) $(TARGET_CONV)
|