--- ./Makefile 2024-08-25 23:22:11 +++ ./Makefile 2024-08-25 23:23:26 @@ -1,9 +1,12 @@ -include config.mk +PREFIX ?= /opt/local + CC ?= /usr/bin/cc -CFLAGS = -O3 -Wall -Wextra -I/usr/local/include -LDFLAGS = -L/usr/local/lib -lpng -VERSION = 1.0 +CFLAGS ?= -O3 -Wall -Wextra -I$(PREFIX)/include +LDFLAGS ?= -L$(PREFIX)/lib +DEFAULT_LDFLAGS = -lpng +VERSION ?= 1.0 BIN ?= pngloss DESTDIR ?= /usr/local @@ -19,7 +22,7 @@ all: $(BIN) $(BIN): $(OBJS) - $(CC) $(OBJS) $(CFLAGS) $(LDFLAGS) -o $@ + $(CC) $(OBJS) $(CFLAGS) $(DEFAULT_LDFLAGS) $(LDFLAGS) -o $@ dist: $(TARFILE)