# Keep -O2. -O3 was measured 34% slower on dstdec (icache blowout in
# the 16-term predictor). Do not add -march=native: it is not faster
# here and it makes the .deb / AppImage non-portable.
# CFLAGS ?= so dpkg-buildflags can inject hardening flags; ALL_CFLAGS
# always appends -fPIC -std=gnu99 so those cannot be dropped.
CC ?= gcc
CFLAGS ?= -O2
ALL_CFLAGS = $(CFLAGS) -fPIC -std=gnu99 -Wall
LDFLAGS ?= -shared
SRC = dstdec.c
OUT ?= libaudryn_dst.so

$(OUT): $(SRC)
	$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(SRC)

clean:
	rm -f $(OUT)
.PHONY: clean
