It's a stack calculator for the unwise. Public Domain.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

25 lines
385B

  1. .POSIX: # Just kidding, use GNU Make
  2. CC := cc
  3. CFLAGS := -std=c99 -Wall -Wextra -Wpedantic
  4. LDFLAGS := -lm -lgmp -lreadline
  5. OBJ := dc.o
  6. ifeq ($(debug),1)
  7. CFLAGS += -Og -g
  8. else
  9. CFLAGS += -O3 -funroll-loops -fomit-frame-pointer
  10. endif
  11. %.o: %.c
  12. $(CC) $(CFLAGS) -c -o $@ $<
  13. dc: $(OBJ)
  14. $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)
  15. dc.o: ns.c arith.c slurp.c
  16. clean:
  17. $(RM) $(OBJ) dc