Merge pull request #209 from varuld/simple_makefile

Simple makefile
This commit is contained in:
Dominic Szablewski 2022-05-17 15:53:03 +02:00 committed by GitHub
commit 911ca7b65f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

22
Makefile Normal file
View File

@ -0,0 +1,22 @@
CC ?= gcc
CFLAGS_BENCH ?= -std=gnu99 -O3
LFLAGS_BENCH ?= -lpng
CFLAGS_CONV ?= -std=c99 -O3
TARGET_BENCH ?= qoibench
TARGET_CONV ?= qoiconv
all: $(TARGET_BENCH) $(TARGET_CONV)
bench: $(TARGET_BENCH)
$(TARGET_BENCH):$(TARGET_BENCH).c $(LFLAGS_BENCH)
$(CC) $(CFLAGS_BENCH) $(TARGET_BENCH).c -o $(TARGET_BENCH) $(LFLAGS_BENCH)
conv: $(TARGET_CONV)
$(TARGET_CONV):$(TARGET_CONV).c
$(CC) $(CFLAGS_CONV) $(TARGET_CONV).c -o $(TARGET_CONV)
.PHONY: clean
clean:
$(RM) $(TARGET_BENCH) $(TARGET_CONV)