This repository has been archived on 2024-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
dc/old-dc/Makefile

25 lines
385 B
Makefile
Raw Permalink Normal View History

2023-09-23 13:26:21 -04:00
.POSIX: # Just kidding, use GNU Make
CC := cc
CFLAGS := -std=c99 -Wall -Wextra -Wpedantic
LDFLAGS := -lm -lgmp -lreadline
OBJ := dc.o
ifeq ($(debug),1)
CFLAGS += -Og -g
else
CFLAGS += -O3 -funroll-loops -fomit-frame-pointer
endif
%.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
dc: $(OBJ)
$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)
dc.o: ns.c arith.c slurp.c
clean:
$(RM) $(OBJ) dc